LoRA: Low-Rank Adaptation of Large Language Models
Fine-tune GPT-3 while training 10,000× fewer parameters
LoRA: Low-Rank Adaptation of Large Language Models
Full fine-tuning copies the whole model per task
Every task gets its own 175B-parameter copy, about 350 GB each. Adapters avoid that but add sequential layers, and latency, at inference.
Freeze the pretrained weights. Learn a tiny low-rank update beside each projection, then merge it in after training. A task checkpoint shrinks to 35 MB.
The weight change needed for adaptation has very low intrinsic rank.
Keep W frozen and learn a low-rank detour
B starts at zero, so training begins exactly at the pretrained model. With rank r as small as 1 to 8, the update adds almost no parameters.
- W0
- Frozen pretrained weight, d×k
- B
- Trainable d×r matrix, initialized to zero
- A
- Trainable r×k matrix, random Gaussian init
- α/r
- Scale, so changing the rank needs little retuning
Three steps from frozen model to task expert
- 1
Pick the projections
Apply LoRA to attention weights; adapting both Wq and Wv worked best under a fixed parameter budget.
- 2
Train only A and B
Optimizer state shrinks with them. On GPT-3 175B, training memory drops from 1.2 TB to 350 GB.
- 3
Merge for deployment
Compute W=W0+BA once. Inference runs at full speed with zero added latency.
More trainable parameters do not mean better accuracy

GPT-3 175B on WikiSQL and MultiNLI. LoRA, the pink triangles, stays near the top at small budgets, while prefix-based methods degrade as their parameter count grows.
Matches or beats full fine-tuning on GPT-3
GPT-3 175B validation accuracy (%), from Table 4.
Where low rank stops being free
Batching mixed tasks is awkward
Merged weights serve one task. Mixing tasks in one batch means keeping A and B separate, which brings back some overhead.
Which matrices to adapt is heuristic
The paper studied attention weights only and left MLP, LayerNorm and bias adaptation to future work.
Rank is a guess
Tiny ranks suffice on these benchmarks, but tasks far from pretraining, like a new language, may need more.
Why it matters
- Adaptation updates live in a tiny subspace; ranks of 1 to 8 often suffice.
- Zero inference latency: merge BA into the base weights before deployment.
- LoRA became the default parameter-efficient fine-tuning method across open models and toolkits.
69 upvotes on Hugging Face 8 slides, 2 min
17 Jun 2021