Description
I noticed a small typo in the quantization function within model/quantize.py. It's a logical error and it does not affect the final output because scale is typically 1 when called.
Location
File: model/quantize.py
Line: [L268](https://github.com/actypedef/ARCQuant/blob/main/model/quantize.py#L268)
return torch.cat([q_x, q_error_k], dim=1) * scale, scale_x, scale
The Issue
The return value is already multiplied by scale here. However, in model/qLinearLayer.py at [L71](https://github.com/actypedef/ARCQuant/blob/main/model/qLinearLayer.py#L71), the output is multiplied by scale again:
y = F.linear(qx, self.W) * scale * self.scale
Description
I noticed a small typo in the
quantizationfunction withinmodel/quantize.py. It's a logical error and it does not affect the final output becausescaleis typically 1 when called.Location
File:
model/quantize.pyLine: [L268](https://github.com/actypedef/ARCQuant/blob/main/model/quantize.py#L268)
The Issue
The return value is already multiplied by
scalehere. However, inmodel/qLinearLayer.pyat [L71](https://github.com/actypedef/ARCQuant/blob/main/model/qLinearLayer.py#L71), the output is multiplied byscaleagain: