Skip to content

Commit

Permalink
fix shape
Browse files Browse the repository at this point in the history
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
  • Loading branch information
jiqing-feng committed Jan 9, 2025
1 parent 1f30627 commit 96f4ac8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bitsandbytes/backends/cpu_xpu_common.py
Original file line number Diff line number Diff line change
@@ -401,7 +401,7 @@ def quantize_4bit_impl(
def dequant_8bit(A, offset, quant_state):
assert A.dtype == torch.uint8
absmax = quant_state.code[A.reshape(-1).int()]
absmax = (absmax.view(-1, 256) * quant_state.absmax.view(-1, 1)).reshape(quant_state.shape).to(quant_state.dtype)
absmax = (absmax.view(-1, 256) * quant_state.absmax.view(-1, 1)).to(quant_state.dtype).reshape(A.shape)
absmax += offset
return absmax

0 comments on commit 96f4ac8

Please sign in to comment.