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
0812d8dd
Unverified
Commit
0812d8dd
authored
Apr 05, 2025
by
liuzhenwei
Committed by
GitHub
Apr 04, 2025
Browse files
[Hardware][Gaudi][BugFix] fix arguments of hpu fused moe (#15945)
Signed-off-by:
zhenwei
<
zhenweiliu@habana.ai
>
parent
bf7e3c51
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
vllm/model_executor/layers/fused_moe/layer.py
vllm/model_executor/layers/fused_moe/layer.py
+5
-2
No files found.
vllm/model_executor/layers/fused_moe/layer.py
View file @
0812d8dd
...
@@ -254,9 +254,12 @@ class UnquantizedFusedMoEMethod(FusedMoEMethodBase, CustomOp):
...
@@ -254,9 +254,12 @@ class UnquantizedFusedMoEMethod(FusedMoEMethodBase, CustomOp):
renormalize
:
bool
,
renormalize
:
bool
,
topk_group
:
Optional
[
int
]
=
None
,
topk_group
:
Optional
[
int
]
=
None
,
num_expert_group
:
Optional
[
int
]
=
None
,
num_expert_group
:
Optional
[
int
]
=
None
,
global_num_experts
:
int
=
-
1
,
expert_map
:
Optional
[
torch
.
Tensor
]
=
None
,
custom_routing_function
:
Optional
[
Callable
]
=
None
,
custom_routing_function
:
Optional
[
Callable
]
=
None
,
scoring_func
:
str
=
"softmax"
,
scoring_func
:
str
=
"softmax"
,
e_score_correction_bias
:
Optional
[
torch
.
Tensor
]
=
None
e_score_correction_bias
:
Optional
[
torch
.
Tensor
]
=
None
,
activation
:
str
=
"silu"
,
)
->
torch
.
Tensor
:
)
->
torch
.
Tensor
:
assert
not
use_grouped_topk
assert
not
use_grouped_topk
assert
num_expert_group
is
None
assert
num_expert_group
is
None
...
@@ -472,7 +475,7 @@ class FusedMoE(torch.nn.Module):
...
@@ -472,7 +475,7 @@ class FusedMoE(torch.nn.Module):
"non-grouped topk."
)
"non-grouped topk."
)
if
current_platform
.
is_hpu
():
if
current_platform
.
is_hpu
():
from
vllm_hpu_extension.ops
import
DynamicFusedMOE
from
vllm_hpu_extension.ops
import
DynamicFusedMOE
self
.
hpu_fused_moe
=
DynamicFusedMOE
(
self
.
num_experts
)
self
.
hpu_fused_moe
=
DynamicFusedMOE
(
self
.
global_
num_experts
)
# Note: get_quant_method will look at the layer's local_num_experts
# Note: get_quant_method will look at the layer's local_num_experts
# for heuristic purposes, so it must be initialized first.
# for heuristic purposes, so it must be initialized first.
...
...
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