Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
c01a1df5
Unverified
Commit
c01a1df5
authored
Jul 03, 2025
by
yilian49
Committed by
GitHub
Jul 03, 2025
Browse files
[Bug] add flashinfer bool check for fusedmoe in Qwen moe models (#7723)
parent
00991723
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
python/sglang/srt/models/qwen2_moe.py
python/sglang/srt/models/qwen2_moe.py
+9
-0
python/sglang/srt/models/qwen3_moe.py
python/sglang/srt/models/qwen3_moe.py
+9
-0
No files found.
python/sglang/srt/models/qwen2_moe.py
View file @
c01a1df5
...
@@ -143,6 +143,15 @@ class Qwen2MoeSparseMoeBlock(nn.Module):
...
@@ -143,6 +143,15 @@ class Qwen2MoeSparseMoeBlock(nn.Module):
renormalize
=
config
.
norm_topk_prob
,
renormalize
=
config
.
norm_topk_prob
,
quant_config
=
quant_config
,
quant_config
=
quant_config
,
prefix
=
add_prefix
(
"experts"
,
prefix
),
prefix
=
add_prefix
(
"experts"
,
prefix
),
# Additional args for FusedMoE
**
(
dict
(
enable_flashinfer_moe
=
True
,
enable_ep_moe
=
global_server_args_dict
[
"enable_ep_moe"
],
)
if
global_server_args_dict
[
"enable_flashinfer_moe"
]
else
{}
),
)
)
self
.
gate
=
ReplicatedLinear
(
self
.
gate
=
ReplicatedLinear
(
...
...
python/sglang/srt/models/qwen3_moe.py
View file @
c01a1df5
...
@@ -117,6 +117,15 @@ class Qwen3MoeSparseMoeBlock(nn.Module):
...
@@ -117,6 +117,15 @@ class Qwen3MoeSparseMoeBlock(nn.Module):
if
global_server_args_dict
[
"enable_deepep_moe"
]
if
global_server_args_dict
[
"enable_deepep_moe"
]
else
{}
else
{}
),
),
# Additional args for FusedMoE
**
(
dict
(
enable_flashinfer_moe
=
True
,
enable_ep_moe
=
global_server_args_dict
[
"enable_ep_moe"
],
)
if
global_server_args_dict
[
"enable_flashinfer_moe"
]
else
{}
),
)
)
self
.
gate
=
ReplicatedLinear
(
self
.
gate
=
ReplicatedLinear
(
...
...
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