[Bugfix][Spec Decode] Fix EAGLE3 DeepSeek draft crash on non-YaRN rope configs (#51092)

Signed-off-by: zixi-qi <zixi@inferact.ai>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
qizixi
2026-08-05 14:10:52 +08:00
committed by GitHub
co-authored by Claude Opus 5
parent 50c51682a1
commit 4719a9b8f5
@@ -3,7 +3,6 @@
"""Eagle3 speculative decoding model for DeepseekV2/V3 with MLP (no MoE)."""
import copy
from collections.abc import Iterable
import torch
@@ -58,7 +57,6 @@ class DeepseekV2Eagle3DecoderLayer(nn.Module):
quant_config = get_draft_quant_config(vllm_config)
self.hidden_size = config.hidden_size
rope_scaling = getattr(config, "rope_scaling", None)
max_position_embeddings = getattr(config, "max_position_embeddings", 8192)
self.layer_idx = layer_idx
@@ -68,13 +66,6 @@ class DeepseekV2Eagle3DecoderLayer(nn.Module):
qk_rope_head_dim = getattr(config, "qk_rope_head_dim", 0)
v_head_dim = getattr(config, "v_head_dim", 0)
kv_lora_rank = getattr(config, "kv_lora_rank", 0)
config = copy.copy(config)
if rope_scaling:
rope_params = rope_scaling.copy()
rope_params["rope_type"] = "deepseek_yarn"
else:
rope_params = {"rope_type": "default"}
config.rope_parameters = rope_params
self.self_attn = DeepseekV2MLAAttention(
vllm_config=vllm_config,
config=config,