sgl-project/sglang · error · NotImplementedError
is not implemented.
Error message
{config.text_config.architectures[0]} is not implemented. What it means
Intern-S1 model error: the text architecture named in the config is not implemented in SGLang; the architectures[0] value is reported.
Solutions
- Check config.text_config.architectures and align it to a supported backbone
- Use the matching standalone model class if the text model is neither InternLM2 nor Qwen3
Example fix
# before
"text_config": {"architectures": ["LlamaForCausalLM"]}
# after
"text_config": {"architectures": ["InternLM2ForCausalLM"]} Defensive patterns
Strategy: validation
Validate before calling
SUPPORTED = {'InternLM2ForCausalLM', 'Qwen3ForCausalLM'}
assert config.text_config.architectures[0] in SUPPORTED Type guard
def is_supported_interns1_text_arch(config) -> bool:
return config.text_config.architectures[0] in {'InternLM2ForCausalLM', 'Qwen3ForCausalLM'} Prevention
- Check architectures before instantiating multimodal wrappers
When it happens
Trigger: Loading an InternS1 multimodal checkpoint whose text_config.architectures[0] is not 'InternLM2ForCausalLM' or 'Qwen3ForCausalLM'.
Common situations: Community finetune swapping in a different text backbone; config.json edited or generated with a renamed architecture string.
Related errors
- deepstack_visual_indexes exists but deepstack_merger_list…
- A CUDA VMM-enabled model must provide a multimodal processor
- A GGUF encoder checkpoint cannot be combined with a second…
- All ranges must be within
- Ambiguous tensor payload for multi-module update. Provide a…
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/c5888773ffbf52ff.
Report an issue: GitHub.
Appendix: source
Thrown at python/sglang/srt/models/interns1.py:75
)
logger.info(f"num_image_token: {self.num_image_token}")
self.vision_model = InternVisionModel(config.vision_config)
if config.text_config.architectures[0] == "Qwen2ForCausalLM":
self.language_model = Qwen2ForCausalLM(
config=config.text_config, quant_config=quant_config
)
elif config.text_config.architectures[0] == "Qwen3MoeForCausalLM":
self.language_model = Qwen3MoeForCausalLM(
config=config.text_config, quant_config=quant_config
)
elif config.text_config.architectures[0] == "Qwen3ForCausalLM":
self.language_model = Qwen3ForCausalLM(
config=config.text_config, quant_config=quant_config
)
else:
raise NotImplementedError(
f"{config.text_config.architectures[0]} is not implemented."
)
vit_hidden_size = config.vision_config.hidden_size
llm_hidden_size = config.text_config.hidden_size
self.mlp1 = nn.Sequential(
nn.LayerNorm(vit_hidden_size * int(1 / self.downsample_ratio) ** 2),
nn.Linear(
vit_hidden_size * int(1 / self.downsample_ratio) ** 2, llm_hidden_size
),
nn.GELU(),
nn.Linear(llm_hidden_size, llm_hidden_size),
)
def pixel_shuffle(self, x, scale_factor=0.5):
n, w, h, c = x.size()
# N, W, H, C --> N, W, H * scale, C // scaleView on GitHub (pinned to 0132848349)