Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Update fast_lora.py

Daniel Han-Chendfe2e406b25e
diff --git a/unsloth/kernels/fast_lora.py b/unsloth/kernels/fast_lora.py
index 2e704446539..dcc887747f3 100644
--- a/unsloth/kernels/fast_lora.py
+++ b/unsloth/kernels/fast_lora.py
@@ -43,7 +43,7 @@ def matmul_lora(X, W, W_quant, A, B, s, out = None):
out = torch.matmul(X, W, out = out)
if W_quant is not None: del W
- out += (X @ A) @ (s * B)
+ out += (X @ A.to(dtype)) @ (s * B.to(dtype))
return out.view(batch, seq_len, -1) if reshape else out
pass