mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 12:24:53 +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.qweight = qweight
|
||||||
self.qzeros = qzeros
|
self.qzeros = qzeros
|
||||||
self.scales = scales
|
self.scales = scales
|
||||||
if bias:
|
|
||||||
self.bias = bias
|
self.bias = bias
|
||||||
else:
|
|
||||||
self.bias = None
|
|
||||||
|
|
||||||
@torch.no_grad()
|
@torch.no_grad()
|
||||||
def forward(self, x):
|
def forward(self, x):
|
||||||
|
@ -335,7 +335,7 @@ def get_linear(weight, bias, quantize):
|
|||||||
qweight=qweight,
|
qweight=qweight,
|
||||||
qzeros=qzeros,
|
qzeros=qzeros,
|
||||||
scales=scales,
|
scales=scales,
|
||||||
bias=bias is not None,
|
bias=bias,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError(f"Quantization `{quantize}` is not implemented yet.")
|
raise NotImplementedError(f"Quantization `{quantize}` is not implemented yet.")
|
||||||
|
Loading…
Reference in New Issue
Block a user