[BugFix][SpecDecode] Fix dspark parallel_drafting_token_id init bug (#51602)
Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com> Co-authored-by: Benjamin Chislett <bchislett@nvidia.com>
wangxiyuan committed
Aug 11, 2026 at 01:33 UTC
355a338b8f54befed4ab23a9f09aff301de26b4f
1 file changed
+7
-2
vllm/v1/spec_decode/llm_base_proposer.py
+7
-2
@@ -357,6 +357,10 @@ class SpecDecodeBaseProposer:
357
dflash_config = getattr(model_hf_config, "dflash_config", None)
358
if dflash_config and "mask_token_id" in dflash_config:
359
self.parallel_drafting_token_id = dflash_config["mask_token_id"]
360
+ elif getattr(model_hf_config, "mask_token_id", None) is not None:
361
+ self.parallel_drafting_token_id = model_hf_config.mask_token_id
362
+ elif hasattr(model_hf_config, "dspark_noise_token_id"):
363
+ self.parallel_drafting_token_id = model_hf_config.dspark_noise_token_id
364
elif hasattr(model_hf_config, "pard_token"):
365
self.parallel_drafting_token_id = model_hf_config.pard_token
366
elif hasattr(model_hf_config, "ptd_token_id"):
@@ -364,8 +368,9 @@ class SpecDecodeBaseProposer:
368
else:
369
raise ValueError(
370
"For parallel drafting, the draft model config must have "
367
- "`pard_token`, `ptd_token_id`, or "
368
- "`dflash_config.mask_token_id` specified in its config.json."
371
+ "`dflash_config.mask_token_id`, `mask_token_id`, "
372
+ "`dspark_noise_token_id`, `pard_token`, or `ptd_token_id` "
373
+ "specified in its config.json."
374
)
375
376
if self.pass_hidden_states_to_model: