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
34f7564d
Unverified
Commit
34f7564d
authored
Nov 04, 2025
by
Kaixi Hou
Committed by
GitHub
Nov 04, 2025
Browse files
[NVIDIA] Fix wrong symmetric sizes for fp4 cases (#12640)
parent
1cfbbc42
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
python/sglang/srt/layers/quantization/modelopt_quant.py
python/sglang/srt/layers/quantization/modelopt_quant.py
+6
-1
No files found.
python/sglang/srt/layers/quantization/modelopt_quant.py
View file @
34f7564d
...
...
@@ -1602,8 +1602,13 @@ class ModelOptNvFp4FusedMoEMethod(FusedMoEMethodBase):
x_sf
=
nvfp4_block_scale_interleave
(
x_sf
)
with
use_symmetric_memory
(
get_tp_group
())
as
sm
:
# The x might be packed in the case of fp4. So, use the output dim of the
# weight of the second GEMM.
symm_output
=
torch
.
empty
(
x
.
shape
[
0
],
x
.
shape
[
1
],
dtype
=
output_dtype
,
device
=
x
.
device
x
.
shape
[
0
],
layer
.
w2_weight
.
shape
[
1
],
dtype
=
output_dtype
,
device
=
x
.
device
,
)
sm
.
tag
(
symm_output
)
...
...
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