Parameter-efficient fine-tuning

Also known as: PEFT

On this page 7

Parameter-efficient fine-tuning (PEFT) is a family of training methods that adapt a large pretrained model to a new task by updating only a small fraction of its parameters, typically between 0.01 and 5 percent, while the original weights stay frozen. In artificial intelligence, PEFT has become the standard way to customize large language models and diffusion models when full fine-tuning would be too expensive in memory, compute or storage.

The core insight is that the change a model needs for a specific task is low-dimensional: a few million well-placed parameters can steer a model with billions of weights. PEFT therefore reduces GPU memory requirements, shrinks each task-specific artifact from many gigabytes to a few megabytes, and lets one base model serve many tasks through swappable modules.

How parameter-efficient fine-tuning works

In standard training, the optimizer stores gradients and optimizer states for every weight. With the Adam optimizer, this means roughly three to four extra copies of the model in memory. PEFT freezes the base weights, so gradients and optimizer states exist only for the small set of trainable parameters, which removes most of that overhead.

The trainable parameters are introduced in one of three ways: adding new modules (adapters), reparameterizing existing weight updates (low-rank methods such as LoRA), or selecting a subset of existing weights (for example only bias terms). During the forward pass, the frozen model and the trainable parts work together; during the backward pass, only the small parts are updated.

The following table groups the main PEFT families by mechanism.

FamilyMechanismRepresentative methods
Additive methodsInsert small trainable layers or vectorsAdapter tuning, prefix tuning, prompt tuning
ReparameterizationLearn a low-rank update to frozen weightsLoRA, QLoRA, DoRA
Selective methodsUnfreeze a chosen subset of weightsBitFit, layer freezing
Hybrid methodsCombine several mechanismsUnified adapter frameworks
Main families of PEFT methods

Key PEFT methods and their parameters

LoRA (low-rank adaptation) is the most widely used method. It represents the update to a weight matrix as the product of two thin matrices of rank r, often between 4 and 64. Because the update can be merged back into the base weights after training, LoRA adds no inference latency. QLoRA extends this by keeping the frozen base model in 4-bit quantized form, which allows fine-tuning very large models on a single high-memory GPU.

Adapters are small bottleneck layers inserted after attention or feed-forward blocks. Prefix tuning and prompt tuning prepend trainable vectors to the input or to each layer’s attention keys and values, leaving all model weights untouched. DoRA decomposes weights into magnitude and direction and applies a low-rank update to the direction only, which often narrows the gap to full fine-tuning.

MethodTrainable shareKey hyperparameterInference overhead
LoRAAbout 0.1 to 1 percentRank r and scaling alphaNone after merging
QLoRAAbout 0.1 to 1 percentRank r, 4-bit quantization typeDequantization cost if not merged
Adapter tuningAbout 0.5 to 5 percentBottleneck sizeSmall extra layers
Prefix tuningAbout 0.1 percentPrefix lengthLonger effective context
Prompt tuningUnder 0.01 percentNumber of soft tokensSlightly longer input
Typical settings for common PEFT methods

PEFT compared with full fine-tuning and other adaptation strategies

PEFT sits between prompt engineering, which changes no weights, and full fine-tuning, which updates all of them. On many instruction-following and classification tasks, well-tuned LoRA reaches quality close to full fine-tuning, but full fine-tuning still tends to win when the task requires substantial new knowledge or a large shift in domain.

ApproachWeights changedMemory costBest suited for
Prompt engineeringNoneInference onlyQuick behavior changes
Parameter-efficient fine-tuningSmall added or selected setLow to moderateStyle, format and task specialization
Full fine-tuningAll parametersVery highDeep domain shifts with abundant data
Continued pretrainingAll parametersVery highInjecting large volumes of new text
Adaptation strategies side by side

PEFT also interacts with catastrophic forgetting. Because the base weights are frozen, the original capabilities are easier to preserve, and removing the module restores the base model exactly. This does not make forgetting impossible: an aggressive adapter can still degrade general behavior while it is active.

Choosing and configuring a PEFT method

Method choice depends on hardware budget, data size and deployment pattern. Teams that serve many customers from one base model favor LoRA because adapters can be hot-swapped per request. Teams with very limited GPU memory start with QLoRA. Prompt tuning works best with very large models, where even a handful of soft tokens carries enough capacity.

SituationRecommended choiceReason
Single consumer GPUQLoRA with rank 16Fits large models in limited memory
Many tenants on one modelLoRA adapters per tenantMegabyte-sized, swappable modules
Very small datasetLow rank and early stoppingLimits overfitting
Complex reasoning taskHigher rank on all linear layersMore capacity where it is needed
Quality gap remainsDoRA or full fine-tuningCloser match to full updates
Decision guide for PEFT configuration

Practical defaults include applying LoRA to all attention and feed-forward projections, using a learning rate roughly ten times higher than for full fine-tuning, and validating on a held-out set after each epoch. The learning rate is usually the most sensitive hyperparameter, more so than the rank.

Limitations and common mistakes

PEFT reduces cost but does not reduce data requirements for quality: noisy or poorly formatted examples produce a poor adapter regardless of method. Training speed per step is also not always faster, because the forward and backward passes still run through the full model.

  • Setting rank too low for a demanding task caps achievable quality.
  • Mismatched base versions make an adapter useless, since it only works with the exact weights it was trained on.
  • Merging quantized models carelessly can introduce precision errors.
  • Evaluating only on training-like prompts hides regressions in general ability.

There is also an open question about what PEFT actually learns. Studies suggest that low-rank updates are good at changing format, tone and task framing but less effective at storing many new facts, which is why retrieval is often combined with an adapter. Results vary by model family and task, so teams should compare against a full fine-tuning baseline on a small scale before committing to one approach.

The idea in brief

Imagine a huge, expensive encyclopedia. You want it to answer questions about your company. Rewriting every page would take years. Instead, you add a thin booklet of sticky notes. The notes point the reader to the right places and add a few corrections.

Parameter-efficient fine-tuning works the same way. The big model stays unchanged. Only a small add-on learns the new task. The add-on is cheap to train and easy to swap.

A practical scenario

A legal technology team wants an open-weight language model with about 8 billion parameters to draft contract clause summaries in a fixed house format. Full fine-tuning would need several data-center GPUs. Instead, the team applies QLoRA with rank 16 to all linear layers and trains on 12,000 reviewed examples using one GPU with 48 GB of memory.

Training finishes in under a day, and the resulting adapter is roughly 80 MB. In blind review, lawyers rate the summaries close to those from a fully fine-tuned reference model. Later, the team trains separate adapters for employment and lease contracts and loads them on demand from the same base model, keeping serving costs flat.