Unverified Commit 766e1678 authored by xuebwang-amd's avatar xuebwang-amd Committed by GitHub
Browse files

[ROCm][quantization] improve OCP weight quant parser robust (#34431)


Signed-off-by: default avatarxuebwang-amd <xuebwang@amd.com>
Co-authored-by: default avatarTJian <tunjian.tan@embeddedllm.com>
parent becbe248
...@@ -337,6 +337,13 @@ class QuarkConfig(QuantizationConfig): ...@@ -337,6 +337,13 @@ class QuarkConfig(QuantizationConfig):
) )
return False return False
if isinstance(weight_quant, list):
logger.debug(
"Quark model's weight quantization is incompatible with OCP_MX format: "
"weight_quant is a list (e.g. fp8_w4a8), OCP_MX requires a single dict."
)
return False
# Input and weight qscheme needs to be per group. # Input and weight qscheme needs to be per group.
if weight_quant.get("qscheme") != "per_group": if weight_quant.get("qscheme") != "per_group":
logger.debug( logger.debug(
......
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