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
2562e027
Unverified
Commit
2562e027
authored
Feb 27, 2026
by
Matthew Bonanni
Committed by
GitHub
Feb 28, 2026
Browse files
[MTP] Validate that MTP weights are actually loaded (#35548)
Signed-off-by:
Matthew Bonanni
<
mbonanni@redhat.com
>
parent
fd68cd13
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
vllm/model_executor/models/deepseek_mtp.py
vllm/model_executor/models/deepseek_mtp.py
+20
-0
No files found.
vllm/model_executor/models/deepseek_mtp.py
View file @
2562e027
...
...
@@ -415,6 +415,26 @@ class DeepSeekMTP(nn.Module, DeepseekV2MixtureOfExperts):
weight_loader
(
param
,
loaded_weight
)
if
not
is_fusion_moe_shared_experts_layer
:
loaded_params
.
add
(
name
)
# Validate that weights were loaded for each expected MTP layer.
loaded_layers
:
set
[
int
]
=
set
()
for
param_name
in
loaded_params
:
spec_layer
=
get_spec_layer_idx_from_weight_name
(
self
.
config
,
param_name
)
if
spec_layer
is
not
None
:
loaded_layers
.
add
(
spec_layer
)
for
layer_idx
in
range
(
self
.
model
.
mtp_start_layer_idx
,
self
.
model
.
mtp_start_layer_idx
+
self
.
model
.
num_mtp_layers
,
):
if
layer_idx
not
in
loaded_layers
:
raise
ValueError
(
f
"MTP speculative decoding layer
{
layer_idx
}
weights "
f
"missing from checkpoint. The checkpoint may have "
f
"been quantized without including the MTP layers. "
f
"Use a checkpoint that includes MTP layer weights, "
f
"or disable speculative decoding."
)
return
loaded_params
def
_rewrite_spec_layer_name
(
self
,
spec_layer
:
int
,
name
:
str
)
->
str
:
...
...
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