diff --git a/unsloth/models/loader.py b/unsloth/models/loader.py index e2bfe1d639..34deb8f9bd 100644 --- a/unsloth/models/loader.py +++ b/unsloth/models/loader.py @@ -155,14 +155,14 @@ class FastLanguageModel(FastLlamaModel): try: model_config = AutoConfig.from_pretrained(model_name, token = token, revision = revision) is_model = True - except Exception as autoconfig_error: - autoconfig_error = str(autoconfig_error) + except Exception as error: + autoconfig_error = str(error) is_model = False try: peft_config = PeftConfig .from_pretrained(model_name, token = token, revision = revision) is_peft = True - except Exception as peft_error: - peft_error = str(peft_error) + except Exception as error: + peft_error = str(error) is_peft = False pass