From 4b2b345cddfb5f998b2da8b1f6de8e1d9c84055d Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Sun, 2 Mar 2025 23:41:35 -0800 Subject: [PATCH] Update utils.py --- unsloth/kernels/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unsloth/kernels/utils.py b/unsloth/kernels/utils.py index 7cd51e9ff0..1d4b494dd7 100644 --- a/unsloth/kernels/utils.py +++ b/unsloth/kernels/utils.py @@ -451,7 +451,7 @@ pass def matmul_lora(X, W, W_quant, A, B, s, out = None): dtype = X.dtype - W = fast_dequantize(W.t(), W_quant, use_global_buffer = True) + W = fast_dequantize(W.t(), W_quant, use_global_buffer = False) if X.dim() == 3: batch, seq_len, d = X.shape @@ -461,6 +461,7 @@ def matmul_lora(X, W, W_quant, A, B, s, out = None): reshape = False pass + print(X.device, W.device, torch.cuda.current_device()) out = torch_matmul(X, W, out = out) if W_quant is not None: del W