From 750838adc4f9f7c8f4c9464ca92043a06197540a Mon Sep 17 00:00:00 2001 From: GuoYipin <64318822+coco-alen@users.noreply.github.com> Date: Sun, 20 Jul 2025 22:22:54 +0800 Subject: [PATCH] fix: fix the bug of loading Internvl3 (#8067) Co-authored-by: Xinyuan Tong --- python/sglang/srt/configs/internvl.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/sglang/srt/configs/internvl.py b/python/sglang/srt/configs/internvl.py index 14b648252..b4ddda227 100644 --- a/python/sglang/srt/configs/internvl.py +++ b/python/sglang/srt/configs/internvl.py @@ -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(