# SFTTrainer Merge LoRA weights back into base model?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsfttrainer-merge-lora-weights-back-into-base-model%2F66858%3E%5C
**Category:** Models\
**Created:** [December 24, 2023, 3:31am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsfttrainer-merge-lora-weights-back-into-base-model%2F66858 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fasaha-cdcp)%5C
**Post date:** [December 24, 2023, 3:31am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsfttrainer-merge-lora-weights-back-into-base-model%2F66858%2F1 "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.
