Skip to content

Commit

Permalink
fix: EETQLinear with bias in layers.py (huggingface#1176)
Browse files Browse the repository at this point in the history
  • Loading branch information
SidaZh authored Oct 19, 2023
1 parent 9179605 commit 648ea06
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions server/text_generation_server/utils/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,7 @@ def __init__(
device = weight.device
weight = torch.t(weight).contiguous().cpu()
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.scale = scale.cuda(device)
self.bias = bias.cuda(device) if bias is not None else None
Expand Down

0 comments on commit 648ea06

Please sign in to comment.