mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 04:14:52 +00:00
fix: EETQLinear with bias in layers.py
This commit is contained in:
parent
3af1a11401
commit
4d0f5c5de6
@ -155,10 +155,7 @@ class EETQLinear(nn.Module):
|
|||||||
device = weight.device
|
device = weight.device
|
||||||
weight = torch.t(weight).contiguous().cpu()
|
weight = torch.t(weight).contiguous().cpu()
|
||||||
weight, scale = quant_weights(weight, torch.int8, False)
|
weight, scale = quant_weights(weight, torch.int8, False)
|
||||||
if bias:
|
|
||||||
bias = weights.get_tensor(f"{prefix}.bias")
|
|
||||||
else:
|
|
||||||
bias = None
|
|
||||||
self.weight = weight.cuda(device)
|
self.weight = weight.cuda(device)
|
||||||
self.scale = scale.cuda(device)
|
self.scale = scale.cuda(device)
|
||||||
self.bias = bias.cuda(device) if bias is not None else None
|
self.bias = bias.cuda(device) if bias is not None else None
|
||||||
|
Loading…
Reference in New Issue
Block a user