[Bugfix] Reapply 50869 (#52223)
Signed-off-by: Benjamin Chislett <bchislett@nvidia.com>
Benjamin Chislett committed
Aug 13, 2026 at 18:08 UTC
51def7848a68397213f83f90893cafb275ff4d3f
1 file changed
-24
vllm/config/speculative.py
-24
@@ -1096,30 +1096,6 @@ class SpeculativeConfig:
1096
1097
dspark_draft_topk = None
1098
if self.method == "dspark":
1099
- # DSpark is a semi-autoregressive *block* drafter. A
1100
- # speculative length smaller than the checkpoint's block
1101
- # feeds the block / Markov-head machinery an unsupported
1102
- # layout and yields incorrect (garbled) output rather than
1103
- # merely lower acceptance. Require num_speculative_tokens to
1104
- # be at least the block size (e.g. 5 or 7 for DeepSeek-V4).
1105
- dspark_block_size = getattr(
1106
- self.draft_model_config.hf_config,
1107
- "dspark_block_size",
1108
- None,
1109
- )
1110
- if (
1111
- dspark_block_size is not None
1112
- and self.num_speculative_tokens < dspark_block_size
1113
- ):
1114
- raise ValueError(
1115
- "DSpark requires num_speculative_tokens >= "
1116
- f"dspark_block_size ({dspark_block_size}); got "
1117
- f"{self.num_speculative_tokens}. Smaller values "
1118
- "produce incorrect output. Use "
1119
- f"num_speculative_tokens={dspark_block_size} or "
1120
- "larger (e.g. 7)."
1121
- )
1122
-
1099
hf_config = self.draft_model_config.hf_config
1100
dspark_draft_topk = self.dspark_draft_topk
1101
if dspark_draft_topk is None: