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
76915d68
Unverified
Commit
76915d68
authored
Aug 08, 2025
by
Xiaoyu Zhang
Committed by
GitHub
Aug 07, 2025
Browse files
Fix enable flashinfer mxfp4 moe bf16 check (#8950)
parent
39fd1788
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
python/sglang/srt/server_args.py
python/sglang/srt/server_args.py
+9
-8
No files found.
python/sglang/srt/server_args.py
View file @
76915d68
...
@@ -476,8 +476,15 @@ class ServerArgs:
...
@@ -476,8 +476,15 @@ class ServerArgs:
self
.
attention_backend
==
"trtllm_mha"
self
.
attention_backend
==
"trtllm_mha"
or
self
.
attention_backend
==
"triton"
or
self
.
attention_backend
==
"triton"
)
)
quantization_config
=
getattr
(
self
.
get_hf_config
(),
"quantization_config"
,
None
)
is_mxfp4_quant_format
=
(
quantization_config
is
not
None
and
quantization_config
.
get
(
"quant_method"
)
==
"mxfp4"
)
if
is_sm100_supported
():
if
is_sm100_supported
()
and
is_mxfp4_quant_format
:
self
.
enable_flashinfer_mxfp4_moe
=
True
self
.
enable_flashinfer_mxfp4_moe
=
True
self
.
enable_triton_kernel_moe
=
False
self
.
enable_triton_kernel_moe
=
False
else
:
else
:
...
@@ -485,13 +492,7 @@ class ServerArgs:
...
@@ -485,13 +492,7 @@ class ServerArgs:
self
.
disable_hybrid_swa_memory
=
True
self
.
disable_hybrid_swa_memory
=
True
quantization_config
=
getattr
(
if
is_mxfp4_quant_format
:
self
.
get_hf_config
(),
"quantization_config"
,
None
)
if
(
quantization_config
is
not
None
and
quantization_config
.
get
(
"quant_method"
)
==
"mxfp4"
):
# use bf16 for mxfp4 triton kernels
# use bf16 for mxfp4 triton kernels
self
.
dtype
=
"bfloat16"
self
.
dtype
=
"bfloat16"
...
...
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