TF generate refactor - past without encoder outputs (#15944)

* Remove packed past from generation_tf_utils

* update models with the new past format

* update template accordingly
This commit is contained in:
Joao Gante
2022-03-08 14:46:44 +00:00
committed by GitHub
parent 62d847602a
commit 70203b5937
30 changed files with 301 additions and 684 deletions

View File

@@ -114,7 +114,6 @@ class TFPegasusModelTester:
outputs = model(input_ids, attention_mask=attention_mask, head_mask=head_mask, use_cache=True)
output, past_key_values = outputs.to_tuple()
past_key_values = past_key_values[1]
# create hypothetical next token and extent to next_input_ids
next_tokens = ids_tensor((self.batch_size, 3), config.vocab_size)