[Bugfix] fix adding bias twice in ipex GPTQ quantization (#18363)
Signed-off-by: rand-fly <randfly@outlook.com>
This commit is contained in:
@@ -181,8 +181,6 @@ class IPEXGPTQLinearMethod(GPTQLinearMethod):
|
|||||||
bias: Optional[torch.Tensor] = None) -> torch.Tensor:
|
bias: Optional[torch.Tensor] = None) -> torch.Tensor:
|
||||||
reshaped_x = x.reshape(-1, x.shape[-1])
|
reshaped_x = x.reshape(-1, x.shape[-1])
|
||||||
out = layer.ipex_qlinear(reshaped_x)
|
out = layer.ipex_qlinear(reshaped_x)
|
||||||
if bias is not None:
|
|
||||||
out.add_(bias)
|
|
||||||
return out.reshape(x.shape[:-1] + (layer.ipex_output_size, ))
|
return out.reshape(x.shape[:-1] + (layer.ipex_output_size, ))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user