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
ed315799
Unverified
Commit
ed315799
authored
Mar 13, 2024
by
Liurl
Committed by
GitHub
Mar 13, 2024
Browse files
Fix marlin model loading compat with autogptq (#290)
Co-authored-by:
LRL
<
lrl@lbx.dev
>
parent
92e2d74f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
python/sglang/srt/managers/router/model_runner.py
python/sglang/srt/managers/router/model_runner.py
+9
-3
No files found.
python/sglang/srt/managers/router/model_runner.py
View file @
ed315799
...
...
@@ -300,9 +300,15 @@ class ModelRunner:
self
.
model_config
.
hf_config
,
"quantization_config"
,
None
)
if
hf_quant_config
is
not
None
:
quant_config_class
=
QUANTIONCONFIG_MAPPING
.
get
(
hf_quant_config
[
"quant_method"
]
)
hf_quant_method
=
hf_quant_config
[
"quant_method"
]
# compat: autogptq uses is_marlin_format within quant config
if
(
hf_quant_method
==
"gptq"
and
"is_marlin_format"
in
hf_quant_config
and
hf_quant_config
[
"is_marlin_format"
]):
hf_quant_method
=
"marlin"
quant_config_class
=
QUANTIONCONFIG_MAPPING
.
get
(
hf_quant_method
)
if
quant_config_class
is
None
:
raise
ValueError
(
f
"Unsupported quantization method:
{
hf_quant_config
[
'quant_method'
]
}
"
...
...
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