Update server/text_generation_server/utils/layers.py

This commit is contained in:
Nicolas Patry 2024-04-12 08:12:32 +02:00 committed by GitHub
parent 5ef2a48fec
commit 666cde0e12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -209,7 +209,7 @@ class Fp8Linear(nn.Module):
self.dtype = weight.dtype
self.qweight, self.scale = fp8_quantize(weight)
self.bias = bias.cuda(bias.device) if bias is not None else None
self.bias = bias if bias is not None else None
def forward(self, input: torch.Tensor) -> torch.Tensor:
qinput, scale = fp8_quantize(input)