diff --git a/unsloth/models/loader.py b/unsloth/models/loader.py index a6cb3eb529..b7bbf14085 100644 --- a/unsloth/models/loader.py +++ b/unsloth/models/loader.py @@ -508,7 +508,7 @@ def from_pretrained( model_type = model_types # New transformers need to check manually. - if SUPPORTS_LLAMA32: + if SUPPORTS_LLAMA32 and is_model and is_peft: # Check if folder exists locally if os.path.isdir(model_name): exist_adapter_config = os.path.exists( @@ -1282,7 +1282,7 @@ def from_pretrained( os.environ["UNSLOTH_DISABLE_STATIC_GENERATION"] = "1" # New transformers need to check manually. - if SUPPORTS_LLAMA32: + if SUPPORTS_LLAMA32 and is_model and is_peft: # Check if folder exists locally if os.path.isdir(model_name): exist_adapter_config = os.path.exists(