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
ad6c2e1a
Unverified
Commit
ad6c2e1a
authored
Jul 09, 2025
by
Seiji Eicher
Committed by
GitHub
Jul 09, 2025
Browse files
Correct PPMissingLayer handling in Deepseek-V2-Lite PP deployment (#20665)
Signed-off-by:
Seiji Eicher
<
seiji@anyscale.com
>
parent
49e8c7ea
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
vllm/model_executor/models/deepseek_v2.py
vllm/model_executor/models/deepseek_v2.py
+9
-3
No files found.
vllm/model_executor/models/deepseek_v2.py
View file @
ad6c2e1a
...
...
@@ -739,14 +739,20 @@ class DeepseekV2ForCausalLM(nn.Module, SupportsPP, MixtureOfExperts):
self
.
num_expert_groups
=
config
.
n_group
self
.
moe_layers
:
list
[
FusedMoE
]
=
[]
example_moe
=
None
for
layer
in
self
.
model
.
layers
:
if
isinstance
(
layer
,
PPMissingLayer
):
continue
assert
isinstance
(
layer
,
DeepseekV2DecoderLayer
)
if
isinstance
(
layer
.
mlp
,
DeepseekV2MoE
):
# Pick last one layer since the first ones may be dense layers.
example_moe
=
layer
.
mlp
self
.
moe_layers
.
append
(
layer
.
mlp
.
experts
)
# 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
)
if
example_moe
is
None
:
raise
RuntimeError
(
"No DeepseekV2MoE layer found in model.layers."
)
self
.
num_logical_experts
=
example_moe
.
n_logical_experts
self
.
num_physical_experts
=
example_moe
.
n_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