"vscode:/vscode.git/clone" did not exist on "390b495ff327e8548c3f7cd701afce87870d9102"
Unverified Commit f5897613 authored by baonudesifeizhai's avatar baonudesifeizhai Committed by GitHub
Browse files

Fix Mistral config remap to accept compressed-tensors quantization #34028 (#34104)


Signed-off-by: default avatarbaonudesifeizhai <baonudesifeizhai@gmail.com>
parent 55a1a956
...@@ -198,6 +198,14 @@ def _remap_mistral_quantization_args(config: dict) -> dict: ...@@ -198,6 +198,14 @@ def _remap_mistral_quantization_args(config: dict) -> dict:
"quant_method": "fp8", "quant_method": "fp8",
"activation_scheme": "dynamic" if is_dynamic else "static", "activation_scheme": "dynamic" if is_dynamic else "static",
} }
elif (
str(quantization.get("quant_method", "")).lower().replace("_", "-")
== "compressed-tensors"
):
# Pass through compressed-tensors config, while normalizing
# quant_method to the canonical community spelling.
quantization["quant_method"] = "compressed-tensors"
config["quantization_config"] = quantization
else: else:
raise ValueError(f"Found unknown quantization='{quantization}' in config") raise ValueError(f"Found unknown quantization='{quantization}' in config")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment