A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
[Bug] R1 Accuracy: Fix `routed_scaling_factor` Double Mul Issue (#24119)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Wentao Ye committed
Sep 2, 2025 at 18:22 UTC
930a24144c073a08cfecabd75a242e713bc4f57e
1 file changed
+2
-1
vllm/model_executor/models/deepseek_v2.py
+2
-1
@@ -160,7 +160,8 @@ class DeepseekV2MoE(nn.Module):
160
topk_group=config.topk_group,
161
prefix=f"{prefix}.experts",
162
scoring_func=config.scoring_func,
163
- routed_scaling_factor=self.routed_scaling_factor,
163
+ # we do scaling outside, set factor to 1.0 to avoid double mul
164
+ routed_scaling_factor=1.0,
165
e_score_correction_bias=self.gate.e_score_correction_bias,
166
enable_eplb=self.enable_eplb,
167
num_redundant_experts=self.n_redundant_experts)