From a529a39c819a23ea92ea97e477cb48a1f6b245cb Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Sun, 29 Sep 2024 23:15:22 -0700 Subject: [PATCH] Update loader.py --- unsloth/models/loader.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unsloth/models/loader.py b/unsloth/models/loader.py index 2a89c06c21..9ea6c308e3 100644 --- a/unsloth/models/loader.py +++ b/unsloth/models/loader.py @@ -197,12 +197,14 @@ class FastLanguageModel(FastLlamaModel): # Old transformers versions check both_exist = (is_model and is_peft) and not SUPPORTS_LLAMA32 + print(both_exist) if SUPPORTS_LLAMA32: # New transformers need to check manually. files = HfFileSystem(token = token).glob(os.path.join(model_name, "*.json")) if sum(x.endswith(("adapter_config.json", "config.json")) for x in files) >= 2: both_exist = True pass + print(both_exist) pass # Error out if both LoRA and normal model config exists.