sgl-project/sglang · error · ValueError
MiniCPM sparse attention does not support PD disaggregation
Error message
MiniCPM sparse attention does not support PD disaggregation
What it means
MiniCPM sparse attention backends (minicpm_flashattn/minicpm_flashinfer selected explicitly or by default) are incompatible with prefill-decode disaggregation. If a sparse backend is in use and disaggregation_mode != 'null', the override hook raises ValueError.
Source
Thrown at python/sglang/srt/arg_groups/overrides.py:1323
if dense_attention is not None:
overrides["attention_backend"] = dense_attention
dense_prefill = dense_backends.get(cfg.prefill_attention_backend)
if dense_prefill is not None:
overrides["prefill_attention_backend"] = dense_prefill
dense_decode = dense_backends.get(cfg.decode_attention_backend)
if dense_decode is not None:
overrides["decode_attention_backend"] = dense_decode
elif has_sparse_attention:
uses_sparse_backend = cfg.is_attention_backend_not_set() or any(
backend in ("minicpm_flashattn", "minicpm_flashinfer")
for backend in (
cfg.attention_backend,
cfg.prefill_attention_backend,
cfg.decode_attention_backend,
)
)
if uses_sparse_backend and cfg.disaggregation_mode != "null":
raise ValueError(
"MiniCPM sparse attention does not support PD disaggregation"
)
if cfg.is_attention_backend_not_set():
overrides["attention_backend"] = (
"minicpm_flashinfer"
if is_blackwell_supported()
else "minicpm_flashattn"
)
return overrides
@_register_for("MiniCPMV4_6ForConditionalGeneration")
def _minicpm_v4_6_overrides(server_args: Any, hf_config: Any) -> dict:
cfg = resolving_view(server_args)
if is_sm100_supported() and cfg.attention_backend is None:
return {"attention_backend": "triton"}
return {}
View on GitHub (pinned to 0132848349)
Solutions
- Set --disaggregation-mode null (or omit the flag) for MiniCPM
- Or force a dense path: set SGLANG_MINICPM_FORCE_DENSE=1 and a non-sparse backend, only if validated for your checkpoint
- Use a model that supports PD disaggregation for disaggregated serving
Example fix
# before --disaggregation-mode prefill # after # (no disaggregation; monolithic server)
Defensive patterns
Strategy: validation
Validate before calling
sparse = {'minicpm_flashattn', 'minicpm_flashinfer'} & {attention_backend, prefill_backend, decode_backend}
if model_arch.startswith('MiniCPM') and sparse:
server_args.disaggregation_mode = 'null' Try / catch
except ValueError as e:
if 'PD disaggregation' in str(e): server_args.disaggregation_mode = 'null'; retry()
raise Prevention
- Keep MiniCPM out of PD-disaggregated fleets or force dense mode deliberately
- Validate disaggregation_mode against model backend matrix at submit time
When it happens
Trigger: Running MiniCPM with --disaggregation-mode prefill or decode while a minicpm_* sparse attention backend is set in attention_backend/prefill/decode fields.
Common situations: Joining a PD-disaggregation cluster with a MiniCPM SALA model; PD scripts that always pass --disaggregation-mode.
Related errors
- indices must be on q's device {device}, got {indices.device}
- q must be torch.float8_e4m3fn, got {q.dtype}
- MiniCPM does not support DP attention
- MiniCPM SALA does not support hierarchical cache
- PD decode DCP requires --disaggregation-transfer-backend moo
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/2f5be992ccae5b30.
Report an issue: GitHub.