We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aefc6bf commit bfed130Copy full SHA for bfed130
bitsandbytes/backends/cpu/ops.py
@@ -265,12 +265,15 @@ def _(
265
code: torch.Tensor,
266
blocksize: int,
267
) -> torch.Tensor:
268
- assert B.dtype == torch.uint8, "Only support uint8 qweight"
+ if B.dtype != torch.uint8:
269
+ B = B.view(torch.uint8)
270
dtype = A.dtype
271
quant_type = "fp4" if code[1] > 0 else "nf4"
272
# cpu fused op only support bf16 for now.
273
if dtype != torch.bfloat16:
274
A = A.to(torch.bfloat16)
275
+ if absmax.dtype != torch.bfloat16:
276
+ absmax = absmax.to(torch.bfloat16)
277
278
final_out_shape = (*A.shape[:-1], shapeB[0])
279
A = A.reshape(-1, A.shape[-1])
0 commit comments