Compare Parameter-Efficient Fine-Tuning (PEFT) methods: LoRA, adapters, and prompt/prefix tuning. When would you choose each?
Answer
All three families freeze the pretrained weights and train a tiny set of new parameters, but they differ in where those parameters live, and that single structural choice decides inference cost, serving flexibility, and achievable quality. LoRA adds a low-rank update in parallel to existing weight matrices, so after training the update folds back into and costs exactly zero extra latency. Serial adapters insert a small bottleneck MLP inside the block’s forward path, which keeps task modules cleanly composable but adds depth, so every decoded token pays for them. Prefix and prompt tuning touch no weight matrix at all: prefix tuning prepends trainable key/value vectors at every layer, prompt tuning prepends trainable vectors only at the input embeddings, which is the cheapest option in parameter count but the least stable and it consumes context length. In practice LoRA is the default (paired with 4-bit quantization as QLoRA when GPU memory is the binding constraint), adapters win when modular composition matters more than latency, and prefix/prompt tuning wins when the base weights must stay byte-identical or when you want per-request conditioning.
(1) Where The Parameters Live: LoRA sits parallel to chosen projections, adapters sit serially between sublayers, prefix tuning sits in the KV cache rather than in any weight tensor.
(2) Mergeability Decides Latency: only LoRA is exactly mergeable into ; adapters add two matmuls and a nonlinearity per sublayer that cannot be folded away, which is a 10-25% decode overhead at batch 1 on a 7B model.
(3) Capacity Is A Knob, Except For Prompts: rank and bottleneck width
scale capacity smoothly, while prompt tuning’s capacity saturates and only becomes competitive with full fine-tuning above roughly 10B parameters.
(4) Multi-Tenant Serving: unmerged LoRA and prefix tuning both support heterogeneous batching (per-request low-rank gather, or per-request KV prefix) from one frozen base copy; merged LoRA needs a separate weight copy per task and adapters need a weight swap per request.

Figure 1: The three injection sites in one block. LoRA is parallel and therefore mergeable, the adapter is serial and therefore always in the critical path (real adapter recipes place one after attention and one after the FFN), and prefix tuning changes only K and V, leaving every weight untouched.
Two consequences are worth stating precisely because interviewers probe them. First, the merge is algebraically exact, not an approximation: is just another matrix of the same shape, so a merged LoRA checkpoint is indistinguishable from a normally fine-tuned one at serving time, and the price is that you can no longer swap tasks without unmerging. Second, PEFT saves optimizer and gradient memory, not activation memory: with Adam you drop from roughly 12-16 bytes per trainable parameter of state to almost none, which is why a 7B model fine-tunes on a single 24GB card, but activations still scale with batch size and sequence length, and QLoRA’s 4-bit NF4 base plus paged optimizers is what pushes a 65B model onto one 48GB GPU. Prefix tuning has a third quirk: because the prefix occupies KV slots, a 20-token prefix at every layer permanently shortens the usable context and its quality is non-monotonic in prefix length, which is why the original work needed a reparameterization MLP to train stably at all.
Mathematical Formulation:
Where:
is the sublayer output and
the input;
is the frozen pretrained matrix of shape
.
and
are the LoRA factors with rank
;
is Gaussian-initialized and
is zero-initialized so training starts from the pretrained function.
is a scaling constant, and the ratio
keeps the effective update magnitude roughly stable when you sweep
;
is the merged weight used at inference.
and
form the adapter bottleneck of width
, with nonlinearity
; the residual term
plus near-zero initialization makes the adapter an approximate identity at step 0.
are the per-layer, per-head prefix key and value vectors of length
;
are the ordinary projected keys and values, so attention runs over
positions for a sequence of length
.

Figure 2: Illustrative budgets for a 7B decoder with and 32 layers. Parameter counts span three orders of magnitude, yet the latency picture is unrelated to them: the smallest method is not the fastest, and merged LoRA is free.
| Dimension | LoRA | Serial Adapters | Prefix / Prompt Tuning |
|---|---|---|---|
| Insertion point | Parallel to chosen linear layers (q,v by default; all attention and FFN projections for hard tasks) | Serial bottleneck after the attention and FFN sublayers | Extra K/V vectors at every layer (prompt tuning: input embeddings only) |
| Trainable share (7B) | 0.05-0.5% (8.4M at r=16 on q,v) | 0.5-3% (33.6M at b=64, two per layer) | Under 0.1% (5.2M for a 20-token prefix) |
| Mergeable | Yes, algebraically exact | No, extra depth is irreducible | No, but no weight is modified either |
| Inference cost | 0% merged; roughly 5-10% unmerged at batch 1 | Roughly 10-25% at batch 1, worst at small batch | Small KV cost, but the prefix permanently shortens usable context |
| Many tasks, one base | Strong: keep unmerged and batch a per-request low-rank gather | Weak: needs a per-request module swap, though AdapterFusion composes trained modules | Strong: a prefix is just cached K/V, trivially per-request |
| Quality on hard tasks | Matches full fine-tuning closely at adequate rank; underfits at very low r on large domain shifts | Comparable to LoRA, with a well-studied bottleneck-width knob | Lags on generation and reasoning; unstable below roughly 10B parameters |
| Choose it when | Default choice; memory-bound runs pair it with 4-bit QLoRA; hundreds of task variants over one base | You want modular, composable, independently versioned task modules and have latency headroom | Base weights must stay immutable, or you need cheap per-request conditioning at very large scale |

















