cast bias too

This commit is contained in:
justheuristic 2022-09-17 23:38:09 +03:00
parent a9fe0ff98c
commit eac9aca460

View File

@ -234,6 +234,8 @@ class MatMul8bitLt(torch.autograd.Function):
if A_dtype != torch.float16:
warnings.warn(f"MatMul8bitLt: input matrix will be converted from {A_dtype} to float16")
A = A.to(torch.float16)
if bias is not None:
bias = bias.to(torch.float16)
# 1. Quantize A
if len(A.shape) == 3: