Skip to content

Commit

Permalink
[Bug Fix] Update torch import reference in bnb quantization (#1902)
Browse files Browse the repository at this point in the history
# What does this PR do?

Fixes `Import Error` occurring from mismatch of usage between
torch.nn.Module and nn.Module.
  • Loading branch information
DhruvSrikanth committed May 15, 2024
1 parent a69ef52 commit 6c715f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/text_generation_server/layers/bnb.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def forward(self, x: torch.Tensor):
return out


class Linear4bit(nn.Module):
class Linear4bit(torch.nn.Module):
def __init__(self, weight, bias, quant_type):
super().__init__()
self.weight = Params4bit(
Expand Down

0 comments on commit 6c715f8

Please sign in to comment.