derek33125 commited on
Commit
cd159e4
1 Parent(s): 146cc0e

Updating the model

Browse files

Updating the model following the base model update (now needs transforemrs>=4.44.0), check https://github.com/THUDM/GLM-4/blob/main/basic_demo/requirements.txt for updated requirement

Files changed (3) hide show
  1. config.json +1 -1
  2. generation_config.json +1 -1
  3. modeling_chatglm.py +1 -4
config.json CHANGED
@@ -38,7 +38,7 @@
38
  "seq_length": 131072,
39
  "use_cache": true,
40
  "torch_dtype": "bfloat16",
41
- "transformers_version": "4.42.4",
42
  "tie_word_embeddings": false,
43
  "eos_token_id": [151329, 151336, 151338],
44
  "pad_token_id": 151329
 
38
  "seq_length": 131072,
39
  "use_cache": true,
40
  "torch_dtype": "bfloat16",
41
+ "transformers_version": "4.44.0",
42
  "tie_word_embeddings": false,
43
  "eos_token_id": [151329, 151336, 151338],
44
  "pad_token_id": 151329
generation_config.json CHANGED
@@ -9,5 +9,5 @@
9
  "temperature": 0.8,
10
  "max_length": 128000,
11
  "top_p": 0.8,
12
- "transformers_version": "4.42.4"
13
  }
 
9
  "temperature": 0.8,
10
  "max_length": 128000,
11
  "top_p": 0.8,
12
+ "transformers_version": "4.44.0"
13
  }
modeling_chatglm.py CHANGED
@@ -924,12 +924,9 @@ class ChatGLMForConditionalGeneration(ChatGLMPreTrainedModel):
924
  outputs: ModelOutput,
925
  model_kwargs: Dict[str, Any],
926
  is_encoder_decoder: bool = False,
927
- standardize_cache_format: bool = False,
928
  ) -> Dict[str, Any]:
929
  # update past_key_values
930
- cache_name, cache = self._extract_past_from_model_output(
931
- outputs, standardize_cache_format=standardize_cache_format
932
- )
933
  model_kwargs[cache_name] = cache
934
 
935
  # update attention mask
 
924
  outputs: ModelOutput,
925
  model_kwargs: Dict[str, Any],
926
  is_encoder_decoder: bool = False,
 
927
  ) -> Dict[str, Any]:
928
  # update past_key_values
929
+ cache_name, cache = self._extract_past_from_model_output(outputs)
 
 
930
  model_kwargs[cache_name] = cache
931
 
932
  # update attention mask