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
53fc1664
Unverified
Commit
53fc1664
authored
Jan 29, 2026
by
Ilya Markov
Committed by
GitHub
Jan 29, 2026
Browse files
[BugFix] Fix EPLB fail for MoeFP4 model with Marlin backend (#33262)
Signed-off-by:
ilmarkov
<
markovilya197@gmail.com
>
parent
31b25f65
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
vllm/model_executor/utils.py
vllm/model_executor/utils.py
+10
-2
No files found.
vllm/model_executor/utils.py
View file @
53fc1664
...
@@ -44,7 +44,9 @@ def set_weight_attrs(
...
@@ -44,7 +44,9 @@ def set_weight_attrs(
setattr
(
weight
,
key
,
value
)
setattr
(
weight
,
key
,
value
)
def
replace_parameter
(
layer
:
torch
.
nn
.
Module
,
param_name
:
str
,
new_data
:
torch
.
Tensor
):
def
replace_parameter
(
layer
:
torch
.
nn
.
Module
,
param_name
:
str
,
new_data
:
torch
.
Tensor
|
None
):
"""
"""
Replace a parameter of a layer while maintaining the ability to reload the weight.
Replace a parameter of a layer while maintaining the ability to reload the weight.
Called within implementations of the `process_weights_after_loading` method.
Called within implementations of the `process_weights_after_loading` method.
...
@@ -54,9 +56,15 @@ def replace_parameter(layer: torch.nn.Module, param_name: str, new_data: torch.T
...
@@ -54,9 +56,15 @@ def replace_parameter(layer: torch.nn.Module, param_name: str, new_data: torch.T
Args:
Args:
layer: Layer containing parameter to replace
layer: Layer containing parameter to replace
param_name: Name of parameter to replace
param_name: Name of parameter to replace
new_data: New data of the new parameter
new_data: New data of the new parameter
, or None to set the parameter to None
"""
"""
# should not be used on a tied/shared param
# should not be used on a tied/shared param
# If new_data is None, set the parameter to None
if
new_data
is
None
:
setattr
(
layer
,
param_name
,
None
)
return
if
isinstance
(
new_data
,
torch
.
nn
.
Parameter
):
if
isinstance
(
new_data
,
torch
.
nn
.
Parameter
):
new_data
=
new_data
.
data
new_data
=
new_data
.
data
new_param
=
torch
.
nn
.
Parameter
(
new_data
,
requires_grad
=
False
)
new_param
=
torch
.
nn
.
Parameter
(
new_data
,
requires_grad
=
False
)
...
...
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