Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
0310029a
Unverified
Commit
0310029a
authored
Jul 25, 2024
by
Alexander Matveev
Committed by
GitHub
Jul 24, 2024
Browse files
[Bugfix] Fix awq_marlin and gptq_marlin flags (#6745)
parent
309aaef8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
vllm/model_executor/layers/quantization/awq_marlin.py
vllm/model_executor/layers/quantization/awq_marlin.py
+3
-2
vllm/model_executor/layers/quantization/gptq_marlin.py
vllm/model_executor/layers/quantization/gptq_marlin.py
+2
-1
No files found.
vllm/model_executor/layers/quantization/awq_marlin.py
View file @
0310029a
...
@@ -25,7 +25,7 @@ class AWQMarlinConfig(QuantizationConfig):
...
@@ -25,7 +25,7 @@ class AWQMarlinConfig(QuantizationConfig):
def
__init__
(
self
,
weight_bits
:
int
,
group_size
:
int
,
has_zp
:
bool
,
def
__init__
(
self
,
weight_bits
:
int
,
group_size
:
int
,
has_zp
:
bool
,
lm_head_quantized
:
bool
)
->
None
:
lm_head_quantized
:
bool
)
->
None
:
self
.
weight_bits
=
weight_bits
self
.
weight_bits
=
weight_bits
self
.
pack_factor
=
32
//
self
.
weight_bits
# packed into
int32
self
.
pack_factor
=
32
//
self
.
weight_bits
# packed into
32bits
self
.
group_size
=
group_size
self
.
group_size
=
group_size
self
.
has_zp
=
has_zp
self
.
has_zp
=
has_zp
self
.
lm_head_quantized
=
lm_head_quantized
self
.
lm_head_quantized
=
lm_head_quantized
...
@@ -69,7 +69,8 @@ class AWQMarlinConfig(QuantizationConfig):
...
@@ -69,7 +69,8 @@ class AWQMarlinConfig(QuantizationConfig):
def
override_quantization_method
(
cls
,
hf_quant_cfg
,
def
override_quantization_method
(
cls
,
hf_quant_cfg
,
user_quant
)
->
Optional
[
str
]:
user_quant
)
->
Optional
[
str
]:
can_convert
=
cls
.
is_awq_marlin_compatible
(
hf_quant_cfg
)
can_convert
=
cls
.
is_awq_marlin_compatible
(
hf_quant_cfg
)
is_valid_user_quant
=
(
user_quant
is
None
or
user_quant
==
"marlin"
)
is_valid_user_quant
=
(
user_quant
is
None
or
user_quant
==
"marlin"
or
user_quant
==
"awq_marlin"
)
if
can_convert
and
is_valid_user_quant
:
if
can_convert
and
is_valid_user_quant
:
msg
=
(
"The model is convertible to {} during runtime."
msg
=
(
"The model is convertible to {} during runtime."
...
...
vllm/model_executor/layers/quantization/gptq_marlin.py
View file @
0310029a
...
@@ -79,7 +79,8 @@ class GPTQMarlinConfig(QuantizationConfig):
...
@@ -79,7 +79,8 @@ class GPTQMarlinConfig(QuantizationConfig):
user_quant
)
->
Optional
[
str
]:
user_quant
)
->
Optional
[
str
]:
can_convert
=
cls
.
is_gptq_marlin_compatible
(
hf_quant_cfg
)
can_convert
=
cls
.
is_gptq_marlin_compatible
(
hf_quant_cfg
)
is_valid_user_quant
=
(
user_quant
is
None
or
user_quant
==
"marlin"
)
is_valid_user_quant
=
(
user_quant
is
None
or
user_quant
==
"marlin"
or
user_quant
==
"gptq_marlin"
)
if
can_convert
and
is_valid_user_quant
:
if
can_convert
and
is_valid_user_quant
:
msg
=
(
"The model is convertible to {} during runtime."
msg
=
(
"The model is convertible to {} during runtime."
...
...
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