# SFTTrainer Merge LoRA weights back into base model?

**URL:** <https://discuss.huggingface.co/t/sfttrainer-merge-lora-weights-back-into-base-model/66858>\
**Category:** Models\
**Created:** [December 24, 2023, 3:31am UTC](https://discuss.huggingface.co/t/sfttrainer-merge-lora-weights-back-into-base-model/66858 "2023-12-24T03:31:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![asaha-cdcp](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@asaha-cdcp](https://discuss.huggingface.co/u/asaha-cdcp)\
**Post date:** [December 24, 2023, 3:31am UTC](https://discuss.huggingface.co/t/sfttrainer-merge-lora-weights-back-into-base-model/66858/1 "2023-12-24T03:31:04Z")

</div>

Hello, I used this example [trl/examples/scripts/sft.py at main · huggingface/trl · GitHub](https://github.com/huggingface/trl/blob/main/examples/scripts/sft.py) to create fine tuned model and saved it.

Usually, previously when I saved a peft model I needed merge\_and\_unload the weights back to the base model. But, I am able to load this fine tuned model using the from\_pretrained method without issue.

Does it mean that we do not need to merge the peft model with base model any more if we use the trainer.save\_model(output\_dir) ?

Thanks.
