[ROCm][quantization] improve OCP weight quant parser robust (#34431)
Signed-off-by: xuebwang-amd <xuebwang@amd.com> Co-authored-by: TJian <tunjian.tan@embeddedllm.com>
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user