sgl-project/sglang · error · ValueError
Kimi-K3 DCP + DSPARK currently requires SGLANG_RAGGED_VERIFY
Error message
Kimi-K3 DCP + DSPARK currently requires SGLANG_RAGGED_VERIFY_MODE=static; compact/cap-accept are not validated under DCP (got {ragged_mode.value!r}). What it means
Kimi-K3 DCP combined with DSPARK speculative decoding has only been validated with SGLANG_RAGGED_VERIFY_MODE=static. The compact and cap-accept ragged verify modes are untested/incorrect under DCP, so any other value read from the env is rejected.
Source
Thrown at python/sglang/srt/arg_groups/overrides.py:633
cfg = resolving_view(server_args)
if cfg.dcp_size > 1:
overrides = {}
if cfg.enable_symm_mem:
logger.warning(
"Kimi-K3 DCP disables --enable-symm-mem due to decode CUDA "
"graph correctness issues."
)
overrides["enable_symm_mem"] = False
if cfg.speculative_algorithm == "DSPARK":
from sglang.srt.speculative.ragged_verify import (
RaggedVerifyMode,
read_ragged_verify_mode,
)
ragged_mode = read_ragged_verify_mode()
if ragged_mode is not RaggedVerifyMode.STATIC:
raise ValueError(
"Kimi-K3 DCP + DSPARK currently requires "
"SGLANG_RAGGED_VERIFY_MODE=static; compact/cap-accept are "
f"not validated under DCP (got {ragged_mode.value!r})."
)
# DSPARK target-verify + draft-extend must run on the decode
# (cutedsl_mla) backend, whose _run_decode_kernel implements the DCP
# signature (causal_seqs / cp_world / cp_rank). The default
# "prefill" routes verify to trtllm_mla, whose base _run_decode_kernel
# lacks that DCP path (TypeError: unexpected kwarg 'causal_seqs').
overrides["speculative_attention_mode"] = "decode"
prefill_backend, decode_backend = attention_backends_of(cfg)
if decode_backend == "cutedsl_mla" or decode_backend is None:
_require_kimi_k3_cutedsl_dcp_support()
logger.info(
"Kimi-K3 DCP keeps decode attention backend 'cutedsl_mla' "
f"(prefill={prefill_backend!r} -> 'trtllm_mla')."View on GitHub (pinned to 0132848349)
Solutions
- Set SGLANG_RAGGED_VERIFY_MODE=static (or unset it if static is the default)
- Remove compact/cap_accept from launch scripts/Dockerfiles for Kimi-K3 DCP runs
- If you need those modes, disable DCP for this model
Example fix
# before export SGLANG_RAGGED_VERIFY_MODE=compact # after export SGLANG_RAGGED_VERIFY_MODE=static
Defensive patterns
Strategy: validation
Validate before calling
import os
mode = os.environ.get('SGLANG_RAGGED_VERIFY_MODE', 'static')
assert mode == 'static', f'unset/override SGLANG_RAGGED_VERIFY_MODE for Kimi-K3 DCP (got {mode})' Try / catch
except ValueError as e:
if 'RAGGED_VERIFY_MODE' in str(e):
os.environ['SGLANG_RAGGED_VERIFY_MODE'] = 'static'; retry()
raise Prevention
- Don't export SGLANG_RAGGED_VERIFY_MODE in base images
- Per-run env scrubbing before DCP launches
When it happens
Trigger: Env SGLANG_RAGGED_VERIFY_MODE set to compact or cap_accept while running Kimi-K3 with DCP and DSPARK spec decoding; read_ragged_verify_mode() returns a non-STATIC mode in _kimi_k3_overrides.
Common situations: Tuning ragged verify mode for throughput on non-DCP setups and leaving the env exported in shell profiles or Docker ENV; shared cluster images with the var pre-set.
Related errors
- DSpark with dp attention + moe_a2a_backend={} requires SGLAN
- DSV4 ragged verify does not support context parallel (CP); s
- DSpark speculative_num_draft_tokens must be >= 2 (= gamma +
- Invalid ltx2_two_stage_device_mode={mode!r}. Expected one of
- --enable-hisparse is not supported with the unified-KV path
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/d7326ee57f8a95e6.
Report an issue: GitHub.