Closed alifarrokh closed 5 months ago
The current code version integrates all the learnable weights into the model.pt checkpoint, including the LoRA weights.
So there is no need to set peft_ckpt
arg for inference, and setting train_config.use_peft=true
is sufficient, right?
exactly
Thank you very much.
System Info
OS: Ubuntu 22.04.3 LTS Python Version: 3.10.12 PyTorch Version: 2.0.1 GPU: 1x Nvidia RTX A6000 CUDA Version: 12.4
Information
🐛 Describe the bug
I am trying to finetune the model for AAC task using LoRA. I use the official finetuning script
examples/aac_audiocaps/scripts/finetune_eat_audiocaps.sh
with slight modifications to the config params. The training and inference are ok when PEFT is disabled (i.e., finetuning the linear layer only). When I enable PEFT, however, LoRA weights (adapter_model.safetensors
) and config (adapter_config.json
) are not stored in the output directory.Here is the output directory for both cases (with and without LoRA) after training is over:
Here is the config:
As a side note, the training and validation accuracy are improved when enabling PEFT, suggesting that the training with PEFT is actually ok, but the learned weights are not stored on disk.
Error logs
Training is completed without any error, but LoRA weights and config files are not generated.
Expected behavior
The training script should generate the LoRA files along with
model.pt
.