AI State of the Art
SOTA/Efficient Fine-tuning (PEFT)/28 min
Section 109

PEFT: Method Comparison, When to Use What

Listen as a podcast →

The Spectrum: From Very Light to Full

PEFT (Parameter-Efficient Fine-Tuning) is not one technique but a family. Each member strikes a different balance between three things: the number of parameters trained, the quality obtained, and the memory consumed.

Think of it as a slider. On the left you barely touch the model, prompt tuning and its eighty thousand parameters. On the right you touch everything: full fine-tuning and its billions. In between, a range of balance points.

This page is the module's recap. It re-explains no method: every name links to its own page.

Five-set coloured Venn diagram naming efficient fine-tuning methods. The large blue additive circle contains Ladder-Side Tuning, AttentionFusion, IA3 and LeTS. The purple adapters circle, nested inside additive, contains Adapters, Parallel Adapters and AdaMix. The green soft prompts circle, also nested inside additive, contains Prefix-Tuning, Prompt-tuning, WARP, Spot and IPT. The yellow selective circle on the right contains BitFit, LN Tuning, Attention Tuning, Diff-Pruning, Fish-Mask, LT-SFT and FAR. The red reparametrization-based circle at the bottom right contains LoRa, KronA and Intrinsic-SAID. The overlap regions contain Sparse Adapter, Sparse LoRa, S4, KronA res, PHM Adapter, Compacter, MAM Adapter and UniPELT.
A map of the families described just above. Three broad strategies: add weights to the model (the large blue additive circle, which contains the adapters in purple and the soft prompts in green, meaning Prefix-Tuning and Prompt-tuning), retrain only a small selection of existing weights (the yellow selective circle), or rewrite the update in a compact form (the red circle, home to LoRA). IA3 sits inside the blue circle but outside adapters: it adds no layer, it rescales existing activations. The overlap regions are the hybrid methods.Source : Scaling Down to Scale Up paper (Lialin et al., 2023), taxonomy figure, via ar5iv
The Central Question

You have a graphics card, a model, and data. How many parameters should you train? There is no universally optimal answer, but for a given case, the right choice can almost always be read off three questions: how much memory is available, how many training examples you hold, and how far the task sits from what the model already does.

The Comparison Table

Every value below is for a 7-billion-parameter model, width d=4096d = 4096, 32 layers, and is derived from the formulas given on each page. Nothing is quoted from memory.

MethodFormulaLearned parametersShareTraining memoryInference latency
Full fine-tuning + AdamW12 bytes per parameter6.74 billion100%about 100 GBnone
LoRA r=16r = 16, attentionr(d+k)r(d+k) per matrix16.8 million0.25%about 16 GBnone, once merged
QLoRA r=16r = 16same, frozen model in 4 bits16.8 million0.25%about 6 GBnone, if merged back
DoRA r=16r = 16LoRA + one vector per matrix17.3 million0.26%about 17 GBnone, once merged
Adapters m=64m = 642dm2dm per moduletens of millionsabout 0.3%about 16 GBincreased
Prefix tuning l=20l = 20l d L×2l \, d \, L \times 25.2 million0.08%about 16 GBreduced context
Prompt tuning k=20k = 20k dk \, d81,9200.0012%about 16 GBreduced context
IA³(2d+dff)×L(2d + d_{ff}) \times L614,4000.009%about 16 GBnone, absorbed

Two remarks about this table, and both matter.

On memory. Five methods say "about 16 GB", and that is no accident: as soon as the frozen model is held in 16 bits, its weights weigh 2×7×109=142 \times 7 \times 10^9 = 14 GB and dominate everything else. Whether the adapter is 80,000 or 17 million parameters changes nothing in the total. That is exactly what QLoRA understood, and why it alone drops to 6 GB. The item-by-item breakdown is in Full fine-tuning vs parameter-efficient.

On quality. This table has no "quality" column, deliberately. The "95 to 99% of full fine-tuning performance" figures that circulate widely on this topic trace back to no identifiable published measurement. What is published, and checkable, is more modest and more useful:

  • LoRA: quality "on par or better than" full fine-tuning on the models its paper tested;
  • adapters: within 0.4 points of full fine-tuning on GLUE, with 3.6% of the parameters;
  • prompt tuning: on large models only, where it "closes the gap" from a few billion parameters upwards;
  • prefix tuning: comparable when data is plentiful, better when it is scarce;
  • QLoRA: "matches" the quality of 16-bit fine-tuning;
  • DoRA: "consistently outperforms" LoRA, with no number given.

That is the actual state of published knowledge. Everything else is interpolation. One last reading caution, because two figures in circulation look contradictory. The LoRA paper claims memory divided by 3, whereas our table goes from 100 GB to 16, a factor of 6. Both are right: the paper measures on GPT-3 at 175 billion parameters, with its own configuration and its activations, where we count only weights, gradients and optimizer on a 7-billion-parameter model. The exact factor depends on model size and sequence length, it is the order of magnitude that matters.

Blue bar chart titled Trainable Parameters by PEFT Method, 7B Model. The vertical axis is trainable parameters in millions, from 0 to 70. From left to right: Prompt Tuning 0.4 million, IA3 0.6 million, Prefix Tuning 5.2 million, LoRA r equals 16 at 16.8 million, LoRA r equals 64 at 67.1 million, Adapters 33.6 million.
The same ranking as the Parameters column of the table, seen as bar heights. Three takeaways. Prompt Tuning and IA3 are so small their bars are barely visible. The LoRA rank directly controls the budget: going from r equals 16 to r equals 64 quadruples the parameter count, from 16.8 to 67.1 million, the factor of 4 is exact, since the count is proportional to r. And the 5.2 million figure for Prefix Tuning is precisely what our formula gives, l times d times L times 2 with l equals 20.Source : Michael Brenndoerfer, PEFT Comparison: Choosing the Right Fine-Tuning Method

Case 1: A 24 GB Consumer Graphics Card

Answer: QLoRA.

The reasoning takes one line. The frozen model in 16 bits weighs 14 GB, leaving 10 GB for everything else: too tight. In 4 bits it weighs 0.5×7=3.50.5 \times 7 = 3.5 GB, leaving 20 GB of headroom. The choice is arithmetic, not taste.

The recipe:

  1. load the model in 4 bits, NF4 format;
  2. apply LoRA of rank 16 to 32 on the attention matrices;
  3. enable activation recomputation (gradient checkpointing), instead of holding every intermediate activation in memory for backpropagation, keep one in every few dozen and recompute the rest when needed. You trade compute time for memory.

Result: a 7- to 13-billion-parameter model fine-tunes on a single desktop card. That was out of reach in 2021.

What Quantization Actually Costs

QLoRA is LoRA on a model compressed to 4 bits. Compression loses information irreversibly: the original weights will never be recovered. The paper argues that the adapter compensates for that loss and that final quality matches 16-bit fine-tuning, that is its central claim, and we will not put a finer number on it than it does.

What is certain is the memory gain: 16 GB against 6, a factor of 2.7.

Three-column diagram comparing Full Finetuning with no adapters, LoRA and QLoRA. Each column shows the same three tiers: Optimizer State at 32 bits on top, Adapters at 16 bits in the middle, Base Model at the bottom. In Full Finetuning the optimizer state is one large rectangle and the base model is a 16-bit transformer; blue parameter-update arrows point straight down onto the model. In LoRA the optimizer state shrinks to three small squares feeding only three small adapters, the base model stays a 16-bit transformer and is no longer updated, with only green gradient arrows passing through it. In QLoRA the base model becomes a 4-bit transformer, and a pink paging arrow links the three optimizer squares to a dashed CPU block.
The three regimes side by side. On the left, full fine-tuning: the optimizer state is huge because it holds two moments per model parameter. In the middle, LoRA: the base model is frozen, the blue arrows now touch only the small adapters, and the optimizer state shrinks accordingly. On the right, QLoRA adds two things: the frozen model is stored in 4 bits instead of 16, and the pink arrow shows the paged optimizers offloading state to CPU RAM during memory spikes. It is that right-hand column that makes a 7B to 13B model fit on a 24 GB card.Source : QLoRA paper (Dettmers et al., 2023), figure 1, via Eugene Yan

Case 2: A 40 to 80 GB Datacentre Card

Answer: LoRA, or DoRA if you want the last point of quality.

With that much memory the model fits in 16 bits, so with no information lost on the weights. LoRA of rank 16 to 64 is the default: it is the best understood and best supported method. DoRA adds 3% more parameters and a little compute time for a steady but modest quality gain.

This class of card opens up models of 30 to 70 billion parameters, out of reach for a consumer card, where they would only just fit in 4 bits with no room left to work.

Case 3: Thousands of Micro-Tasks

Answer: IA³, or prompt tuning if the model is very large.

Here the limiting factor is not training memory but storage: five thousand tasks, each with little data, each with its own adapter. The arithmetic decides:

MethodWeight per task, in 16 bitsFor 5,000 tasks
Prompt tuning, k=20k = 20164 KB0.8 GB
IA³1.2 MB6 GB
LoRA r=16r = 1634 MB170 GB

Prompt tuning is the lightest, but it only works well above a few billion parameters. IA³ has no such constraint and behaves particularly well when each task has only a handful of examples, which is precisely its paper's setting.

Case 4: Deep Adaptation

Answer: high-rank LoRA, or full fine-tuning.

A new language, a highly specialized domain: the model has to acquire knowledge it lacks, not reorganize knowledge it has. The very light methods cannot do this by construction, IA³ can only rescale existing dimensions, a short prefix can only suggest.

  • LoRA of rank 64 to 128, applied to every linear layer rather than the attention matrices alone;
  • full fine-tuning if the hardware allows;
  • and above all, consider continued pre-training before supervised fine-tuning: the topic is covered in Continual pre-training.
The Rule of Thumb, and Why It Holds

If the task resembles what the model already does (converse, summarize, classify) a rank of 8 to 16 suffices. If you ask for something genuinely new, go to 32, 64 or beyond.

Why? Because the rank bounds the number of independent directions the correction can take. Reorienting existing knowledge needs few directions; installing new knowledge needs many.

Combinations That Work

QLoRA and DoRA Together

The two act in different places: QLoRA compresses what is frozen, DoRA reorganizes what is learned. Nothing stops you stacking them, and use_dora=True in the config is all it takes.

LoRA and Activation Recomputation

Activation recomputation frees memory during the backward pass, where gradients climb back up the network, by redoing computations instead of keeping their results. Combined with LoRA it lets you fine-tune noticeably larger models on the same hardware, at the cost of roughly 30% more compute time, an order of magnitude to check on your own setup.

Several LoRA Adapters

Training several adapters for the same task, with different random draws or settings, then combining their predictions, gives a steadier result. Combining several adapters is covered in Model merging: TIES.

How to Decide

By Number of Examples

The principle: the more examples you have, the more free parameters you can afford before the model starts memorizing them.

  • under 100 examples: IA³ or prompt tuning. The tiny parameter count mechanically prevents memorization.
  • 100 to 10,000: LoRA of rank 8 to 16.
  • 10,000 to 100,000: LoRA of rank 16 to 64, or DoRA.
  • beyond 100,000: high-rank LoRA, or full fine-tuning.

By Nature of the Adaptation

  • classifying, extracting entities: rank 4 to 8. These are surface tasks.
  • learning to follow instructions: rank 16 to 32.
  • alignment on preferences, via RLHF or DPO: rank 16 to 64.
  • domain shift: rank 64 and up, or full fine-tuning.
The Trap: Hunting for the Minimal Rank

Always picking the lightest method is a frequent mistake, and the table above explains why. Since the frozen model's 14 GB dominate the total, going from 80,000 to 17 million trainable parameters barely changes the memory consumed.

In other words, saving parameters buys almost nothing as long as you stay within the same orders of magnitude. It only becomes decisive for storing thousands of adapters. LoRA of rank 16 is rarely a bad default.

Best Practices

  1. Start with LoRA of rank 16 on the four attention matrices and the linear layers of the multi-layer perceptron. It is the reasonable choice in the great majority of cases.
  2. Always compare against the un-fine-tuned base model. That is the baseline most often forgotten, and fine-tuning does sometimes make things worse.
  3. Watch for overfitting. Few parameters is not immunity: on a very small dataset, even an adapter can memorize.
  4. Test the merge. After a LoRA run, merge the weights and check the result matches the unmerged adapter, rounding errors and quantization corner cases can introduce a gap.
  5. Keep the base model. Modularity is the asset of these methods: you can roll back, combine, swap.

Where Practice Stands

The field moves, and new methods appear regularly. The current balance point in practice is simple:

QLoRA with a reasonable rank, between 16 and 32, covers the great majority of needs. It is accessible, well supported and well documented.


In short. Consumer card? QLoRA. Datacentre card? LoRA in 16 bits. Thousands of micro-tasks? IA³. The last point of quality? DoRA. A new language or domain? High rank, or full fine-tuning. When in doubt, LoRA of rank 16.

Check your understanding0 / 5

1. In the comparison table, five methods show the same training memory, about 16 GB. Why?

2. Why does this comparison have no quality column?

3. With a 24 GB card, why does the page settle on QLoRA by arithmetic?

4. Why does deep adaptation (a new language, an unknown domain) call for a high rank?

5. The LoRA paper reports memory divided by 3; the page's table goes from 100 GB to 16, a factor of 6. Who is wrong?