Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
14dc2b30
Commit
14dc2b30
authored
Nov 30, 2025
by
王敏
Browse files
[fix]解决deepseek模型cudagraph模式下精度异常问题
parent
09c2856a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
vllm/model_executor/models/deepseek_v2.py
vllm/model_executor/models/deepseek_v2.py
+7
-2
No files found.
vllm/model_executor/models/deepseek_v2.py
View file @
14dc2b30
...
...
@@ -181,8 +181,13 @@ class DeepseekV2MoE(nn.Module):
quant_config
=
None
,
prefix
=
f
"
{
prefix
}
.gate"
)
if
config
.
topk_method
==
"noaux_tc"
:
self
.
gate
.
e_score_correction_bias
=
nn
.
Parameter
(
torch
.
empty
(
config
.
n_routed_experts
,
dtype
=
torch
.
float32
))
if
envs
.
VLLM_ENABLE_MOE_FUSED_GATE
:
# avoid moe_fused_gate precision error
self
.
gate
.
e_score_correction_bias
=
nn
.
Parameter
(
torch
.
empty
(
config
.
n_routed_experts
))
else
:
self
.
gate
.
e_score_correction_bias
=
nn
.
Parameter
(
torch
.
empty
(
config
.
n_routed_experts
,
dtype
=
torch
.
float32
))
else
:
self
.
gate
.
e_score_correction_bias
=
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment