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
43190bec
Unverified
Commit
43190bec
authored
Oct 12, 2025
by
Kai-Hsun Chen
Committed by
GitHub
Oct 12, 2025
Browse files
[chore][1/N] Avoid using default mutable parameters (#11478)
Signed-off-by:
Kai-Hsun Chen
<
khchen@x.ai
>
parent
be740acd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
python/sglang/srt/layers/quantization/compressed_tensors/compressed_tensors.py
...ers/quantization/compressed_tensors/compressed_tensors.py
+2
-2
python/sglang/srt/utils/common.py
python/sglang/srt/utils/common.py
+2
-2
No files found.
python/sglang/srt/layers/quantization/compressed_tensors/compressed_tensors.py
View file @
43190bec
...
@@ -86,7 +86,7 @@ class CompressedTensorsConfig(QuantizationConfig):
...
@@ -86,7 +86,7 @@ class CompressedTensorsConfig(QuantizationConfig):
sparsity_ignore_list
:
List
[
str
],
sparsity_ignore_list
:
List
[
str
],
kv_cache_scheme
:
Optional
[
Dict
[
str
,
Any
]]
=
None
,
kv_cache_scheme
:
Optional
[
Dict
[
str
,
Any
]]
=
None
,
config
:
Optional
[
Dict
[
str
,
Any
]]
=
None
,
config
:
Optional
[
Dict
[
str
,
Any
]]
=
None
,
packed_modules_mapping
:
Dict
[
str
,
List
[
str
]]
=
{}
,
packed_modules_mapping
:
Optional
[
Dict
[
str
,
List
[
str
]]
]
=
None
,
):
):
super
().
__init__
()
super
().
__init__
()
self
.
ignore
=
ignore
self
.
ignore
=
ignore
...
@@ -97,7 +97,7 @@ class CompressedTensorsConfig(QuantizationConfig):
...
@@ -97,7 +97,7 @@ class CompressedTensorsConfig(QuantizationConfig):
self
.
sparsity_scheme_map
=
sparsity_scheme_map
self
.
sparsity_scheme_map
=
sparsity_scheme_map
self
.
sparsity_ignore_list
=
sparsity_ignore_list
self
.
sparsity_ignore_list
=
sparsity_ignore_list
self
.
config
=
config
self
.
config
=
config
self
.
packed_modules_mapping
=
packed_modules_mapping
self
.
packed_modules_mapping
=
packed_modules_mapping
or
{}
def
get_linear_method
(
self
)
->
CompressedTensorsLinearMethod
:
def
get_linear_method
(
self
)
->
CompressedTensorsLinearMethod
:
return
CompressedTensorsLinearMethod
(
self
)
return
CompressedTensorsLinearMethod
(
self
)
...
...
python/sglang/srt/utils/common.py
View file @
43190bec
...
@@ -492,7 +492,7 @@ def make_layers(
...
@@ -492,7 +492,7 @@ def make_layers(
pp_size
:
Optional
[
int
]
=
None
,
pp_size
:
Optional
[
int
]
=
None
,
prefix
:
str
=
""
,
prefix
:
str
=
""
,
return_tuple
:
bool
=
False
,
return_tuple
:
bool
=
False
,
offloader_kwargs
:
Dict
[
str
,
Any
]
=
{}
,
offloader_kwargs
:
Optional
[
Dict
[
str
,
Any
]
]
=
None
,
)
->
Tuple
[
torch
.
nn
.
Module
,
int
,
int
]:
)
->
Tuple
[
torch
.
nn
.
Module
,
int
,
int
]:
"""Make a list of layers with the given layer function"""
"""Make a list of layers with the given layer function"""
# circula imports
# circula imports
...
@@ -517,7 +517,7 @@ def make_layers(
...
@@ -517,7 +517,7 @@ def make_layers(
layer_fn
(
idx
=
idx
,
prefix
=
add_prefix
(
idx
,
prefix
))
layer_fn
(
idx
=
idx
,
prefix
=
add_prefix
(
idx
,
prefix
))
for
idx
in
range
(
start_layer
,
end_layer
)
for
idx
in
range
(
start_layer
,
end_layer
)
),
),
**
offloader_kwargs
,
**
(
offloader_kwargs
or
{})
,
)
)
+
[
+
[
PPMissingLayer
(
return_tuple
=
return_tuple
)
PPMissingLayer
(
return_tuple
=
return_tuple
)
...
...
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