HomeSIFT AI · Research Breakdown
Research Breakdown

LoRA: Low-Rank Adaptation

Freeze the giant model, train two skinny matrices: adapt a 175B-parameter LLM with 10,000x fewer trainable weights and zero added inference latency.

Hu, Shen, Wallis et al.Microsoft CorporationarXiv:2106.09685
Intermediate10 min read
xW · frozenArB+h

Freeze W. Train only the skinny B·A detour — then fold it back in.

10,000xFewer trainable parameters than full GPT-3 175B fine-tuning3xLess GPU memory required during training0 msAdded inference latency: BA merges back into the frozen Wr = 1Rank that already suffices to adapt both W_q and W_v
How to read itDotted passages open the paper to that line.Solid terms link the glossary.
The whole paper in 20 seconds

TL;DR

The idea
The weight change learned during adaptation has a low intrinsic rank — so capture it with two skinny matrices.
The mechanism
Freeze the pretrained W; train only a parallel bottleneck B·A (A random, B zero, so it starts as a no-op).
The payoff
10,000x smaller per-task checkpoints (350GB → 35MB) and zero added inference latency once B·A folds into W.
The result
On GPT-3 175B, LoRA matches or exceeds full fine-tuning while training as few as 4.7M weights.
Why it exists

A full fine-tune per task doesn't scale

Fine-tuning updates every weight — so each downstream task needs its own full copy of the model.

The premise of adaptation is cheap once, expensive forever. Using GPT-3 175B as an example, deploying independent instances of fine-tuned models, each with 175B parameters, is prohibitively expensive. Existing shortcuts have a catch: parameter-efficient adapter layers cut the stored weights but run in series with the frozen model, so they add real latency at serving time.

The inference latency introduced by adapter layers can be significant in an online, short-sequence-length scenario.
The hunch

The update is low-rank, even if the weights aren't

Pretrained weight matrices are full-rank — but the change learned during adaptation may not be.

The weight matrices in these layers typically have full-rank, yet the authors hypothesize the update ΔW picked up while adapting to a task lives in a much smaller subspace — it has a low intrinsic rank. If that is true, you never need to store or train a full d×d update; two thin matrices suffice.

The engine

Freeze W, learn a low-rank detour

Keep the pretrained weight fixed and train a parallel bottleneck B·A beside it.

LoRA replaces the update with a rank-r product: ΔW = B·A, where A projects down to r dimensions and B projects back up. We use a random Gaussian initialization for A and zero for B, so ΔW = B·A is exactly zero at the start — training begins as the untouched pretrained model and only the two skinny matrices receive gradients.

Figure 1 — The LoRA reparametrization
Diagram of the LoRA reparametrization: input x feeds both the frozen pretrained weight matrix W and a low-rank bypass of two trainable matrices A (initialized from a normal distribution) and B (initialized to zero), whose outputs are summed into h.
Figure 1: Our reparametrization. We only train A and B.
Try it

How low can the rank go?

Sweep r on GPT-3 175B. For W_q and W_v together, accuracy barely moves from r=1 to r=64.

This is the intrinsic-rank claim, made empirical. To our surprise, a rank as small as one suffices for adapting both W_q and W_v on these datasets. Drag the rank and watch the bars stay flat:

Rank · r

1

Accuracy

73.4

7665

Essentially flat: only 0.5 points separate r=1 from r=64. The update's intrinsic rank is tiny.

Table 6 · Optimal rank r

Which knobs

Spread a small rank across more matrices

Given a fixed parameter budget, adapting both W_q and W_v beats a large rank on one.

One budget, three ways to spend it18M params · GPT-3 175B

W_q· r=870.4
W_qW_v· r=473.7best
W_qW_kW_vW_o· r=273.7

Adapting both W_q and W_v gives the best performance overall — spread a small rank across more matrices rather than piling rank onto one.

Table 5 · Which weights to adapt

The payoff

Tiny checkpoints, faster training, zero added latency

Because gradients only flow to A and B, everything downstream of the frozen weights gets cheaper.

With r = 4 and only the query and value projection matrices being adapted, the checkpoint size is reduced by roughly 10,000× (from 350GB to 35MB), and there is a 25% speedup during training on GPT-3 175B compared to full fine-tuning. At deploy time B·A folds back into W — so unlike adapters, serving latency is untouched:

Added inference latency · GPT-2 medium

LoRA / Fine-Tune
+0.0%
Adapter (L)
↑ 20.7%
Adapter (H)
↑ 30.3%

At batch size 1 (short-sequence online serving) adapter layers add up to +30.3%. LoRA merges B·A into W, so it adds nothing.

Table 1 · Inference latency (ms)

Does it hold?

It matches — often beats — full fine-tuning

From RoBERTa and DeBERTa on GLUE up to GPT-3 175B, quality holds while trainable weights collapse.

GPT-3 175B full fine-tuning scores 89.5 on MultiNLI-matched. What does LoRA — training just 4.7M weights — hit?

MultiNLI-matched validation accuracy

89.0
85full fine-tune 89.593

Trainable parameters: full fine-tune vs LoRA

log scale · matched task score annotated

RoBERTa-largeGLUE avg 88.9890.1
full
355M
LoRA
0.8M
DeBERTa-XXLGLUE avg 91.191.30.2
full
1.5B
LoRA
4.7M
GPT-3 175BMultiNLI-m 89.591.72.2
full
175B
LoRA
4.7M

Tables 2 & 4 · Trainable parameters

The paper plots this as accuracy against trainable-parameter count. Here is an on-theme recreation of that curve — LoRA stays high and flat where prefix methods sag:

Figure 2 — Accuracy vs. trainable parameters on GPT-3 175B
Two scatter plots of GPT-3 175B validation accuracy versus log trainable parameters on WikiSQL and MultiNLI-matched; LoRA (pink triangles) stays high and flat across parameter counts while PrefixEmbed and PrefixLayer degrade.
Figure 2: GPT-3 175B validation accuracy vs. number of trainable parameters of several adaptation methods on WikiSQL and MultiNLI-matched. LoRA exhibits better scalability and task performance.
Under the hood

Why a rank-one nudge is enough

ΔW doesn't repeat what W already does — it amplifies features W learned but underweighted.

Comparing the learned update to the pretrained weight, the authors find ΔW aligns with directions W barely uses, then scales them up — an amplification factor of about 21.5 at r=4. This suggests that the low-rank adaptation matrix potentially amplifies the important features for specific downstream tasks that were learned but not emphasized in the general pre-training model. A tiny, targeted lever on latent capacity — not a full rewrite.

The catch

Zero latency has a price

Merging B·A into W is what buys the free inference — and also what constrains batching.

The zero-latency trick works precisely because the low-rank update is absorbed into the frozen weight. But once merged, it is not straightforward to batch inputs to different tasks with different A and B in a single forward pass. A single batch can no longer mix requests belonging to different task-specific LoRA modules unless you keep the paths un-merged.

So what

Six things to remember

1

Freeze the model, train a bottleneck.

The pretrained weights stay full-rank and frozen; adaptation is captured by a low-rank BA path (A random, B zero) that starts as a no-op.

Weight updates have a low intrinsic rankFreeze W, train a down-then-up bottleneck A and B

2

10,000x smaller checkpoints, faster training.

Adapting only W_q and W_v at r=4 shrinks a per-task checkpoint from 350GB to 35MB and speeds GPT-3 175B training by 25% — no gradients for the frozen bulk.

10,000x smaller checkpoints, 2/3 less VRAM25% training speedup on GPT-3 175B

3

Zero added inference latency.

BA merges back into W at deploy time, so LoRA adds 0 ms — unlike adapter layers, which add up to +30.3% at batch size 1. The trade: you can't batch different tasks once merged.

Adapters add real inference latency; LoRA does notHard to batch different tasks in one forward pass

4

Matches or beats full fine-tuning.

From RoBERTa/DeBERTa on GLUE to GPT-3 175B on WikiSQL/MultiNLI/SAMSum, LoRA equals or exceeds full fine-tuning while training a tiny fraction of the weights.

Matches or beats full fine-tuning on GLUEOn GPT-3 175B, LoRA matches or exceeds fine-tuning

5

The update's intrinsic rank is tiny.

Rank one already suffices to adapt both W_q and W_v, and spreading a small rank across more matrices beats a large rank on one — the practical recipe.

Rank one already suffices for W_q and W_vAdapt both W_q and W_v, not one at high rank

6

It amplifies features the base model underweighted.

ΔW doesn't echo W's dominant directions; it selectively amplifies task-relevant features (factor ~21.5 at r=4) that pretraining learned but did not emphasize.

LoRA amplifies task features W underweights