Skip to content

Commit 337c3f4

Browse files
committed
fix nf4 xpu finetune
Signed-off-by: jiqing-feng <[email protected]>
1 parent b7ca20b commit 337c3f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bitsandbytes/backends/xpu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def dequantize_4bit(
155155
if blocksize is None:
156156
blocksize = 64
157157
assert_on_xpu([A, absmax, out])
158-
if quant_type == "nf4":
158+
if quant_type == "nf4" and getattr(quant_state, "ipex", False):
159159
output = torch.ops.torch_ipex.dequantize_4bit(A, "nf4", quant_state.shape, absmax, None, blocksize).t()
160160
else:
161161
output = dequantize_4bit_impl(A, quant_state, absmax, out, blocksize, quant_type)

0 commit comments

Comments
 (0)