From 63ed23ae9852e0a29fca4aae63620bc3b5458455 Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Sun, 4 Feb 2024 14:02:26 +1100 Subject: [PATCH] Update utils.py --- unsloth/kernels/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsloth/kernels/utils.py b/unsloth/kernels/utils.py index 11272a9025..2ed2a68558 100644 --- a/unsloth/kernels/utils.py +++ b/unsloth/kernels/utils.py @@ -204,13 +204,13 @@ def fast_linear_forward(proj, X, temp_lora = None, out = None): # Add in LoRA weights if lora_A is not None: out_dim = out.shape[2] + dtype = X.dtype if not hasattr(lora_A, "_fast_lora"): lora_A._fast_lora = lora_A.to(dtype) lora_B._fast_lora = lora_B.to(dtype) pass - dtype = X.dtype if bsz == 1: out = out.view(out_dim) temp_lora = torch.mv(lora_A._fast_lora, X.ravel(), out = temp_lora)