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.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Update _utils.py
Daniel Han971ab6485a4b
diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.pyindex 74dfe698788..8435c834f4d 100644--- a/unsloth/models/_utils.py+++ b/unsloth/models/_utils.py@@ -173,6 +173,22 @@ else:passfrom transformers.models.llama.modeling_llama import logger++# =============================================+# Get Xformers+from xformers._cpp_lib import _register_extensions+try:+ _register_extensions() # Check if C++ modules are loaded correctly+except Exception as error:+ raise ImportError(+ "Unsloth: Xformers was not installed correctly. "\+ "Please install xformers separately first. "\+ "Then confirm if it's correctly installed by running:\n"\+ "python -m xformers.info\n\n"+ "Longer error message:\n" + str(error)+ )+pass+import xformers.ops.fmha as xformersxformers_attention = xformers.memory_efficient_attentionfrom xformers import __version__ as xformers_version