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
aa72d9a4
Unverified
Commit
aa72d9a4
authored
Apr 23, 2025
by
Michael Goin
Committed by
GitHub
Apr 23, 2025
Browse files
Mistral-format support for compressed-tensors (#16803)
Signed-off-by:
mgoin
<
mgoin64@gmail.com
>
parent
ce17db80
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
vllm/transformers_utils/config.py
vllm/transformers_utils/config.py
+6
-0
No files found.
vllm/transformers_utils/config.py
View file @
aa72d9a4
...
@@ -690,6 +690,9 @@ def load_params_config(model: Union[str, Path], revision: Optional[str],
...
@@ -690,6 +690,9 @@ def load_params_config(model: Union[str, Path], revision: Optional[str],
"quant_method"
:
"fp8"
,
"quant_method"
:
"fp8"
,
"activation_scheme"
:
"static"
"activation_scheme"
:
"static"
}
}
elif
quantization
.
get
(
"quant_method"
)
==
"compressed-tensors"
:
# Pass through the quantization config to compressed-tensors
quantization_config
=
quantization
else
:
else
:
raise
ValueError
(
raise
ValueError
(
f
"Found unknown quantization='
{
quantization
}
' in config"
)
f
"Found unknown quantization='
{
quantization
}
' in config"
)
...
@@ -707,6 +710,7 @@ def load_params_config(model: Union[str, Path], revision: Optional[str],
...
@@ -707,6 +710,7 @@ def load_params_config(model: Union[str, Path], revision: Optional[str],
if
config_type
==
"multimodal"
:
if
config_type
==
"multimodal"
:
multimodal_config
=
config_dict
.
pop
(
"vision_encoder"
)
multimodal_config
=
config_dict
.
pop
(
"vision_encoder"
)
quantization_config
=
config_dict
.
get
(
"quantization_config"
,
{})
config_dict
=
{
config_dict
=
{
"text_config"
:
config_dict
,
"text_config"
:
config_dict
,
...
@@ -714,6 +718,8 @@ def load_params_config(model: Union[str, Path], revision: Optional[str],
...
@@ -714,6 +718,8 @@ def load_params_config(model: Union[str, Path], revision: Optional[str],
}
}
config_dict
[
"architectures"
]
=
[
"PixtralForConditionalGeneration"
]
config_dict
[
"architectures"
]
=
[
"PixtralForConditionalGeneration"
]
config_dict
[
"model_type"
]
=
"pixtral"
config_dict
[
"model_type"
]
=
"pixtral"
if
quantization_config
:
config_dict
[
"quantization_config"
]
=
quantization_config
config_dict
.
update
(
kwargs
)
config_dict
.
update
(
kwargs
)
...
...
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