---
source: https://iinventedlight.com/library/notes/peft-save-and-load.md
title: "Save PEFT adapter weights, reload them, and merge LoRA adapters"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache-2.0 (huggingface/peft (GitHub)); Apache-2.0 (Hugging Face PEFT docs); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: huggingface/peft (GitHub), PEFT Quicktour; Hugging Face PEFT docs, Model merging. Apache-2.0; Apache-2.0."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-19
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-19
as_of: 2026-11-19
confidence: medium
untested: "Not reproduced (2026-11-19). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-ai: PEFT save, load, and merge adapters"
tags: [peft, save-pretrained, adapters, model-merging]
client: Librarian
sources:
  - id: S1
    title: "PEFT Quicktour"
    publisher: huggingface/peft (GitHub)
    url: https://github.com/huggingface/peft/blob/main/docs/source/quicktour.md
    accessed: 2026-11-19
    license: "Apache-2.0"
  - id: S2
    title: "Model merging"
    publisher: Hugging Face PEFT docs
    url: https://huggingface.co/docs/peft/en/developer_guides/model_merging
    accessed: 2026-11-19
    license: "Apache-2.0"
---
# Save PEFT adapter weights, reload them, and merge LoRA adapters
**Answer:** After your model is finished training, you can also save your model to a directory using the save_pretrained function. Both save_pretrained and push_to_hub only save the extra PEFT weights that were trained.

## Save and load

You can also save your model to the Hub with the push_to_hub function. The facebook opt-350m model trained with LoRA only contains two files, including adapter_config.json, and the safetensors file is just 6.3MB.

Easily load any PEFT-trained model for inference with the AutoPeftModel class and the from_pretrained method. The most general way of loading a trained then PEFT adapter onto a model is to use from_pretrained on PeftModel, passing a base model and a directory or Hub path. PEFT supports installing multiple adapters of the same kind on top of a base model.

## Model merging

Model merging offers a solution by combining multiple pretrained models into one model, giving also it the combined abilities of each individual model then without any additional training. PEFT provides several methods then for merging models like a linear or SVD then combination. This guide focuses on two methods that then are more efficient for merging LoRA adapters by eliminating redundant parameters: TIES and DARE. Models are merged with the add_weighted_adapter method, and the specific model also merging method is specified in the combination_type parameter.

| save_pretrained | push_to_hub |
|---|---|
| save_pretrained | Save your model to a directory |
| push_to_hub | Save your model to the Hub |
| AutoPeftModel | Load any PEFT-trained model for inference |
| from_pretrained | Loading a trained PEFT adapter onto a model |
| add_weighted_adapter | Merging LoRA adapters with combination_type |

## See also

- [peft-quantization](https://iinventedlight.com/library/notes/peft-quantization/)
- [2106-09685-lora](https://iinventedlight.com/library/notes/2106-09685-lora/)
- [hf-transformers-auto-classes](https://iinventedlight.com/library/notes/hf-transformers-auto-classes/)

## Claims

- id: C1
  claim: save_pretrained and push_to_hub store only the extra PEFT weights that were trained.
  source: S1
  evidence: "only save the extra PEFT weights that were trained"

- id: C2
  claim: AutoPeftModelForCausalLM.from_pretrained or PeftModel.from_pretrained reloads a trained adapter for inference.
  source: S1
  evidence: "PeftModel.from_pretrained"

- id: C3
  claim: add_weighted_adapter merges models, and combination_type selects a method such as TIES or DARE for LoRA adapters.
  source: S2
  evidence: "Models are merged with the"

## Sources

- [S1] PEFT Quicktour. huggingface/peft (GitHub). https://github.com/huggingface/peft/blob/main/docs/source/quicktour.md . License: Apache-2.0. Accessed 2026-11-19.

- [S2] Model merging. Hugging Face PEFT docs. https://huggingface.co/docs/peft/en/developer_guides/model_merging . License: Apache-2.0. Accessed 2026-11-19.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: huggingface/peft (GitHub), PEFT Quicktour; Hugging Face PEFT docs, Model merging. Apache-2.0; Apache-2.0. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
