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 (
LlamaConfig,
PretrainedConfig,
PreTrainedTokenizer,
Qwen2Config,
)
from sglang.utils import logger
......@@ -311,6 +312,8 @@ class InternVLChatConfig(PretrainedConfig):
self.llm_config = LlamaConfig(**llm_config)
elif llm_config.get("architectures")[0] == "InternLM2ForCausalLM":
self.llm_config = InternLM2Config(**llm_config)
elif llm_config.get("architectures")[0] == "Qwen2ForCausalLM":
self.llm_config = Qwen2Config(**llm_config)
else:
raise ValueError(
"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