Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

读入huggingface模型报错 #12

Closed
Tsukumizu opened this issue Nov 6, 2023 · 1 comment
Closed

读入huggingface模型报错 #12

Tsukumizu opened this issue Nov 6, 2023 · 1 comment

Comments

@Tsukumizu
Copy link

Traceback (most recent call last):
File "/data/FinAi_Mapping_Knowledge/yangcehao/download.py", line 30, in
model = AutoModelForCausalLM.from_pretrained("Go4miii/DISC-FinLLM", device_map="auto", trust_remote_code=True)
File "/data/FinAi_Mapping_Knowledge/anaconda3/envs/sjj_env/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 557, in from_pretrained
cls.register(config.class, model_class, exist_ok=True)
File "/data/FinAi_Mapping_Knowledge/anaconda3/envs/sjj_env/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 583, in register
raise ValueError(
ValueError: The model class you are passing has a config_class attribute that is not consistent with the config class you passed (model has <class 'transformers_modules.baichuan-inc.Baichuan-13B-Chat.e580bc803f3f4f6b42ddccd0730739c057c7b54c.configuration_baichuan.BaichuanConfig'> and you passed <class 'transformers_modules.Go4miii.DISC-FinLLM.8e235cb9e81f952702b0b90c5f3292a1089b0dba.configuration_baichuan.BaichuanConfig'>. Fix one of those so they match!

直接采用huggingface的代码读入的。感谢解答

@Tsukumizu
Copy link
Author

看到另一个issue了,降低transformers版本到4.30.2ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant