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 Han451ed2952dc5
diff --git a/unsloth/kernels/utils.py b/unsloth/kernels/utils.py
index cef6ccb864b..de543962ef9 100644
--- a/unsloth/kernels/utils.py
+++ b/unsloth/kernels/utils.py
@@ -31,12 +31,12 @@ pass
# tl.math.tanh now is libdevice.tanh
from packaging.version import Version
import triton
+import triton.language as tl
if Version(triton.__version__) >= Version("3.0.0"):
from triton.language.extra import libdevice
triton_tanh = libdevice.tanh
triton_cast = tl.cast
else:
- import triton.language as tl
triton_tanh = tl.math.tanh
# No casting in old Triton versions
@triton.jit