Parameter-efficient fine-tuning (PEFT) adapts a large pretrained model to a new task without retraining all of its weights. Ordinary fine-tuning updates every parameter, which for a model with billions of them means a lot of GPU memory during training and a full-size copy of the model for every task. PEFT methods freeze the original model and train only a small set of parameters, a tiny fraction of the total. For GPT-3, LoRA cut the trainable parameters by a factor of 10,000.
The main approaches
- Adapters insert small trainable layers between a model’s existing layers. Houlsby et al. introduced them in 2019 and came within 0.4% of full fine-tuning on the GLUE benchmark while adding about 3.6% extra parameters per task.
- LoRA learns a low-rank update to existing weight matrices. The update can be merged back into the weights, so it adds no extra latency at inference. It is the most widely used PEFT method; see the LoRA paper.
- Prompt tuning and prefix tuning learn a few trainable vectors that are prepended to the input, leaving the whole network untouched.
Why it matters
Training fewer parameters means less memory for gradients and optimizer state, and pairing PEFT with quantization of the frozen base shrinks the rest. Together they put fine-tuning of large models within reach of a single, even consumer-grade, GPU. And because the base model is shared, one deployment can serve many tasks by swapping small add-ons, each cheap to store and share.
The catch
A small add-on has limited capacity. PEFT works best when the task is close to what the base model can already do, such as a new format, style or domain; teaching a model something far outside its pre-training is harder to squeeze into so few extra weights.