model: support intern-s1 (#8350)

Signed-off-by: Xinyuan Tong <xinyuantong.cs@gmail.com>
Co-authored-by: zxy <zhou0493@e.ntu.edu.sg>
Co-authored-by: Xinyuan Tong <xinyuantong.cs@gmail.com>
Co-authored-by: Mick <mickjagger19@icloud.com>
Co-authored-by: Xinyuan Tong <115166877+JustinTong0323@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2025-07-26 13:48:51 -07:00
1 parent da0c026084
commit b7094a5ef1
10 files changed
+616 -63

No files matched your search

+3
View File
@@ -10,6 +10,7 @@ from transformers import (
PretrainedConfig,
PreTrainedTokenizer,
Qwen2Config,
Qwen3Config,
)
from sglang.utils import logger
@@ -314,6 +315,8 @@ class InternVLChatConfig(PretrainedConfig):
self.llm_config = InternLM2Config(**llm_config)
elif llm_config.get("architectures")[0] == "Qwen2ForCausalLM":
self.llm_config = Qwen2Config(**llm_config)
elif llm_config.get("architectures")[0] == "Qwen3MoeForCausalLM":
self.llm_config = Qwen3Config(**llm_config)
else:
raise ValueError(
"Unsupported architecture: {}".format(
@@ -635,6 +635,7 @@ multimodal_model_archs = [
"Qwen2_5_VLForConditionalGeneration",
"KimiVLForConditionalGeneration",
"InternVLChatModel",
"InternS1ForConditionalGeneration",
"Phi4MMForCausalLM",
"VILAForConditionalGeneration",
]