Your current environment
- vLLM version:
0.23.1rc1.dev788+gfa4321de3
- torch:
2.11.0+cu129
- GPU: NVIDIA H200 (SM90), 8× GPU
- Model:
deepseek-ai/DeepSeek-V4-Flash-DSpark (local path /data/models/DeepSeek-V4-Flash-DSpark)
- Command used:
vllm serve /data/models/DeepSeek-V4-Flash-DSpark \
--trust-remote-code \
--tensor-parallel-size 8 \
--kv-cache-dtype fp8 \
--block-size 256 \
--max-model-len auto \
--max-num-seqs 256 \
--tokenizer-mode deepseek_v4 \
--reasoning-parser deepseek_v4 \
--spec-method dspark \
--spec-model /data/models/DeepSeek-V4-Flash-DSpark \
--spec-tokens 5 \
--port 30004
🐛 Describe the bug
Serving DeepSeek-V4-Flash-DSpark without speculative decoding works. Enabling DSpark speculative decoding (--spec-method dspark) causes engine initialization to fail during KV-cache warmup of the draft model.
The model weights load successfully, including the DSpark draft weights:
(Worker_TP0 pid=...) INFO ... [dspark.py:455] DSpark draft model loaded: 96 params
Then the worker crashes in DeepseekV4FlashMLAAttention._forward_decode -> flash_mla_with_kvcache with:
RuntimeError: kv must have shape (num_blocks, page_block_size, h_kv, bytes_per_token)
Full traceback:
(Worker_TP0 pid=4109550) ERROR ... [multiproc_executor.py:1004] self.forward_mqa(q, kv, positions, out)
(Worker_TP0 pid=4109550) ERROR ... [multiproc_executor.py:1004] File ".../vllm/models/deepseek_v4/nvidia/flashmla.py", line 219, in _forward_decode
(Worker_TP0 pid=4109550) ERROR ... [multiproc_executor.py:1004] out, _ = flash_mla_with_kvcache(
...
RuntimeError: kv must have shape (num_blocks, page_block_size, h_kv, bytes_per_token)
What I tried
--kv-cache-dtype fp8 (default/expected): fails with the shape error above.
--kv-cache-dtype bfloat16: fails earlier with AssertionError: DeepseekV4 fp8_ds_mla layout only supports fp8 kv-cache, got bfloat16.
--attention-backend FLASHINFER_MLA_SPARSE_DSV4 for both target and draft: fails with Error in function 'TllmGenFmhaRunner' ... Unsupported architecture on H200/SM90.
So on H200/SM90 there appears to be no working attention backend for DeepSeek-V4-Flash-DSpark with DSpark.
Related issues/PRs
Expected behavior
DeepSeek-V4-Flash-DSpark should start successfully with --spec-method dspark on H200/SM90, or at least have a documented working attention-backend combination.
Additional context
The draft config contains:
{
"dspark_block_size": 5,
"dspark_target_layer_ids": [40, 41, 42],
"compress_ratios": [..., 4, 128, 4, 0, 0, 0]
}
The DSpark draft layers are created at indices num_hidden_layers + i (43, 44, 45) in DSparkDeepseekV4Model, while _remap_dspark_name maps checkpoint mtp.{i}.* to model.layers.{i}.* (0, 1, 2). This looks like a potential weight-loading mismatch in addition to the KV-cache shape issue.
Your current environment
0.23.1rc1.dev788+gfa4321de32.11.0+cu129deepseek-ai/DeepSeek-V4-Flash-DSpark(local path/data/models/DeepSeek-V4-Flash-DSpark)🐛 Describe the bug
Serving
DeepSeek-V4-Flash-DSparkwithout speculative decoding works. Enabling DSpark speculative decoding (--spec-method dspark) causes engine initialization to fail during KV-cache warmup of the draft model.The model weights load successfully, including the DSpark draft weights:
Then the worker crashes in
DeepseekV4FlashMLAAttention._forward_decode->flash_mla_with_kvcachewith:Full traceback:
What I tried
--kv-cache-dtype fp8(default/expected): fails with the shape error above.--kv-cache-dtype bfloat16: fails earlier withAssertionError: DeepseekV4 fp8_ds_mla layout only supports fp8 kv-cache, got bfloat16.--attention-backend FLASHINFER_MLA_SPARSE_DSV4for both target and draft: fails withError in function 'TllmGenFmhaRunner' ... Unsupported architectureon H200/SM90.So on H200/SM90 there appears to be no working attention backend for DeepSeek-V4-Flash-DSpark with DSpark.
Related issues/PRs
draft_id_to_target_idAttributeError) on H20.kv must have shapeerror but only for SM10/B200 by switching the default to FlashInfer, which does not help SM90/H200 because FlashInfer MLA sparse DSV4 reportsUnsupported architecturehere.Expected behavior
DeepSeek-V4-Flash-DSparkshould start successfully with--spec-method dsparkon H200/SM90, or at least have a documented working attention-backend combination.Additional context
The draft config contains:
{ "dspark_block_size": 5, "dspark_target_layer_ids": [40, 41, 42], "compress_ratios": [..., 4, 128, 4, 0, 0, 0] }The DSpark draft layers are created at indices
num_hidden_layers + i(43, 44, 45) inDSparkDeepseekV4Model, while_remap_dspark_namemaps checkpointmtp.{i}.*tomodel.layers.{i}.*(0, 1, 2). This looks like a potential weight-loading mismatch in addition to the KV-cache shape issue.