From f191154557d5b6bc5edd6125de0882fbc3ae5d66 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Sun, 26 Oct 2025 22:40:59 -0700 Subject: [PATCH] Update loader.py --- unsloth/models/loader.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/unsloth/models/loader.py b/unsloth/models/loader.py index e17fb58a46..5f92999f44 100644 --- a/unsloth/models/loader.py +++ b/unsloth/models/loader.py @@ -202,7 +202,8 @@ class FastLanguageModel(FastLlamaModel): pass # Check if 4bit is allowed specifically for AMD if not ALLOW_BITSANDBYTES and not use_exact_model_name: - print("Unsloth: AMD currently is not stable with 4bit bitsandbytes. Disabling for now.") + if load_in_4bit or load_in_8bit or model_name.lower().endswith("-bnb-4bit"): + print("Unsloth: AMD currently is not stable with 4bit bitsandbytes. Disabling for now.") load_in_4bit = False old_model_name = model_name @@ -650,7 +651,8 @@ class FastModel(FastBaseModel): ) # Check if 4bit is allowed specifically for AMD if not ALLOW_BITSANDBYTES and not use_exact_model_name: - print("Unsloth: AMD currently is not stable with 4bit bitsandbytes. Disabling for now.") + if load_in_4bit or load_in_8bit or model_name.lower().endswith("-bnb-4bit"): + print("Unsloth: AMD currently is not stable with 4bit bitsandbytes. Disabling for now.") load_in_4bit = False old_model_name = model_name