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
741dbbbb
Commit
741dbbbb
authored
Jul 31, 2025
by
zhuwenwen
Browse files
update mlp
parent
9d5e4dd9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
vllm/model_executor/models/mlp_speculator.py
vllm/model_executor/models/mlp_speculator.py
+2
-1
No files found.
vllm/model_executor/models/mlp_speculator.py
View file @
741dbbbb
...
@@ -19,6 +19,7 @@ from vllm.model_executor.layers.linear import ColumnParallelLinear
...
@@ -19,6 +19,7 @@ from vllm.model_executor.layers.linear import ColumnParallelLinear
from
vllm.model_executor.model_loader.weight_utils
import
default_weight_loader
from
vllm.model_executor.model_loader.weight_utils
import
default_weight_loader
from
vllm
import
_custom_ops
as
ops
from
vllm
import
_custom_ops
as
ops
from
vllm.distributed
import
tensor_model_parallel_all_gather
,
tensor_model_parallel_gather
from
vllm.distributed
import
tensor_model_parallel_all_gather
,
tensor_model_parallel_gather
from
vllm
import
envs
SQRT2
=
2
**
0.5
SQRT2
=
2
**
0.5
...
@@ -215,7 +216,7 @@ class MLPSpeculator(nn.Module):
...
@@ -215,7 +216,7 @@ class MLPSpeculator(nn.Module):
weight_loader
(
param
,
loaded_weight
)
weight_loader
(
param
,
loaded_weight
)
loaded_params
.
add
(
name
)
loaded_params
.
add
(
name
)
if
self
.
use_llama_nn
:
if
self
.
use_llama_nn
or
envs
.
VLLM_USE_NN
:
if
(
os
.
environ
[
'LM_NN'
]
==
'1'
and
"head"
in
name
)
or
"proj"
in
name
:
if
(
os
.
environ
[
'LM_NN'
]
==
'1'
and
"head"
in
name
)
or
"proj"
in
name
:
_weight
=
torch
.
zeros_like
(
param
.
data
)
_weight
=
torch
.
zeros_like
(
param
.
data
)
ori_shape
=
_weight
.
shape
ori_shape
=
_weight
.
shape
...
...
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