Parameter-efficient fine-tuning (PEFT) is a family of methods that adapt a large pretrained model by training only a small number of parameters while keeping the original model’s weights frozen. Instead of updating billions of weights, PEFT trains small add-on components or a small subset of parameters, often well under 1% of the total. This makes fine-tuning far cheaper and faster, and lets one base model support many specialised versions.
Key takeaways
- PEFT freezes most of the model and trains a small set of parameters.
- LoRA is the most widely used PEFT method.
- Other methods include adapters, prefix tuning, prompt tuning and IA3.
- PEFT cuts GPU memory needs and produces tiny files per task.
- Quality is often close to full fine-tuning for many tasks.
PEFT explained in simple terms
Imagine you own a large, expensive printing press. To print different magazines, you do not rebuild the press each time; you swap small, cheap templates. PEFT treats the base model as the press and trains small “templates” for each task. One base model plus many small templates can serve customer support, legal summaries and marketing copy.
Why PEFT is needed
Full fine-tuning of a large model requires storing and updating every weight, plus optimiser states that can take several times more memory than the weights themselves. For models with tens of billions of parameters, this needs many high-end GPUs. Storing a full copy of the model for every task is also costly. PEFT solves both problems.
Main PEFT methods
| Method | How it works | Notes |
|---|---|---|
| Adapters (2019) | Insert small trainable layers between frozen transformer layers | Early, influential approach |
| Prefix tuning (2021) | Learn trainable vectors prepended to each layer’s attention inputs | No change to core weights |
| Prompt tuning (2021) | Learn “soft prompt” embeddings added to the input | Very few parameters; works best on large models |
| LoRA (2021) | Add trainable low-rank matrices to existing weight matrices | Most popular; no extra inference latency once merged |
| QLoRA (2023) | LoRA on top of a 4-bit quantized base model | Fine-tune very large models on a single GPU |
| IA3 (2022) | Learn small scaling vectors for activations | Extremely few parameters |
A worked example: one model, many clients
An agency serves five clients, each wanting a writing assistant in their own brand voice. Full fine-tuning would mean five full copies of a 7-billion-parameter model, about 14 GB each at 16-bit, roughly 70 GB in total. With LoRA, the agency keeps one base model and five adapter files, each typically tens of megabytes. At request time, the system loads the right adapter for each client. Serving infrastructure supports switching adapters quickly, so one GPU can serve all five brands.
PEFT vs full fine-tuning
| Aspect | Full fine-tuning | PEFT |
|---|---|---|
| Trainable parameters | 100% | Often under 1% |
| GPU memory | Very high | Much lower |
| Storage per task | Full model | Small adapter |
| Catastrophic forgetting | More likely | Less likely, base is frozen |
| Maximum quality | Highest | Close for many tasks |
| Multiple tasks | Separate models | Swap adapters |
Tools
The Hugging Face PEFT library implements most popular methods and integrates with common training frameworks. Many cloud AI platforms and model providers also offer managed LoRA fine-tuning.
Limitations
- May underperform full fine-tuning on large domain shifts or very complex tasks.
- Hyperparameters, such as LoRA rank, need tuning.
- Adapters are tied to a specific base model and version.
- Does not reduce the memory needed to run the base model at inference.
