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
bf3e7149
Unverified
Commit
bf3e7149
authored
Oct 11, 2025
by
fzyzcjy
Committed by
GitHub
Oct 11, 2025
Browse files
Fix enable_v2 in int8 quant (#11470)
parent
f5754d12
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
python/sglang/srt/layers/quantization/int8_kernel.py
python/sglang/srt/layers/quantization/int8_kernel.py
+13
-6
No files found.
python/sglang/srt/layers/quantization/int8_kernel.py
View file @
bf3e7149
...
...
@@ -15,10 +15,12 @@ if _is_cuda:
# Temporary
try
:
from
sgl_kernel
import
sgl_per_token_group_quant_8bit
enable_sgl_per_token_group_quant_8bit
=
True
except
ImportError
:
from
sgl_kernel
import
(
sgl_per_token_group_quant_int8
as
sgl_per_token_group_quant_8bit
,
)
from
sgl_kernel
import
sgl_per_token_group_quant_int8
enable_sgl_per_token_group_quant_8bit
=
False
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -211,9 +213,14 @@ def sglang_per_token_group_quant_int8(
dtype
=
torch
.
float32
,
)
sgl_per_token_group_quant_8bit
(
x
,
x_q
,
x_s
,
group_size
,
eps
,
int8_min
,
int8_max
,
enable_v2
=
enable_v2
)
# Temporary
if
enable_sgl_per_token_group_quant_8bit
:
sgl_per_token_group_quant_8bit
(
x
,
x_q
,
x_s
,
group_size
,
eps
,
int8_min
,
int8_max
,
enable_v2
=
enable_v2
)
else
:
assert
not
enable_v2
sgl_per_token_group_quant_int8
(
x
,
x_q
,
x_s
,
group_size
,
eps
,
int8_min
,
int8_max
)
return
x_q
,
x_s
...
...
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