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

@@ -182,7 +182,7 @@ class TFSpeech2TextModelTester:
# first forward pass
outputs = model(input_ids, attention_mask=attention_mask, use_cache=True)
_, (_, past_key_values) = outputs.to_tuple()
_, past_key_values = outputs.to_tuple()
# create hypothetical multiple next token and extent to next_input_ids
next_tokens = tf.math.maximum(ids_tensor((self.batch_size, 3), config.vocab_size), 2)