sgl-project/sglang · critical · ValueError
Unsupported attention type: {config.attention_type}
Error message
Unsupported attention type: {config.attention_type} What it means
Bailing v3 layer construction dispatches on config.attention_type; unrecognized values (neither full nor the supported linear attention type) raise this error before the MoE layout is built.
Source
Thrown at python/sglang/srt/models/bailing_moe_v3.py:972
quant_config=quant_config,
layer_id=layer_id,
reduce_results=False,
prefix=add_prefix("attention", prefix),
alt_stream=alt_stream,
skip_rope=(
getattr(config, "use_mla_nope", False)
or config.qk_rope_head_dim == 0
),
)
else:
self.attention = BailingMoEAttention(
config,
quant_config=quant_config,
layer_id=self.layer_id,
prefix=prefix + ".attention",
)
else:
raise ValueError(f"Unsupported attention type: {config.attention_type}")
self.expert_num = config.num_experts
self.hidden_size = config.hidden_size
is_moe_layer = is_nextn or (
not (self.expert_num == 1)
and (self.layer_id >= config.first_k_dense_replace)
)
self.is_layer_sparse = is_moe_layer
is_previous_moe_layer = not (self.expert_num == 1) and (
self.layer_id - 1 >= config.first_k_dense_replace
)
is_next_layer_sparse = not (self.expert_num == 1) and (
self.layer_id + 1 >= config.first_k_dense_replace
)
if enable_moe_dense_fully_dp():
mlp_tp_rank, mlp_tp_size = 0, 1
else:
mlp_tp_rank, mlp_tp_size = None, NoneView on GitHub (pinned to 0132848349)
Solutions
- Upgrade SGLang to a release supporting this attention_type
- Fix attention_type in config.json to a supported value ("full" or the model's linear attention type)
Defensive patterns
Strategy: validation
Validate before calling
assert config.attention_type in {"full", "linear"} Prevention
- Upgrade SGLang when adopting new Bailing checkpoints
When it happens
Trigger: Loading a bailing_moe_v3 config whose attention_type is unsupported by the installed SGLang version.
Common situations: Newer checkpoint revision with a new attention flavor; typo in attention_type; downgrade of SGLang.
Related errors
- Unsupported attention type: {config.attention_type}
- head_dim mismatch across layers for fused KV path: expected
- num_heads must be divisible by num_epi_subtiles
- num_heads // num_epi_subtiles must be divisible by 4 (FMA un
- sparse_attn_v4_paged_decode expects fp16/bf16 q, got {q.dtyp
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/7a68c92c0e66f640.
Report an issue: GitHub.