mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 04:14:52 +00:00
Fix incorrect use of bias in awq
This commit is contained in:
parent
dd304cf14c
commit
74d9dfa89e
@ -35,10 +35,7 @@ class WQLinear(nn.Module):
|
||||
self.qweight = qweight
|
||||
self.qzeros = qzeros
|
||||
self.scales = scales
|
||||
if bias:
|
||||
self.bias = bias
|
||||
else:
|
||||
self.bias = None
|
||||
self.bias = bias
|
||||
|
||||
@torch.no_grad()
|
||||
def forward(self, x):
|
||||
|
@ -335,7 +335,7 @@ def get_linear(weight, bias, quantize):
|
||||
qweight=qweight,
|
||||
qzeros=qzeros,
|
||||
scales=scales,
|
||||
bias=bias is not None,
|
||||
bias=bias,
|
||||
)
|
||||
else:
|
||||
raise NotImplementedError(f"Quantization `{quantize}` is not implemented yet.")
|
||||
|
Loading…
Reference in New Issue
Block a user