mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-22 08:04:27 +08:00
Mistral-format support for compressed-tensors (#16803)
Signed-off-by: mgoin <mgoin64@gmail.com>
This commit is contained in:
parent
ce17db8085
commit
aa72d9a4ea
@ -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],
|
|||||||
|
|
||||||
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],
|
|||||||
}
|
}
|
||||||
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)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user