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
Simplify MI300X startup banner name (#4049)
Daniel Han1a929ce6f139
diff --git a/unsloth/import_fixes.py b/unsloth/import_fixes.pyindex 8d00b793c9a..d037903bec8 100644--- a/unsloth/import_fixes.py+++ b/unsloth/import_fixes.py@@ -199,6 +199,8 @@ if os.environ.get("UNSLOTH_ENABLE_LOGGING", "0") != "1":# Triton "df: No such file or directory" stderr noisesys.stderr.add_filter("df: No such file")+ # ROCm/libdrm missing ids table stderr noise on some AMD setups+ sys.stderr.add_filter("amdgpu.ids: No such file or directory")# Fix up AttributeError: 'MessageFactory' object has no attribute 'GetPrototype'diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.pyindex e5b73db0796..451f60091f7 100644--- a/unsloth/models/_utils.py+++ b/unsloth/models/_utils.py@@ -154,12 +154,14 @@ from unsloth_zoo.training_utils import (def resolve_hip_gpu_stats_name(gpu_stats):name = str(getattr(gpu_stats, "name", "") or "").strip()+ name = re.sub(r"\s*\([^)]*\)\s*$", "", name).strip()normalized_name = name.lower().strip(". ")if normalized_name and normalized_name not in ("amd radeon graphics",):return name + ". "try:torch_name = str(torch.cuda.get_device_name(0) or "").strip()+ torch_name = re.sub(r"\s*\([^)]*\)\s*$", "", torch_name).strip()except Exception:torch_name = ""normalized_torch_name = torch_name.lower().strip(". ")@@ -174,11 +176,11 @@ def resolve_hip_gpu_stats_name(gpu_stats):breakif arch_name:- # gfx942 maps to MI300X on current ROCm naming.- if arch_name.lower().startswith("gfx942"):- return f"AMD Instinct MI300X ({arch_name}). "- return f"AMD GPU ({arch_name}). "- return "AMD GPU Device. "+ arch_name = arch_name.strip()+ match = re.search(r"(gfx[0-9a-z]+)", arch_name, flags = re.I)+ if match:+ return f"AMD {match.group(1).lower()} GPU. "+ return "AMD GPU. "from unsloth_zoo.temporary_patches import (@@ -874,10 +876,8 @@ if DEVICE_TYPE == "cuda":)except:print(- "Unsloth: Your Flash Attention 2 installation seems to be broken?\n"- "A possible explanation is you have a new CUDA version which isn't\n"- "yet compatible with FA2? Please file a ticket to Unsloth or FA2.\n"- "We shall now use Xformers instead, which does not have any performance hits!"+ "Unsloth: Your Flash Attention 2 installation seems to be broken. "+ "Using Xformers instead. No performance changes will be seen.")# Stop Flash Attention from importing!@@ -925,10 +925,8 @@ elif DEVICE_TYPE == "hip":)except:print(- "Unsloth: Your Flash Attention 2 installation seems to be broken?\n"- "A possible explanation is you have a new CUDA version which isn't\n"- "yet compatible with FA2? Please file a ticket to Unsloth or FA2.\n"- "We shall now use Xformers instead, which does not have any performance hits!"+ "Unsloth: Your Flash Attention 2 installation seems to be broken. "+ "Using Xformers instead. No performance changes will be seen.")# Stop Flash Attention from importing!