[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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user