[Bugfix][Spec Decode] DSpark: inherit the target's attention backend when the speculative config names none (#52288)

Yongye Zhu committed Aug 14, 2026 at 18:32 UTC acb0f1dcdb668d90bbbf50e57552d2f6f0987c87
1 file changed +7 -1
vllm/v1/worker/gpu/spec_decode/dspark/utils.py
+7 -1
@@ -21,12 +21,18 @@ def load_dspark_model(target_model: nn.Module, vllm_config: VllmConfig) -> nn.Mo
21 from vllm.model_executor.models.qwen3_dflash import dflash_has_any_non_causal
22 from vllm.model_executor.models.utils import get_draft_quant_config
23
24 + # None re-runs backend auto-selection for the draft, which can pick a
25 + # different attention class than the target; fall back to the target's.
26 + draft_attention_backend = (
27 + speculative_config.attention_backend or vllm_config.attention_config.backend
28 + )
29 +
30 draft_vllm_config = replace(
31 vllm_config,
32 attention_config=replace(
33 vllm_config.attention_config,
34 use_non_causal=dflash_has_any_non_causal(draft_model_config.hf_config),
29 - backend=speculative_config.attention_backend,
35 + backend=draft_attention_backend,
36 ),
37 cache_config=(
38 replace(