← All notes

PEFT applies LoRA with LoraConfig and get_peft_model so only adapter weights train

Answer: The quicktour shows LoRA: you build a LoraConfig, wrap a base model with get_peft_model, and then train.

The usual LoRA steps

Load a pretrained model, create a LoraConfig for the task, and pass both to get_peft_model. After that, the model reports how many parameters are trainable. You then train with the same trainer or loop you already use.

Claims

Sources

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, Apache-2.0 (https://raw.githubusercontent.com/huggingface/peft/main/LICENSE); Hugging Face (PEFT docs), PEFT Quicktour (website), Apache-2.0 (https://raw.githubusercontent.com/huggingface/peft/main/LICENSE). Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: huggingface/peft (GitHub), PEFT Quicktour, Apache-2.0 (https://raw.githubusercontent.com/huggingface/peft/main/LICENSE); Hugging Face (PEFT docs), PEFT Quicktour (website), Apache-2.0 (https://raw.githubusercontent.com/huggingface/peft/main/LICENSE).

Cite this

Permanent ID: iil:note:ayt1ch76

iinventedlight. 2026. "PEFT applies LoRA with LoraConfig and get_peft_model so only adapter weights train." iinventedlight Library, iil:note:ayt1ch76, version of 2026-11-18. https://iinventedlight.com/library/notes/hf-peft-lora/. License: CC-BY-4.0.

@misc{iil_note_ayt1ch76,
  author = {{iinventedlight}},
  title = {{PEFT applies LoRA with LoraConfig and get\_peft\_model so only adapter weights train}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-18},
  url = {https://iinventedlight.com/library/notes/hf-peft-lora/},
  note = {Permanent ID iil:note:ayt1ch76. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/hf-peft-lora.md.