vllm-project/vllm · error · ValueError
MLA DSpark does not currently support decode context paralle
Error message
MLA DSpark does not currently support decode context parallelism; set decode_context_parallel_size=1.
What it means
Raised when the speculative method is 'dspark', the draft model architecture is K3DSparkModel (an MLA-style DSpark draft), and the target parallel config has decode_context_parallel_size > 1. The MLA DSpark drafting path does not implement decode context parallelism, so vLLM refuses the combination at config validation rather than producing incorrect results.
Source
Thrown at vllm/config/speculative.py:1054
getattr(hf, "dspark_target_layer_ids", None) is None
and getattr(hf, "target_layer_ids", None) is not None
):
hf.dspark_target_layer_ids = hf.target_layer_ids
if (
getattr(hf, "n_predict", None) is None
and getattr(hf, "block_size", None) is not None
):
hf.n_predict = hf.block_size
if self.method in ("dflash", "dspark"):
self.parallel_drafting = True
if (
self.method == "dspark"
and "K3DSparkModel" in self.draft_model_config.architectures
and self.target_parallel_config.decode_context_parallel_size > 1
):
raise ValueError(
"MLA DSpark does not currently support decode context "
"parallelism; set decode_context_parallel_size=1."
)
if self.num_speculative_tokens is not None and hasattr(
self.draft_model_config.hf_config, "num_lookahead_tokens"
):
self.draft_model_config.hf_config.num_lookahead_tokens = (
self.num_speculative_tokens
)
n_predict = getattr(
self.draft_model_config.hf_config, "n_predict", None
)
if n_predict is not None:
if self.num_speculative_tokens is None:
# Default to max value defined in draft model config.
self.num_speculative_tokens = n_predictView on GitHub (pinned to c794754062)
Solutions
- Set decode_context_parallel_size=1 for this deployment
- Use a non-MLA DSpark draft architecture if you must keep decode context parallelism
- Drop speculative decoding (method=dspark) if decode context parallelism is the hard requirement
Example fix
# before
vllm serve model --speculative-config '{"method": "dspark", "model": "k3-draft"}' -decode-context-parallel-size 4
# after
vllm serve model --speculative-config '{"method": "dspark", "model": "k3-draft"}' -decode-context-parallel-size 1 Defensive patterns
Strategy: validation
Validate before calling
if spec_cfg.get("method") == "dspark" and dcp_size > 1:
# K3DSpark (MLA) drafts reject decode context parallelism
raise ValueError("set decode_context_parallel_size=1 when using an MLA DSpark draft") Type guard
def dspark_allows_dcp(draft_architectures: list[str], dcp_size: int) -> bool:
return dcp_size == 1 or "K3DSparkModel" not in draft_architectures Prevention
- When changing draft models, re-validate parallel-config combinations, not just the speculative block
- Encode the deployment's constraints (method x DCP) as a pre-launch assertion in your serving wrapper
When it happens
Trigger: Launching with --speculative-config method=dspark plus a K3DSpark draft and -decode-context-parallel-size (or decode_context_parallel_size in ParallelConfig) greater than 1.
Common situations: Reusing a decode-context-parallel launch template (tuned for long-context throughput) when switching the draft model to a K3DSpark/MLA variant; enabling DCP cluster-wide via env or defaults while adding speculative decoding.
Related errors
- target_model_config must be present for dspark
- dspark_draft_topk is only supported by DSpark
- rejection_sample_method='synthetic' requires exactly one of
- synthetic_acceptance_rates must have length {n}, got {rates}
- synthetic_acceptance_rates entries must be in [0, 1], got {r
AI-assisted analysis of vllm-project/vllm@c794754062 (2026-08-14).
Data as JSON: /api/errors/10aeac18e04722fd.
Report an issue: GitHub.