jeffreygao commited on
Commit
6e571c3
1 Parent(s): 53e73e4

Update modeling_bluelm.py

Browse files
Files changed (1) hide show
  1. modeling_bluelm.py +1 -1
modeling_bluelm.py CHANGED
@@ -612,7 +612,7 @@ class BlueLMModel(BlueLMPreTrainedModel):
612
  seq_length_with_past = seq_length
613
  past_key_values_length = 0
614
  if past_key_values is not None:
615
- past_key_values_length = past_key_values[0][0].shape[2]
616
  seq_length_with_past = seq_length_with_past + past_key_values_length
617
  if inputs_embeds is None:
618
  inputs_embeds = self.embed_tokens(input_ids)
 
612
  seq_length_with_past = seq_length
613
  past_key_values_length = 0
614
  if past_key_values is not None:
615
+ past_key_values_length = past_key_values[0][0].shape[1]
616
  seq_length_with_past = seq_length_with_past + past_key_values_length
617
  if inputs_embeds is None:
618
  inputs_embeds = self.embed_tokens(input_ids)