[Quantization] Enable humming wNaM asymmetric quant (zero_point) with compressed-tensors (#46528)

This commit is contained in:
HDCharles
2026-09-23 10:23:11 -04:00
committed by GitHub
parent 88afb9dcac
commit 9f07d023d0
12 changed files with 164 additions and 34 deletions
@@ -101,6 +101,19 @@ def prepare_humming_linear_layer_config(
param_dtype=layer.params_dtype,
)
if (
weight_schema.has_zero_point
and input_schema.a_dtype is not None
and weight_schema.b_dtype.num_bits == input_schema.a_dtype.num_bits
):
raise ValueError(
"Humming does not support asymmetric (zero_point) weights "
"when weight and activation bit widths are equal "
f"(W{weight_schema.b_dtype.num_bits}"
f"A{input_schema.a_dtype.num_bits}). "
"Use symmetric weights or a different activation bit width."
)
tensors.update(input_tensors)
layer.weight_schema = weight_schema
input_schema = check_and_fallback_input_schema(