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
b33ff2d6
Commit
b33ff2d6
authored
Sep 25, 2025
by
zhuwenwen
Browse files
add shared_output and routed_scaling_factor of w4a8
parent
49810c37
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
vllm/model_executor/layers/fused_moe/fused_moe.py
vllm/model_executor/layers/fused_moe/fused_moe.py
+2
-3
vllm/model_executor/layers/quantization/slimquant_w4a8.py
vllm/model_executor/layers/quantization/slimquant_w4a8.py
+3
-0
No files found.
vllm/model_executor/layers/fused_moe/fused_moe.py
View file @
b33ff2d6
...
...
@@ -1771,7 +1771,6 @@ def fused_experts_impl(
use_nn_moe
=
use_nn_moe
)
if
envs
.
VLLM_USE_LIGHTOP
and
not
dpsk_fp16_quick
:
if
shared_output
is
not
None
:
op
.
moe_sum
(
intermediate_cache3
.
view
(
*
intermediate_cache3
.
size
()),
out_hidden_states
[
begin_chunk_idx
:
end_chunk_idx
],
shared_output
[
begin_chunk_idx
:
end_chunk_idx
],
None
,
routed_scaling_factor
)
# else:
...
...
vllm/model_executor/layers/quantization/slimquant_w4a8.py
View file @
b33ff2d6
...
...
@@ -358,6 +358,7 @@ class SlimQuantW4A8Int8MoEMethod:
use_nn_moe
:
Optional
[
bool
]
=
False
,
routed_scaling_factor
:
Optional
[
float
]
=
None
,
use_fused_gate
:
Optional
[
bool
]
=
False
,
shared_output
:
Optional
[
torch
.
Tensor
]
=
None
,
**
_
)
->
torch
.
Tensor
:
from
vllm.model_executor.layers.fused_moe
import
fused_experts
...
...
@@ -398,4 +399,6 @@ class SlimQuantW4A8Int8MoEMethod:
a1_scale
=
layer
.
w13_input_scale
,
a2_scale
=
layer
.
w2_input_scale
,
use_nn_moe
=
use_nn_moe
,
shared_output
=
shared_output
,
routed_scaling_factor
=
routed_scaling_factor
,
)
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