Papers · 2021 · Reading: 25 min, plus 1 in closed details.
Paper · ICLR 2022 · arXiv 2106.09685

LoRA: Low-Rank Adaptation of Large Language Models (LoRA)

Edward J. Hu*, Yelong Shen*, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, Weizhu Chen (* equal contribution)
Microsoft · June 2021 (arXiv v1); v2 October 2021

In one line: Freeze W0 and train a zero-initialized low-rank update W = W0 + BA (scaled alpha/r) on attention weights; matches full fine-tuning on GPT-3 175B with 10,000x smaller checkpoints and zero inference latency after merging.

73.4 / 91.7 %
GPT-3 175B, WikiSQL / MNLI-m, with 4.7M trainable parameters
full fine-tuning of all 175,255.8M: 73.8 / 89.5 · Table 4
35 MB
a GPT-3 adapter (r = 4, Wq and Wv) against a 350 GB copy
roughly 10,000× smaller checkpoints · §4.2
0 ms
extra inference latency after merging W = W0 + BA
adapters add up to 30.3% on GPT-2 medium at batch 1 · Table 1

How far to trust it: Believe the mechanism and the engineering: merging is exact, the parameter and storage savings are arithmetic, and five years of use have confirmed it. Treat the claim that LoRA beats full fine-tuning as unproven: the margins sit inside the noise, the baselines were not run under the same conditions, and the GPT-3 results come from runs nobody outside could repeat. The evidence, judged.

The idea in one sentence: freeze every pretrained weight and learn each adapted matrix's change as the product of two thin matrices, ΔW = BA of rank r as small as 1 to 8; on GPT-3 175B that trains 4.7 million numbers instead of 175 billion, matches full fine-tuning, and, once BA is added into W, costs nothing at inference.

You need: nothing beyond a Transformer's attention matrices and Adam's per-weight state. How LoRA is used today (QLoRA, DoRA, rsLoRA, target modules, the fine-tuning memory calculator) is taught on Parameter-efficient fine-tuning; this page is the paper. New terms: r (the rank of the update, the width of the side path); A, B (the down- and up-projection that LoRA trains); α (a constant; the update is scaled by α/r); adapter layer (a small bottleneck MLP inserted in sequence, the 2019 method LoRA replaced); prefix tuning (trained vectors prepended to the input or to every layer); φ (a 0 to 1 overlap between two subspaces, the paper's Equation 4).

Fig. 1 · a frozen matrix, plus a trainable side path that is r numbers thick

The paper's Figure 1 redrawn with GPT-3's numbers. Grey: one pretrained d × d attention matrix, d = 12,288, frozen. Blue: A (r × d, random Gaussian at the start) squeezes the token from d numbers to r, B (d × r, zeros at the start) expands it back; at r = 4 the pair holds 2 × 4 × 12,288 = 98,304 trainable numbers, 0.065% of the matrix beside it. B starts at zero, so training starts exactly at the pretrained model. For deployment add BA into W0 once: the model is the original shape again, with no extra latency (§4.1).

Problem

§1, §2, §3, Table 1

Full fine-tuning updates every weight, so each downstream task gets a complete copy of the model. For GPT-2 or RoBERTa large that is an inconvenience; for GPT-3, with 175 billion trainable parameters (about 350 GB in FP16), storing, deploying and switching between one copy per task is "prohibitively expensive" (Abstract, §2). Fine-tuning is still worth having: on GPT-3 it lifts MNLI-matched from 40.6% few-shot to 89.5%, and RTE from 69.0% to 85.4% (Appendix A, Table 8).

The parameter-efficient alternatives of 2021 each paid a real cost (§3):

  • Adapter layers (Houlsby et al. 2019, two per block; Lin et al. 2020, one per block plus a LayerNorm) add depth that must run in sequence. On GPT-2 medium at batch size 1 and 128 tokens, a forward pass takes 19.8 ms without adapters, 23.9 ms with AdapterL (+20.7%) and 25.8 ms with AdapterH (+30.3%); at batch 32 and 512 tokens the overhead shrinks to 2.2% and 3.0% (Table 1, Appendix B). It gets worse when the model is sharded, because the extra depth needs more synchronous GPU operations such as AllReduce and Broadcast, unless the adapter weights are stored redundantly many times (§3).
  • Prefix and prompt tuning (Li & Liang 2021; Lester et al. 2021) are hard to optimise, their quality changes non-monotonically with the number of trainable parameters, and the tokens they reserve come out of the sequence length available for the task (§3).

The question: can adaptation be parameter-efficient, train stably, match fine-tuning and add exactly zero inference latency?

Idea

§4.1, Eq. 3, Figure 1

Aghajanyan et al. (2020) had shown that fine-tuning has a low "intrinsic dimension": optimising only 200 parameters, randomly projected back into the full space, gets RoBERTa to 90% of full fine-tuning's performance on MRPC (Aghajanyan et al.). LoRA's hypothesis is the matrix version of that: the change in a weight matrix during adaptation has a low "intrinsic rank" (§1, §4.1). So for a pretrained weight W0 ∈ ℝd×k, freeze it and learn the update as a product of two thin matrices:

h = W0x + ΔW x = W0x + (α/r) B A x,   B ∈ ℝd×r, A ∈ ℝr×k, r ≪ min(d, k)
Equation 3 (§4.1), with the α/r scaling from the same section. Only A and B receive gradients; both paths see the same input and their outputs are summed (Figure 1).
  • Initialisation. A is random Gaussian and B is zero, so ΔW = BA = 0 at the start: training begins exactly at the pretrained model (§4.1).
  • Scaling. ΔW x is multiplied by α/r, with α a constant. With Adam, tuning α is roughly the same as tuning the learning rate if the initialisation is scaled to match, so the authors set α to the first r they try and never tune it; the point is not to retune hyperparameters when r changes (§4.1).
  • How small. On GPT-3, where d is 12,288, r = 1 or 2 already suffices (§1).
The released code initialises differently

The released code differs in a detail: its linear layers draw A from a Kaiming-uniform distribution, and its embedding layers reverse the roles (A zero, B normal) (loralib/layers.py).

Fig. 2, step by step: Equation 3 on a real matrix

The toy model of the Train a LoRA tab: its frozen Wv and the LoRA that was trained on it, on a task whose true update is known (task "Wv, rank 4"). Every bar is a real weight, up positive, down negative, all at one scale. The same picture on a released model, SmolLM2-135M's layer 14 query matrix, is Fig. 2 of Parameter-efficient fine-tuning.

  1. The frozen matrix. W0 is the toy's pretrained Wv: 32 × 32 = 1,024 numbers, one bar each. The input x (32 numbers) flows through it to h = W0x, exactly as before adaptation. It will never receive a gradient.
  2. Two thin matrices, to scale. At r = 4, A is 4 × 32 (random Gaussian) and B is 32 × 4 (zeros): 256 trainable numbers against W0's 1,024 (the two bars at the back; on GPT-3 the same rank is 0.065% of a matrix, here 25% because d is only 32). They sit as an outer product: A's 32 columns line up with the update's columns, B's 32 rows with its rows. B = 0, so ΔW = (α/r)BA = 0 (the dashed square) and training starts exactly at the pretrained model.
  3. Training moves only A and B. Gradients (green) flow back from the output into B and A, never into W0. The bars on A and B are their trained values (seed 1, 2,000 steps, Wq and Wv adapted at r = 4), and their product, times α/r = 2, rises over the square: a full 32 × 32 matrix that has rank 4.
  4. Against the true update. Behind it is the edit that defines the task, ΔW* of rank 4 with four singular values of 1.53. What LoRA learned has singular values 1.51, 1.39, 1.30 and 1.01 and a cosine similarity of 0.81 with it; this configuration agrees with the edited model on 99.3% of the sequences the edit changes (mean of three seeds). The paper could not make this comparison: for GPT-3 nobody knows the true update.
  5. Merge, then serve. ΔW slides into W0: W = W0 + (α/r)BA is again one 32 × 32 matrix, A and B are dropped and the side path is gone. One product per token, exactly as before training: the merge checked under Merging.
Fig. 3 · one token through one matrix: LoRA against an adapter

Per token, one d × d matrix at d = 1,024. Adapter parameters: 2dr + r + d (§5.1); latencies: Table 1, whole forward passes. It plays once in view and stops for good when you take a control; the steps are on the left.

Fig. 3, step by step

One token through one weight matrix of GPT-2 medium (d = 1,024), with a LoRA update and then with an adapter (the toggle above the figure), drawn to scale: at r = 4 the small matrices are 4 numbers thick against 1,024.

  1. The token arrives. A vector x of d = 1,024 numbers enters a frozen pretrained weight W0 (1,024 × 1,024, about a million numbers).
  2. Frozen path: W0x. The pretrained product, exactly as before: d² = 1,048,576 multiply-adds. W0 gets no gradient and no optimiser state.
  3. Down: Ax. In parallel, A (r × d) squeezes x to r numbers. Drawn to scale: the thin strip is A.
  4. Up: B(Ax), times α/r. B (d × r) maps the r numbers back to d. B starts at zero, so at step 0 this path adds nothing and the model is exactly the pretrained one.
  5. Sum: h = W0x + (α/r)BAx. Both paths saw the same input; their outputs are added coordinate by coordinate. Only A and B train: 2dr numbers.
  6. After training: merge once. W = W0 + (α/r)BA is again a 1,024 × 1,024 matrix. Computed once; to switch tasks, subtract BA and add another B′A′.
  7. Serve: h = Wx. One product, the same shape and cost as the base model: zero added latency, by construction (§4.1).
LoRA with r = 1 on Wq and Wv in all 96 layers of GPT-3 175B. How many numbers are trained?

Method: where LoRA goes, and what it saves

§4.2

Any dense layer can take a LoRA update. In a Transformer there are four attention matrices (Wq, Wk, Wv, Wo, each treated as one dmodel × dmodel matrix even though its output is sliced into heads) and two in the MLP. The paper adapts only attention weights and freezes the MLPs, "both for simplicity and parameter-efficiency", leaving the MLP, LayerNorm and biases to future work; most experiments adapt just Wq and Wv (§4.2, §5.1). The paper uses dffn = 4 × dmodel and trains with Adam throughout (§1, conventions).

A generalisation of full fine-tuning. With LoRA on every weight matrix and all biases trained, setting r to the rank of the pretrained matrices roughly recovers full fine-tuning; as trainable parameters grow, LoRA converges to training the original model, while adapters converge to an MLP and prefix methods to a model that cannot take long inputs (§4.1).

Practical benefits on GPT-3 175B (§4.2):

  • Training memory falls from 1.2 TB to 350 GB, because frozen weights need no gradients or optimiser state; for a large Transformer trained with Adam the saving is "up to 2/3" when r ≪ dmodel (the abstract says 3 times).
  • With r = 4 on Wq and Wv, a checkpoint shrinks roughly 10,000× (350 GB to 35 MB). The 350 GB base is still needed to serve, but 100 adapted models cost about 350 GB + 100 × 35 MB ≈ 354 GB instead of 100 × 350 GB ≈ 35 TB.
  • Fewer GPUs are needed to train and I/O bottlenecks disappear; tasks can be swapped while deployed by swapping only the LoRA weights, so many customised models can be served from one copy of the base in VRAM.
  • Training is 25% faster than full fine-tuning: 32.5 tokens per second per V100 for full fine-tuning against 43.1 for LoRA with the same number of model-parallel shards. That is 24.6% less time per token, or 32.6% more tokens per second (footnote 5; checked in the tables tab).

The stated limitation. If you merge A and B into W to remove latency, one forward pass cannot easily serve a batch whose inputs belong to different tasks. Without merging, the LoRA modules can be chosen per sample, where latency is not critical (§4.2).

LoRA combined with prefix tuning (Appendix E)

LoRA is also orthogonal to other methods: Appendix E combines it with prefix tuning, and LoRA plus prefix-embedding reaches 75.0 to 76.2 on WikiSQL against 73.8 for full fine-tuning, while LoRA plus prefix-layer does slightly worse than LoRA alone (Appendix E, Table 15).

What GPT-3 adapters cost: move the rank, the matrices and the number of tasks

GPT-3 175B: dmodel = 12,288, 96 layers, 175,255.8M parameters (Table 4); FP16 is 2 bytes per number. The defaults reproduce Table 4's 4.7M and, at r = 4, §4.2's "35MB" (37.7 MB exactly) and "354GB for 100 models", independently from the formula.

Merging: zero latency, by construction

§4.1, "No Additional Inference Latency"

Both W0 and BA are d × k, so for deployment compute W = W0 + BA once and run inference exactly as a fine-tuned model would. To switch tasks, subtract BA and add another B′A′, a quick operation with very little memory overhead. This guarantees no added latency "by construction" (§4.1). Checked live on this page's toy model with its trained adapters: computing...

Results

§5, Tables 2 to 4, Figure 2

RoBERTa and DeBERTa on GLUE, GPT-2 on E2E NLG, GPT-3 175B on WikiSQL, MNLI and SAMSum, against full fine-tuning (FT), adapters and prefix tuning; all on V100s (§5).

Setup and every baseline

Setup. RoBERTa and DeBERTa on GLUE; GPT-2 on E2E NLG (WebNLG and DART in the appendix), following Li & Liang (2021); GPT-3 175B on WikiSQL, MNLI and SAMSum; all on V100s (§5, Appendix C). Baselines, reused from prior work where possible (asterisked rows) (§5.1): full fine-tuning (FT), FTTop2 (last two layers), BitFit (biases only), prefix-embedding (PreEmbed) and prefix-layer (PreLayer) tuning, and adapters H (Houlsby), L (Lin), P (Pfeiffer) and D (AdapterDrop).

prefix-embedding tuning on GPT-3 reaches 63.1% on WikiSQL with 256 prefix tokens. What happens with 512?
  • GLUE, encoders (Table 2): RoBERTa base, LoRA 87.2 average against 86.4 for full fine-tuning, with 0.3M against 125M trainable parameters; RoBERTa large 89.0 against 88.9 (0.8M against 355M); DeBERTa XXL 91.3 against 91.1 (4.7M against 1,500M). LoRA trains about 0.2% to 0.3% of the parameters. For a fair comparison with adapters, the † rows use the adapters' sequence length of 128 and one batch size, and start MRPC, RTE and STS-B from the pretrained model rather than from an MNLI-adapted one: there LoRA scores 88.6 against 88.4 for the best adapter (§5.2).
  • GPT-2 E2E NLG (Table 3): GPT-2 medium with LoRA reaches 70.4 BLEU against 68.2 for full fine-tuning, with 0.35M against 354.92M parameters, and has the best BLEU, NIST, METEOR, ROUGE-L and CIDEr of every medium-size method listed (adapters, prefix-layer, FTTop2). GPT-2 large with LoRA gets 70.4 BLEU against 68.5; on large, adapter L at 0.88M edges it on CIDEr (2.49 against 2.47). DART and WebNLG show the same picture (Appendix F.1).
  • GPT-3 175B (Table 4): with 4.7M trainable parameters, LoRA gets WikiSQL 73.4% (full fine-tuning 73.8), MNLI-matched 91.7 (89.5) and SAMSum ROUGE-1/2/L 53.8/29.8/45.9 (52.0/28.0/44.5). The paper's own noise estimates are ±0.5 on WikiSQL, ±0.1 on MNLI and ±0.2/±0.2/±0.1 on SAMSum, given once per task rather than per entry because of the training cost (§5.5).
  • Scaling the parameter budget (Figure 2, Table 15): LoRA stays flat or improves as trainable parameters grow, while prefix-embedding tuning drops sharply past 256 special tokens and prefix-layer tuning past 32; the authors suspect more special tokens shift the input distribution away from pretraining.
Low data: MNLI with 100 to 392k examples (Appendix F.3)

Low data (Appendix F.3, Table 16): on MNLI subsets of 100, 1k, 10k and 392k examples, LoRA scores 63.8, 85.6, 89.2 and 91.7 against fine-tuning's 60.2, 85.8, 88.9 and 89.5; prefix-embedding is near chance at 100 examples (37.6% against 33.3%). With the stated ±0.3 seed variance, LoRA wins at 100 and at full size and ties in between.

LoRA stays flat as its budget grows a hundredfold; prefix methods collapse

Answer the question above before you look. Figure 2 redrawn from Table 15's printed values; dashed: full fine-tuning of all 175B.

Inside the update: which matrices, what rank, what ΔW does

§7, Tables 5 to 7, Figures 3 and 4

The low-rank structure also makes the update readable. Section 7 asks three questions on GPT-3 (§7).

Which matrices, for a fixed budget? With 18M trainable parameters (about 35 MB in FP16), which is r = 8 on one matrix type, r = 4 on two, or r = 2 on all four, in all 96 layers: Wq alone gets 70.4% on WikiSQL and Wk alone 70.0%, clearly worse, while Wq, Wv at r = 4 gets 73.7% and all four at r = 2 gets 73.7% (MultiNLI 91.3% and 91.7%). The paper concludes that even r = 4 captures enough of ΔW that adapting more matrices beats a higher rank on one (§7.1, Table 5). Wo alone (73.2%, 91.3%) and Wv alone (73.0%, 91.0%) are close to the best; see How much to believe.

What rank? On WikiSQL and MultiNLI, r = 1 already does as well as r = 64 when adapting Wq and Wv (73.4% against 73.5%; 91.3% against 91.4%), while Wq alone needs a larger r (68.8% at r = 1, 70.5% at r = 4) (§7.2, Table 6). The authors do not expect small r to work everywhere: if the downstream task were in a different language from pretraining, retraining the whole model (LoRA with r = dmodel) could certainly do better (footnote 6). On GPT-2 medium the optimum is between 4 and 16: BLEU peaks at r = 4 (70.38) and validation loss stops improving at 16 (Appendix H.2, Table 18).

Do different ranks and seeds find the same directions? Take the learned A at r = 8 and at r = 64, compute their right-singular vectors U, and measure how much of the span of the top i of one lies in the span of the top j of the other:

φ(Ar=8, Ar=64, i, j) = ‖Ui⊤Ar=8 UjAr=64‖F2 / min(i, j) ∈ [0, 1]
Equation 4 (§7.2): 1 means one subspace contains the other, 0 that they are orthogonal; a rescaled Projection Metric (Appendix G).

In layer 48 of 96, the top direction of r = 8 and r = 64 overlap with φ > 0.5 for both ΔWq and ΔWv, and the rest look like noise accumulated in training: that is why r = 1 works (Figure 3). Two seeds at r = 64 share their top directions too, while two random Gaussian matrices share none; ΔWq shares more directions across seeds than ΔWv, so it seems to have a higher intrinsic rank, in line with Table 6 (Figure 4). The 1st, 32nd, 64th and 96th layers look the same (Appendix H.1). The Train a LoRA tab draws the same heatmaps from a toy model, where the true update is known.

Fig. 4, step by step: the paper's Figures 3 and 4 on the toy

Measured on the toy's adapters for task "Wv, rank 4" (ΔWv, seeds 1 and 2, ranks 4 and 16), with the paper's φ: each plate is a grid of φ(i, j), bar height from 0 to 1, the top-i directions of one matrix down the side and the top-j of the other across.

  1. Four strong directions, then noise. The learned ΔWv at r = 16 has 16 singular values (front row): 1.33, 1.19, 1.02 and 0.76, then 0.17 and less. The edit it had to learn has four, of 1.53 each (back row). Twelve of the 16 directions carry almost nothing: the paper's "noise accumulated in training".
  2. r = 4 against r = 16 (the paper's Figure 3). The top direction is shared, φ(1, 1) = 0.85, and the four directions of r = 4 lie mostly inside the top four of r = 16, φ(4, 4) = 0.79. A rank-4 adapter already finds what the rank-16 one keeps at its top.
  3. Seed 1 against seed 2 (Figure 4). Two runs at r = 16 from different random starts: φ(1, 1) = 0.93 and φ(4, 4) = 0.82, then the overlap falls to φ(16, 16) = 0.61. Independent runs agree on the top directions and not on the rest.
  4. Against the true edit, which the paper could not measure. The top i directions of A at r = 16 against the edit's four: φ(4, 4) = 0.76, and with all 16, φ(16, 4) = 0.88. The directions LoRA keeps at its top are, mostly, the ones the task needed.
  5. Two random matrices: the floor. Two Gaussian 16 × 32 matrices: φ(1, 1) = 0.03, rising only with the dimensions to φ(16, 16) = 0.48, about the half that any two 16-dimensional subspaces of a 32-dimensional space share. On GPT-3, with d = 12,288, this floor is near zero; on the toy it is higher, so read the other plates against it.
  6. All four, side by side. Learned subspaces share their top corner, random ones do not: the paper's Figures 3 and 4 on GPT-3's layer 48, here with the true update known. The Train a LoRA tab draws the same grids as heatmaps for every task and for ΔWq.
does ΔW point along the strongest directions of the pretrained W?

The paper's reading: low-rank adaptation amplifies task-specific features that pretraining learned but did not emphasise, a different set of directions for each task (§7.3, H.4). Open questions it lists: combining LoRA with other methods, how pretrained features are transformed, a principled choice of matrices, and whether W itself is rank-deficient (§8).

ΔW picks directions W barely uses (0.32 against 21.67 along W's own) and amplifies them about 21 times

Answer the question above before you look. Bars on a log scale, printed values from Table 7 (GPT-3, layer 48, ΔWq). The toy model's own Table 7, computed live from its trained adapters, is in the Train a LoRA tab.

How much of this to believe

§5, Tables 2 to 6, 15, Appendix D

What holds up. The mechanism's central claims are arithmetic, not measurement. Merging is exact (this page checks it live), so zero added latency is true by construction. The parameter counts reproduce from the formula for every GPT-3 configuration in Table 15, and the storage and multi-task figures follow from them (every number checked). Adapter latency (Table 1) is measured over 100 trials with error bars. And the method has since been replicated at every scale by everyone who fine-tunes models: it is the default in Hugging Face PEFT, and QLoRA (2023) and LoRA Without Regret (2025) reproduce "LoRA matches full fine-tuning" under stated conditions (beyond the paper; see Why it matters).

What is weaker, concretely:

  • "Better than fine-tuning" sits inside the noise. On GPT-3, LoRA's 73.4 against 73.8 on WikiSQL is within the stated ±0.5 (a tie, not a win). The MNLI gain (91.7 against 89.5) and SAMSum's 1.4 to 1.8 points are outside the stated noise, the paper's strongest results, though every method got one tuned learning rate shared across the three datasets and the same 2 epochs, one run per entry (Table 4, Table 12, D.4). On RoBERTa base the +0.8 average comes entirely from RTE: LoRA is 7.9 points ahead there and, over the other seven tasks, 0.1 points behind on average. RTE's dev set has 277 examples (a binomial standard error of about 2 points), and LoRA's RTE run started from its own MNLI-adapted checkpoint (Appendix D.1), while the fine-tuning numbers are reused from the fairseq release's single-task runs (fairseq README). The fair † setup narrows LoRA's lead over adapters to 0.2 points.
  • Baselines not run like for like. Asterisked rows are copied from other papers with their own tuning; LoRA rows are the median of 5 seeds (GLUE) or mean of 3 (GPT-2), each "taken from the best epoch" on the dev set that is reported (Appendix D); GPT-3 reports "the best validation performance from each run" (D.4).
  • Mixed configurations in one row. Table 4's 4.7M LoRA row takes MNLI 91.7 from the rv = 2 run, while rq = rv = 1 gives 91.3; its 37.7M row takes WikiSQL from a four-matrix run and MNLI from a two-matrix run (Table 15). A few printed values disagree between tables, and Appendix D.4 gives a wrong configuration for 37.7M (listed in the tables tab). None changes a conclusion, but the headline row is a best-of-two.
  • Parameter counts that do not recount. GPT-2 medium and large at the stated r = 4 give 0.39M and 0.74M, not the printed 0.35M and 0.77M (which equal the prefix-layer baseline's); DeBERTa XXL at r = 8 gives 2.36M, not 4.7M, unless the 1,536 × 1,536 pooler and classifier are counted, which the paper does not say (recount). The 1.2 TB training-memory figure matches no standard Adam accounting, and the paper gives none.
  • The analysis is one model, one layer, one or two seeds. Figures 3, 4 and Table 7 are GPT-3's layer 48, tasks unnamed, no error bars; in Table 5, Wo alone is within the stated noise of the "best" Wq, Wv.
  • GPT-3 cannot be rerun by anyone outside. The repository releases RoBERTa, DeBERTa and GPT-2 adapters and code, but nothing for GPT-3 (repository).

In the authors' favour: they state the low-rank limit themselves (footnote 6), give per-task noise for GPT-3 instead of hiding it, rerun adapter baselines in a deliberately restricted fair setup, and flag that some GPT-2 hyperparameters were tuned at r = 4 and may not suit other ranks (Table 18 caption).

Verdict: believe the mechanism and the engineering; they are exact, and five years of use confirm them. Read "on-par or better than fine-tuning" as "on par": the margins are inside the noise or produced by setup differences. The toy on this page agrees on what LoRA needs, enough rank on the right matrices, and shows where it falls short without them: (loading) (Train a LoRA).

What it takes to use this

  • Code and licence. microsoft/LoRA (loralib, MIT licence) with RoBERTa, DeBERTa and GPT-2 checkpoints; in practice everyone uses Hugging Face PEFT, which the repository itself points to since February 2023.
  • Hardware. LoRA removes optimiser state and gradients for frozen weights, not the weights or activations: the base must still fit (350 GB for GPT-3 in FP16). QLoRA's 4-bit base is what brought a 65B model to one 48 GB GPU (QLoRA); the memory of full fine-tuning, LoRA and QLoRA for any model is the calculator on Parameter-efficient fine-tuning.
  • Configuration. The paper's defaults: Wq and Wv, r = 4 to 8, α fixed, learning rates 2E-04 to 5E-04 (Tables 9 to 12). Since then: all linear layers, MLP above all, and about 10× the full fine-tuning learning rate (QLoRA, LoRA Without Regret; Then and now).
  • When it pays off. Many tasks or tenants on one base; small data; RL post-training (very low ranks suffice). When it buys little: a task far from pretraining (the paper's own footnote 6), datasets whose information exceeds the adapter's capacity, or very large batches, where LoRA pays a larger loss penalty than full fine-tuning (LoRA Without Regret).

Why it matters

beyond the paper

LoRA became the default way to fine-tune large models; Hugging Face PEFT's LoraConfig is the standard interface (PEFT LoRA guide). QLoRA (May 2023) backpropagates through a frozen 4-bit NormalFloat (NF4) base into LoRA adapters and fine-tunes a 65B model on a single 48 GB GPU, which put LLM fine-tuning within hobbyist reach (QLoRA; NF4, double quantisation and paged optimisers are explained on Parameter-efficient fine-tuning).

The zero-latency merge and the tiny adapters also created multi-tenant serving: S-LoRA serves thousands of concurrent adapters over one base, with up to 4× the throughput of PEFT and naive vLLM (S-LoRA). How a server batches requests for different adapters (Punica's kernel, S-LoRA's memory pool) is on LLM serving in production; this paper's own limit, that a merged model serves one task per batch, is what those systems remove.

Three later results an engineer should know, each tested against this paper's recipe (taught in full on Parameter-efficient fine-tuning):

  • rsLoRA (November 2023): dividing by r slows learning and stunts higher ranks; dividing by √r lets larger r trade compute for quality (rsLoRA; use_rslora in PEFT sets the scale to lora_alpha/√r). The paper's own Table 7 shows the effect: ‖ΔWq‖ is 6.91 at r = 4 and 3.57 at r = 64.
  • DoRA (NVIDIA, ICML 2024): splits each weight into magnitude and direction and applies LoRA to the direction only; it consistently beats LoRA on LLaMA, LLaVA and VL-BART with no inference overhead (DoRA, code at NVlabs/DoRA; use_dora in PEFT).
  • LoRA Without Regret (Thinking Machines, 29 September 2025): LoRA matches full fine-tuning when applied to all layers, especially the MLP and MoE layers (attention-only, this paper's choice, underperforms even at matched parameter count), and when the dataset does not exceed the adapter's capacity; for policy-gradient RL even rank 1 matches, because RL absorbs about 1,000 times less information per token than supervised learning; the optimal LoRA learning rate is consistently about 10× full fine-tuning's; and LoRA tolerates large batches less well, a penalty that more rank does not fix (LoRA Without Regret). Why the paper's 1/r factor makes that learning rate nearly independent of rank is on the PEFT page.
Where LoRA runs now (dated; checked 2 October 2026)

vLLM and SGLang batch many adapters over one base, SGLang "incorporating techniques from S-LoRA and Punica" (vLLM, SGLang). Apple ships per-feature adapters over one on-device model of about 3 billion parameters; a rank-16 adapter takes tens of megabytes and is loaded and swapped on the fly (Apple, June 2024). Fine-tuning services, including RL fine-tuning such as Thinking Machines' Tinker, are LoRA underneath (Tinker).

The scientific contribution has aged as well as the engineering one: the intrinsic-rank analysis (adaptation amplifies existing but unemphasised features in a low-dimensional subspace) remains a standard lens on what fine-tuning does.

Connections