Unverified Commit 750838ad authored by GuoYipin's avatar GuoYipin Committed by GitHub
Browse files

fix: fix the bug of loading Internvl3 (#8067)


Co-authored-by: default avatarXinyuan Tong <xinyuantong.cs@gmail.com>
parent 99aefa03
...@@ -9,6 +9,7 @@ from transformers import ( ...@@ -9,6 +9,7 @@ from transformers import (
LlamaConfig, LlamaConfig,
PretrainedConfig, PretrainedConfig,
PreTrainedTokenizer, PreTrainedTokenizer,
Qwen2Config,
) )
from sglang.utils import logger from sglang.utils import logger
...@@ -311,6 +312,8 @@ class InternVLChatConfig(PretrainedConfig): ...@@ -311,6 +312,8 @@ class InternVLChatConfig(PretrainedConfig):
self.llm_config = LlamaConfig(**llm_config) self.llm_config = LlamaConfig(**llm_config)
elif llm_config.get("architectures")[0] == "InternLM2ForCausalLM": elif llm_config.get("architectures")[0] == "InternLM2ForCausalLM":
self.llm_config = InternLM2Config(**llm_config) self.llm_config = InternLM2Config(**llm_config)
elif llm_config.get("architectures")[0] == "Qwen2ForCausalLM":
self.llm_config = Qwen2Config(**llm_config)
else: else:
raise ValueError( raise ValueError(
"Unsupported architecture: {}".format( "Unsupported architecture: {}".format(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment