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
4a946680
"ssh:/git@developer.sourcefind.cn:2222/OpenDAS/vllm_cscc.git" did not exist on "b364c176a29ede950c27693bf72d9cbb28557fb6"
Commit
4a946680
authored
Sep 01, 2025
by
zhuwenwen
Browse files
[BugFix]支持v1 engine pp deepseek
parent
6a7954f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
vllm/model_executor/models/deepseek_v2.py
vllm/model_executor/models/deepseek_v2.py
+5
-2
No files found.
vllm/model_executor/models/deepseek_v2.py
View file @
4a946680
...
@@ -766,14 +766,17 @@ class DeepseekV2ForCausalLM(nn.Module, SupportsPP, MixtureOfExperts):
...
@@ -766,14 +766,17 @@ class DeepseekV2ForCausalLM(nn.Module, SupportsPP, MixtureOfExperts):
self
.
num_expert_groups
=
config
.
n_group
self
.
num_expert_groups
=
config
.
n_group
self
.
moe_layers
:
list
[
FusedMoE
]
=
[]
self
.
moe_layers
:
list
[
FusedMoE
]
=
[]
example_moe
=
None
for
layer
in
self
.
model
.
layers
:
for
layer
in
self
.
model
.
layers
:
if
isinstance
(
layer
,
PPMissingLayer
):
continue
assert
isinstance
(
layer
,
DeepseekV2DecoderLayer
)
assert
isinstance
(
layer
,
DeepseekV2DecoderLayer
)
if
isinstance
(
layer
.
mlp
,
DeepseekV2MoE
):
if
isinstance
(
layer
.
mlp
,
DeepseekV2MoE
):
example_moe
=
layer
.
mlp
self
.
moe_layers
.
append
(
layer
.
mlp
.
experts
)
self
.
moe_layers
.
append
(
layer
.
mlp
.
experts
)
# Pick last one layer since the first ones may be dense layers.
# Pick last one layer since the first ones may be dense layers.
example_moe
=
typing
.
cast
(
DeepseekV2MoE
,
self
.
model
.
layers
[
config
.
num_hidden_layers
-
1
].
mlp
)
self
.
num_logical_experts
=
example_moe
.
n_logical_experts
self
.
num_logical_experts
=
example_moe
.
n_logical_experts
self
.
num_physical_experts
=
example_moe
.
n_physical_experts
self
.
num_physical_experts
=
example_moe
.
n_physical_experts
self
.
num_local_physical_experts
=
example_moe
.
n_local_physical_experts
self
.
num_local_physical_experts
=
example_moe
.
n_local_physical_experts
...
...
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