Bo1015 commited on
Commit
56cfc46
·
verified ·
1 Parent(s): 3bd253f

Upload modeling_proteinglm.py

Browse files
Files changed (1) hide show
  1. modeling_proteinglm.py +2 -1
modeling_proteinglm.py CHANGED
@@ -1276,7 +1276,8 @@ class ProteinGLMForCasualLM(ProteinGLMPreTrainedModel):
1276
  is_encoder_decoder: bool = False,
1277
  ) -> Dict[str, Any]:
1278
  # update past_key_values
1279
- model_kwargs["past_key_values"] = self._extract_past_from_model_output(outputs)
 
1280
 
1281
  # update attention mask
1282
  if "attention_mask" in model_kwargs:
 
1276
  is_encoder_decoder: bool = False,
1277
  ) -> Dict[str, Any]:
1278
  # update past_key_values
1279
+ cache_name, cache = self._extract_past_from_model_output(outputs)
1280
+ model_kwargs[cache_name] = cache
1281
 
1282
  # update attention mask
1283
  if "attention_mask" in model_kwargs: