From eb6cc76602fb07e137c19f9d0d8a7ce3937f0846 Mon Sep 17 00:00:00 2001 From: Daniel Hanchen Date: Sat, 14 Feb 2026 06:56:11 +0000 Subject: [PATCH] Simplify FA2 fallback text and filter AMD ids noise --- unsloth/import_fixes.py | 2 ++ unsloth/models/_utils.py | 12 ++++-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/unsloth/import_fixes.py b/unsloth/import_fixes.py index 8d00b793c9..d037903bec 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 noise sys.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.py index 5ad898011e..d629a1e64c 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -872,10 +872,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! @@ -923,10 +921,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!