[GH-ISSUE #60] ValueError: The checkpoint you are trying to load has model type multi_modality but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is ou… #48

Open
opened 2026-10-26 21:09:07 +00:00 by bsakaguchi · 6 comments
Owner

Originally created by @Y-PanC on GitHub (Sep 30, 2024).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-VL/issues/60

您好!
我下载该模型搭配LLamafactory框架,在做api部署的时候,报以下错误
[2024-10-01 00:15:35,483] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to cuda (auto detect)
[INFO|configuration_utils.py:670] 2024-10-01 00:15:38,538 >> loading configuration file /mnt/ssd2/models/deepseek-vl-7b-chat/config.json
Traceback (most recent call last):
File "/home/ubuntu/miniconda3/envs/panc_math_vscode/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 1023, in from_pretrained
config_class = CONFIG_MAPPING[config_dict["model_type"]]
File "/home/ubuntu/miniconda3/envs/panc_math_vscode/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 725, in getitem
raise KeyError(key)
KeyError: 'multi_modality'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/ubuntu/miniconda3/envs/panc_math_vscode/bin/llamafactory-cli", line 8, in
sys.exit(main())
File "/home/ubuntu/pqj/math/LLaMA-Factory/src/llamafactory/cli.py", line 79, in main
run_api()
File "/home/ubuntu/pqj/math/LLaMA-Factory/src/llamafactory/api/app.py", line 129, in run_api
chat_model = ChatModel()
File "/home/ubuntu/pqj/math/LLaMA-Factory/src/llamafactory/chat/chat_model.py", line 52, in init
self.engine: "BaseEngine" = HuggingfaceEngine(model_args, data_args, finetuning_args, generating_args)
File "/home/ubuntu/pqj/math/LLaMA-Factory/src/llamafactory/chat/hf_engine.py", line 54, in init
tokenizer_module = load_tokenizer(model_args)
File "/home/ubuntu/pqj/math/LLaMA-Factory/src/llamafactory/model/loader.py", line 69, in load_tokenizer
config = load_config(model_args)
File "/home/ubuntu/pqj/math/LLaMA-Factory/src/llamafactory/model/loader.py", line 122, in load_config
return AutoConfig.from_pretrained(model_args.model_name_or_path, **init_kwargs)
File "/home/ubuntu/miniconda3/envs/panc_math_vscode/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 1025, in from_pretrained
raise ValueError(
ValueError: The checkpoint you are trying to load has model type multi_modality but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.
请问怎么修改,我的transformer=4.45.0,具体环境附上图。
环境图

Originally created by @Y-PanC on GitHub (Sep 30, 2024). Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-VL/issues/60 您好! 我下载该模型搭配LLamafactory框架,在做api部署的时候,报以下错误 [2024-10-01 00:15:35,483] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to cuda (auto detect) [INFO|configuration_utils.py:670] 2024-10-01 00:15:38,538 >> loading configuration file /mnt/ssd2/models/deepseek-vl-7b-chat/config.json Traceback (most recent call last): File "/home/ubuntu/miniconda3/envs/panc_math_vscode/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 1023, in from_pretrained config_class = CONFIG_MAPPING[config_dict["model_type"]] File "/home/ubuntu/miniconda3/envs/panc_math_vscode/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 725, in __getitem__ raise KeyError(key) KeyError: 'multi_modality' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/ubuntu/miniconda3/envs/panc_math_vscode/bin/llamafactory-cli", line 8, in <module> sys.exit(main()) File "/home/ubuntu/pqj/math/LLaMA-Factory/src/llamafactory/cli.py", line 79, in main run_api() File "/home/ubuntu/pqj/math/LLaMA-Factory/src/llamafactory/api/app.py", line 129, in run_api chat_model = ChatModel() File "/home/ubuntu/pqj/math/LLaMA-Factory/src/llamafactory/chat/chat_model.py", line 52, in __init__ self.engine: "BaseEngine" = HuggingfaceEngine(model_args, data_args, finetuning_args, generating_args) File "/home/ubuntu/pqj/math/LLaMA-Factory/src/llamafactory/chat/hf_engine.py", line 54, in __init__ tokenizer_module = load_tokenizer(model_args) File "/home/ubuntu/pqj/math/LLaMA-Factory/src/llamafactory/model/loader.py", line 69, in load_tokenizer config = load_config(model_args) File "/home/ubuntu/pqj/math/LLaMA-Factory/src/llamafactory/model/loader.py", line 122, in load_config return AutoConfig.from_pretrained(model_args.model_name_or_path, **init_kwargs) File "/home/ubuntu/miniconda3/envs/panc_math_vscode/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 1025, in from_pretrained raise ValueError( ValueError: The checkpoint you are trying to load has model type `multi_modality` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date. 请问怎么修改,我的transformer=4.45.0,具体环境附上图。 ![环境图](https://github.com/user-attachments/assets/d258f8da-0614-498c-9794-76cc0994a4ff)
Author
Owner

@LIMYOONA8 commented on GitHub (Nov 4, 2024):

请问你怎么解决的?

<!-- gh-comment-id:2454148959 --> @LIMYOONA8 commented on GitHub (Nov 4, 2024): 请问你怎么解决的?
Author
Owner

@liuxusummer commented on GitHub (Dec 8, 2024):

我遇到了同样的错误

<!-- gh-comment-id:2525414773 --> @liuxusummer commented on GitHub (Dec 8, 2024): 我遇到了同样的错误
Author
Owner

@mauriciotoro commented on GitHub (Jan 29, 2025):

Same error here, I am using Mac M1...could that be the problem?

<!-- gh-comment-id:2622124307 --> @mauriciotoro commented on GitHub (Jan 29, 2025): Same error here, I am using Mac M1...could that be the problem?
Author
Owner

@AmineHamzaoui commented on GitHub (Jan 30, 2025):

Hello, how did you slove the error guys, is the problem in versions we use or what ?

<!-- gh-comment-id:2623359866 --> @AmineHamzaoui commented on GitHub (Jan 30, 2025): Hello, how did you slove the error guys, is the problem in versions we use or what ?
Author
Owner

@Wuwenji18 commented on GitHub (Apr 21, 2025):

同问

<!-- gh-comment-id:2818345677 --> @Wuwenji18 commented on GitHub (Apr 21, 2025): 同问
Author
Owner

@CNPaulYu commented on GitHub (Mar 18, 2026):

model_type in config.json should be supported by transformers.

<!-- gh-comment-id:4079195918 --> @CNPaulYu commented on GitHub (Mar 18, 2026): model_type in config.json should be supported by transformers.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepSeek-VL#48
No description provided.