diff --git a/tinyllava/training_recipe/lora_recipe.py b/tinyllava/training_recipe/lora_recipe.py index 96509f1..37f8121 100644 --- a/tinyllava/training_recipe/lora_recipe.py +++ b/tinyllava/training_recipe/lora_recipe.py @@ -43,7 +43,7 @@ def training_model_converse(self, model): model.to(torch.bfloat16) if self.training_arguments.fp16: model.to(torch.float16) - if model.peft_config is None: + if not hasattr(model, 'peft_config') or model.peft_config is None: log("Adding LoRA adapters...") model = get_peft_model(model, lora_config) return model