[Bugfix][Spec Decode] Take the DFlash draft's RoPE layout from its own config (#54373)

Signed-off-by: SubSir <tiancaizhangdaxian@sjtu.edu.cn>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Zihan Zhang
2026-08-31 18:13:20 -04:00
committed by GitHub
co-authored by Claude Opus 5
parent 24d42f3553
commit d61b6e1878
3 changed files with 5 additions and 46 deletions
-15
View File
@@ -80,21 +80,6 @@ class DFlashProposer(SpecDecodeBaseProposer):
self.draft_model_config.hf_config
)
@override
def load_model(self, target_model: torch.nn.Module) -> None:
from vllm.model_executor.models.qwen3_dflash import (
dflash_target_rope_is_neox_style,
)
draft_model_config = self.speculative_config.draft_model_config
assert draft_model_config is not None
# The drafter must rotate Q/K the way its target does. Take that from the
# built target before super() constructs the draft.
is_neox_style = dflash_target_rope_is_neox_style(target_model)
if is_neox_style is not None:
draft_model_config.hf_config.is_neox_style = is_neox_style
super().load_model(target_model)
@override
def _create_draft_vllm_config(self) -> VllmConfig:
base = super()._create_draft_vllm_config()