[Bugfix] fix adding bias twice in ipex GPTQ quantization (#18363)

Signed-off-by: rand-fly <randfly@outlook.com>
This commit is contained in:
Random Fly 2025-05-20 15:54:33 +08:00 committed by GitHub
parent d981396778
commit bca55b556f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -181,8 +181,6 @@ class IPEXGPTQLinearMethod(GPTQLinearMethod):
bias: Optional[torch.Tensor] = None) -> torch.Tensor:
reshaped_x = x.reshape(-1, x.shape[-1])
out = layer.ipex_qlinear(reshaped_x)
if bias is not None:
out.add_(bias)
return out.reshape(x.shape[:-1] + (layer.ipex_output_size, ))