[INFO|tokenization_utils_base.py:1800] 2023-08-02 20:41:21,905 >> loading file tokenizer.model
[INFO|tokenization_utils_base.py:1800] 2023-08-02 20:41:21,905 >> loading file added_tokens.json
[INFO|tokenization_utils_base.py:1800] 2023-08-02 20:41:21,905 >> loading file special_tokens_map.json
[INFO|tokenization_utils_base.py:1800] 2023-08-02 20:41:21,906 >> loading file tokenizer_config.json
[WARNING|modeling_utils.py:2092] 2023-08-02 20:41:21,939 >> The argument trust_remote_code is to be used with Auto classes. It has no effect here and is ignored.
[INFO|modeling_utils.py:2400] 2023-08-02 20:41:21,940 >> loading weights file ./chatglm2-6b/pytorch_model.bin.index.json
[INFO|modeling_utils.py:2443] 2023-08-02 20:41:21,940 >> Will use torch_dtype=torch.float16 as defined in model's config object
[INFO|modeling_utils.py:1126] 2023-08-02 20:41:21,940 >> Instantiating ChatGLMForConditionalGeneration model under default dtype torch.float16.
[INFO|configuration_utils.py:575] 2023-08-02 20:41:21,941 >> Generate config GenerationConfig {
"_from_model_config": true,
"eos_token_id": 2,
"pad_token_id": 0,
"transformers_version": "4.27.1"
}
Traceback (most recent call last):
File "/data/Med-ChatGLM/run_clm.py", line 564, in
main()
File "/data/Med-ChatGLM/run_clm.py", line 408, in main
model = ChatGLMForConditionalGeneration.from_pretrained(
File "/home/node/anaconda3/envs/Med-ChatGLM/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2498, in from_pretrained
model = cls(config, *model_args, **model_kwargs)
File "/data/Med-ChatGLM/modeling_chatglm.py", line 920, in init
self.max_sequence_length = config.max_sequence_length
File "/home/node/anaconda3/envs/Med-ChatGLM/lib/python3.10/site-packages/transformers/configuration_utils.py", line 260, in getattribute
return super().getattribute(key)
AttributeError: 'ChatGLMConfig' object has no attribute 'max_sequence_length'
[INFO|tokenization_utils_base.py:1800] 2023-08-02 20:41:21,905 >> loading file tokenizer.model [INFO|tokenization_utils_base.py:1800] 2023-08-02 20:41:21,905 >> loading file added_tokens.json [INFO|tokenization_utils_base.py:1800] 2023-08-02 20:41:21,905 >> loading file special_tokens_map.json [INFO|tokenization_utils_base.py:1800] 2023-08-02 20:41:21,906 >> loading file tokenizer_config.json [WARNING|modeling_utils.py:2092] 2023-08-02 20:41:21,939 >> The argument
trust_remote_code
is to be used with Auto classes. It has no effect here and is ignored. [INFO|modeling_utils.py:2400] 2023-08-02 20:41:21,940 >> loading weights file ./chatglm2-6b/pytorch_model.bin.index.json [INFO|modeling_utils.py:2443] 2023-08-02 20:41:21,940 >> Will use torch_dtype=torch.float16 as defined in model's config object [INFO|modeling_utils.py:1126] 2023-08-02 20:41:21,940 >> Instantiating ChatGLMForConditionalGeneration model under default dtype torch.float16. [INFO|configuration_utils.py:575] 2023-08-02 20:41:21,941 >> Generate config GenerationConfig { "_from_model_config": true, "eos_token_id": 2, "pad_token_id": 0, "transformers_version": "4.27.1" }Traceback (most recent call last): File "/data/Med-ChatGLM/run_clm.py", line 564, in
main()
File "/data/Med-ChatGLM/run_clm.py", line 408, in main
model = ChatGLMForConditionalGeneration.from_pretrained(
File "/home/node/anaconda3/envs/Med-ChatGLM/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2498, in from_pretrained
model = cls(config, *model_args, **model_kwargs)
File "/data/Med-ChatGLM/modeling_chatglm.py", line 920, in init
self.max_sequence_length = config.max_sequence_length
File "/home/node/anaconda3/envs/Med-ChatGLM/lib/python3.10/site-packages/transformers/configuration_utils.py", line 260, in getattribute
return super().getattribute(key)
AttributeError: 'ChatGLMConfig' object has no attribute 'max_sequence_length'