Skip to content

Commit 5d45ba1

Browse files
daniserebmeenchen
authored andcommitted
Improve error message in _real_quantize
Signed-off-by: Daniel Serebrenik <daserebrenik@nvidia.com>
1 parent eda660a commit 5d45ba1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modelopt/torch/quantization/nn/modules/tensor_quantizer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,8 @@ def _real_quantize(self, inputs):
671671
buffer_to_register["_scale"] = scales
672672
else:
673673
raise ValueError(
674-
f"Real quantization for MX {self._num_bits} format is not supported."
674+
f"Unsupported MX format: num_bits={self._num_bits}. "
675+
f"Expected (2, 1) for MXFP4 or (4, 3) for MXFP8."
675676
)
676677
elif self._num_bits == (4, 3):
677678
# FP8 quantization (non-MX)

0 commit comments

Comments
 (0)