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
385599cb
"tools/deployment/test_torchserver.py" did not exist on "cbc2491f556f8f92b141d7a81e08c79beef4515c"
Unverified
Commit
385599cb
authored
Nov 04, 2025
by
fzyzcjy
Committed by
GitHub
Nov 03, 2025
Browse files
Fix error when calling quantization (#12548)
parent
952fbe47
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
python/sglang/srt/layers/quantization/modelopt_quant.py
python/sglang/srt/layers/quantization/modelopt_quant.py
+3
-1
No files found.
python/sglang/srt/layers/quantization/modelopt_quant.py
View file @
385599cb
...
...
@@ -56,6 +56,8 @@ try:
from
flashinfer
import
fp4_quantize
else
:
from
sgl_kernel
import
scaled_fp4_quant
as
fp4_quantize
from
flashinfer
import
fp4_quantize
as
fp4_quantize_flashinfer
except
ImportError
:
fp4_quantize
=
None
...
...
@@ -1571,7 +1573,7 @@ class ModelOptNvFp4FusedMoEMethod(FusedMoEMethodBase):
# Quantize before comm, swizzle after.
if
x
.
shape
[
0
]
>
0
:
x
,
x_sf
=
fp4_quantize
(
x
,
x_sf
=
fp4_quantize
_flashinfer
(
x
,
layer
.
w13_input_scale_quant
,
is_sf_swizzled_layout
=
False
)
else
:
...
...
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