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
e0ba23b5
"...git@developer.sourcefind.cn:2222/OpenDAS/vllm_cscc.git" did not exist on "e858bc4d1490808e23bbc32e17202ebbf8713a76"
Commit
e0ba23b5
authored
Sep 30, 2025
by
王敏
Browse files
修复部分代码
parent
46e26bf1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
vllm/model_executor/models/deepseek_v2.py
vllm/model_executor/models/deepseek_v2.py
+12
-6
No files found.
vllm/model_executor/models/deepseek_v2.py
View file @
e0ba23b5
...
@@ -227,15 +227,21 @@ class DeepseekV2MoE(nn.Module):
...
@@ -227,15 +227,21 @@ class DeepseekV2MoE(nn.Module):
router_logits
,
_
=
self
.
gate
(
hidden_states
)
router_logits
,
_
=
self
.
gate
(
hidden_states
)
if
not
self
.
use_mori_ep
:
if
not
self
.
use_mori_ep
:
if
hidden_states
.
dtype
!=
torch
.
float16
:
if
envs
.
VLLM_USE_LIGHTOP
and
not
self
.
dpsk_fp16_quick
:
final_hidden_states
=
self
.
experts
(
final_hidden_states
=
self
.
experts
(
hidden_states
=
hidden_states
,
hidden_states
=
hidden_states
,
router_logits
=
router_logits
)
*
self
.
routed_scaling_factor
router_logits
=
router_logits
,
shared_output
=
shared_output
)
else
:
else
:
# Fix FP16 overflow
if
hidden_states
.
dtype
!=
torch
.
float16
or
self
.
dpsk_fp16_quick
:
# See DeepseekV2DecoderLayer for more details.
final_hidden_states
=
self
.
experts
(
final_hidden_states
=
self
.
experts
(
hidden_states
=
hidden_states
,
hidden_states
=
hidden_states
,
router_logits
=
router_logits
)
router_logits
=
router_logits
)
*
self
.
routed_scaling_factor
else
:
# Fix FP16 overflow
# See DeepseekV2DecoderLayer for more details.
final_hidden_states
=
self
.
experts
(
hidden_states
=
hidden_states
,
router_logits
=
router_logits
)
else
:
else
:
final_hidden_states
=
self
.
experts
(
hidden_states
=
hidden_states
,
final_hidden_states
=
self
.
experts
(
hidden_states
=
hidden_states
,
router_logits
=
router_logits
)
router_logits
=
router_logits
)
...
...
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