From 84905814d9b8d139bbaf988f3cb772ffd8a7deed Mon Sep 17 00:00:00 2001 From: Yiheng Wu <34974027+YihengBrianWu@users.noreply.github.com> Date: Tue, 10 Sep 2024 02:56:09 +0000 Subject: [PATCH] fix qscales typo --- torchao/quantization/subclass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchao/quantization/subclass.py b/torchao/quantization/subclass.py index 8978cb7ce4..55877ee974 100644 --- a/torchao/quantization/subclass.py +++ b/torchao/quantization/subclass.py @@ -231,7 +231,7 @@ class Int8DynamicallyQuantizedLinearWeight(QuantizedLinearWeightBase): @staticmethod def __new__(cls, int_data, q_scales, transposed, shape, dtype=None, **kwargs): if dtype is None: - dtype = qscales.dtype + dtype = q_scales.dtype kwargs["dtype"] = dtype return super().__new__(cls, int_data, transposed, shape, **kwargs) # type: ignore[attr-defined]