Redundant scaling in quantize.py
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
Hi @SubSir ,
Thank you for your interest in ARCQuant!
You are correct. In the pseudo-quantization mode, the dequantization process is already pre-performed within model/quantize.py. Therefore, the additional dequantization step in model/qLinearLayer is indeed redundant.
We will fix this issue in a future update. Thanks for pointing this out!