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 utils.py

Daniel Han648efd0525c8
diff --git a/unsloth/kernels/utils.py b/unsloth/kernels/utils.py
index 0bfd4269b18..f052914f982 100644
--- a/unsloth/kernels/utils.py
+++ b/unsloth/kernels/utils.py
@@ -124,6 +124,7 @@ global ABSMAX_BUFFER
ABSMAX_BUFFER = None
if HAS_CUDA_STREAM:
+ @torch.inference_mode
def fast_dequantize(W, quant_state = None, out = None, use_global_buffer = False):
if quant_state is None: return W
if type(quant_state) is not list:
@@ -193,6 +194,7 @@ if HAS_CUDA_STREAM:
return out.t() if is_transposed else out
pass
else:
+ @torch.inference_mode
def fast_dequantize(W, quant_state = None, out = None, use_global_buffer = False):
if quant_state is None: return W
if type(quant_state) is not list: