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
cd4b39a9
Unverified
Commit
cd4b39a9
authored
Oct 07, 2025
by
Bowen Bao
Committed by
GitHub
Oct 07, 2025
Browse files
[quantization] Properly ignore quantization for layers excluded in quant_config (#11205)
parent
420c99ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
python/sglang/srt/layers/moe/fused_moe_triton/layer.py
python/sglang/srt/layers/moe/fused_moe_triton/layer.py
+5
-9
python/sglang/srt/layers/quantization/quark/quark.py
python/sglang/srt/layers/quantization/quark/quark.py
+3
-1
No files found.
python/sglang/srt/layers/moe/fused_moe_triton/layer.py
View file @
cd4b39a9
...
...
@@ -207,15 +207,11 @@ class FusedMoE(torch.nn.Module):
gemm1_clamp_limit
=
gemm1_clamp_limit
,
)
if
quant_config
is
None
:
self
.
quant_method
:
FusedMoEMethodBase
=
UnquantizedFusedMoEMethod
(
self
.
use_triton_kernels
)
else
:
self
.
quant_method
:
FusedMoEMethodBase
=
quant_config
.
get_quant_method
(
self
,
prefix
)
assert
self
.
quant_method
is
not
None
self
.
quant_method
:
Optional
[
FusedMoEMethodBase
]
=
None
if
quant_config
is
not
None
:
self
.
quant_method
=
quant_config
.
get_quant_method
(
self
,
prefix
)
if
self
.
quant_method
is
None
:
self
.
quant_method
=
UnquantizedFusedMoEMethod
(
self
.
use_triton_kernels
)
self
.
quant_method
.
create_weights
(
layer
=
self
,
...
...
python/sglang/srt/layers/quantization/quark/quark.py
View file @
cd4b39a9
...
...
@@ -65,7 +65,9 @@ class QuarkConfig(QuantizationConfig):
if
should_ignore_layer
(
prefix
,
ignore
=
exclude_layers
,
fused_mapping
=
self
.
packed_modules_mapping
):
return
UnquantizedLinearMethod
()
if
isinstance
(
layer
,
LinearBase
):
return
UnquantizedLinearMethod
()
return
None
if
isinstance
(
layer
,
LinearBase
):
scheme
=
self
.
get_scheme
(
layer
=
layer
,
layer_name
=
prefix
)
...
...
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