@pikaduck Also, for freezing the layers with Trainer, I used torch. Mostly, copying and pasting certain parts of the finetune_trainer.py code that @valhalla mentioned. Let me know, and I can show you my code.