lora微调后,合并模型后,模型加载的时候出现 AttributeError: can't set attribute,怎么办? #2287
Closed
1737686924
started this conversation in
General
Replies: 2 comments 1 reply
-
不好意思,已解决 这个报错,我覆盖了tokenizer_config.json,可是内容是这样的, "name_or_path": "THUDM/chatglm3-6b",测试后觉得微调前后基本都没变,是不是依旧加载的这个模型chatglm3-6b |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Traceback (most recent call last):
File "/root/.local/share/big_model/LLaMA-Factory-main/src/cli_demo.py", line 47, in
main()
File "/root/.local/share/big_model/LLaMA-Factory-main/src/cli_demo.py", line 13, in main
chat_model = ChatModel()
File "/root/.local/share/big_model/LLaMA-Factory-main/src/llmtuner/chat/chat_model.py", line 27, in init
self.model, self.tokenizer = load_model_and_tokenizer(
File "/root/.local/share/big_model/LLaMA-Factory-main/src/llmtuner/model/loader.py", line 49, in load_model_and_tokenizer
tokenizer = AutoTokenizer.from_pretrained(
File "/root/miniconda3/envs/env/lib/python3.9/site-packages/transformers/models/auto/tokenization_auto.py", line 774, in from_pretrained
return tokenizer_class.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
File "/root/miniconda3/envs/env/lib/python3.9/site-packages/transformers/tokenization_utils_base.py", line 2028, in from_pretrained
return cls._from_pretrained(
File "/root/miniconda3/envs/env/lib/python3.9/site-packages/transformers/tokenization_utils_base.py", line 2260, in _from_pretrained
tokenizer = cls(*init_inputs, **init_kwargs)
File "/root/.cache/huggingface/modules/transformers_modules/path_to_export/tokenization_chatglm.py", line 108, in init
super().init(padding_side=padding_side, clean_up_tokenization_spaces=clean_up_tokenization_spaces,
File "/root/miniconda3/envs/env/lib/python3.9/site-packages/transformers/tokenization_utils.py", line 363, in init
super().init(**kwargs)
File "/root/miniconda3/envs/env/lib/python3.9/site-packages/transformers/tokenization_utils_base.py", line 1602, in init
super().init(**kwargs)
File "/root/miniconda3/envs/env/lib/python3.9/site-packages/transformers/tokenization_utils_base.py", line 861, in init
setattr(self, key, value)
AttributeError: can't set attribute
Beta Was this translation helpful? Give feedback.
All reactions