We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 679a7e1 commit fcaf452Copy full SHA for fcaf452
src/transformers/models/llama/modeling_llama.py
@@ -871,7 +871,6 @@ def forward(
871
if not isinstance(past_key_values, Cache):
872
past_key_values = self.from_legacy_cache(past_key_values)
873
past_key_values_length = past_key_values.get_seq_length()
874
- seq_length_with_past += past_key_values_length
875
876
if position_ids is None:
877
device = input_ids.device if input_ids is not None else inputs_embeds.device
@@ -917,7 +916,7 @@ def forward(
917
916
hidden_states,
918
attention_mask,
919
position_ids,
920
- past_key_value,
+ past_key_values,
921
output_attentions,
922
use_cache,
923
)
0 commit comments