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

DoRA: Weight-Decomposed Low-Rank Adaptation

Listen as a podcast →

The Flaw in LoRA That DoRA Fixes

In one sentence: LoRA's correction changes the magnitude and the direction of the weights in a single move, whereas full fine-tuning can vary one without the other; DoRA (Weight-Decomposed Low-Rank Adaptation) separates the two controls.

LoRA is the common method for efficient fine-tuning. But compared with full fine-tuning (the kind that modifies every parameter) it stays behind. DoRA's authors went looking for the reason and found a difference in kind: full fine-tuning and LoRA do not deform the weights the same way.

DoRA: Weight-Decomposed Low-Rank Adaptation (Liu et al., 2024)

The Idea: Separate Magnitude from Direction

Picture each column of a weight matrix as an arrow, a vector. An arrow has two independent properties:

  1. Its magnitude: its length. How much this weight counts.
  2. Its direction: where it points. What role this weight plays.

Think of a car: magnitude is speed, direction is heading. You can accelerate without turning, or turn without accelerating. Two separate controls.

Full fine-tuning has both controls. It can lengthen an arrow without rotating it, or rotate it without lengthening it. That is part of its strength.

LoRA has only one knob: its correction B×AB \times A is added in one lump and moves length and heading together. Like a car that can only accelerate while turning.

What the Paper Observed

The paper measures, layer by layer and across training, how much the magnitude moved and how much the direction moved, then checks whether the two quantities move together.

The result: under full fine-tuning they are anticorrelated. When magnitude moves a lot, direction moves little, and the other way round. LoRA produces the opposite: both rise together. DoRA recovers full fine-tuning's anticorrelation.

This is an observation about the shape of the updates, not about a score. It is visible in the figure below.

Three scatter plots from the DoRA paper. The x axis is the directional change delta D, the y axis the magnitude change delta M, for the V weight matrices of six layers at several training steps. Panel (a) full fine-tuning: the regression line slopes down, negative correlation. Panel (b) LoRA: the line slopes up, positive correlation. Panel (c) DoRA: the line slopes down again, negative correlation, just like full fine-tuning.
Each dot is one layer at one point in training. Look at the slope of the blue line: it goes down for full fine-tuning (a) and for DoRA (c) (when magnitude moves a lot, direction barely moves) but it goes up for LoRA (b), which can only change both together. This is exactly the pattern described above, measured on a real model.Source : DoRA paper (Liu et al., figure 7), via velog

How DoRA Works

DoRA rewrites each weight matrix as the product of two things:

W=m×V∥V∥W = m \times \frac{V}{\lVert V \rVert}

Read the formula back in one sentence: divide each column by its own length, which leaves nothing but its orientation, then multiply back by whatever length you want, stored separately. Symbol by symbol:

  • mm: the vector of magnitudes, one number per column. For a matrix with 4096 columns, a vector of 4096 numbers.
  • VV: the matrix of directions.
  • ∥V∥\lVert V \rVert: the norm of each column of VV, i.e. its length in the ordinary sense (the square root of the sum of the squares of its entries). Dividing by it yields a column of length 1: only the heading remains.

Then comes the division of labour, and that is all DoRA is:

ComponentHow it is updatedStatus
The magnitude mmlearned directly, no low-rank tricklearned parameter, one number per column
The direction VVgets a LoRA correction, B×AB \times Alearned parameters: matrices A and B
The original matrix W0W_0used to initialize mm and VV, then never movesfrozen

Two separate learning paths, then. Magnitude can vary without direction moving, and the reverse. And as with LoRA, everything merges back into a single matrix at the end: no inference overhead.

Two-step diagram. Step 1: the pretrained weight matrix W0 is decomposed into a magnitude vector m, equal to the column-wise norm of W0, and a directional matrix V initialized to W0 and divided by its norm. Step 2: the model is finetuned, the magnitude vector m is trainable (green) and the change in direction delta V is approximated by two LoRA matrices A and B of rank r, while the pretrained weights stay frozen (blue). Both components are then merged back into a single weight matrix.
The full mechanism. On the left, the decomposition: the column lengths are pulled out into a small vector m and the rest is kept as the direction V. On the right, training: m is trained directly, the direction gets a standard LoRA update (the two trapezoids A and B), and everything is merged back into one matrix at the end, so no inference overhead.Source : Sebastian Raschka, Ahead of AI (annotated after the DoRA paper figure)
How Many Parameters Does DoRA Add to LoRA?

Count it for a 4096 x 4096 matrix with r = 16. LoRA puts 16×(4096+4096)=131,07216 \times (4096 + 4096) = 131{,}072 parameters there. DoRA adds the magnitude vector: 4,096 numbers, one more per column.

4096/131,072=3%4096 / 131{,}072 = 3\% more trainable parameters. Negligible.

Results: DoRA Narrows the Gap

The paper compares DoRA with LoRA across eight evaluations (commonsense reasoning, visual instruction tuning, image-text and video-text understanding) and reports a gain on all of them.

We reproduce no score table here. The paper's abstract claims DoRA "consistently outperforms LoRA" without giving a single number, and we could not check any precise value against a consultable source. What is visible and verifiable is the shape of the result: the gain is everywhere and it is modest. The figure below shows that better than a table would.

Eight-axis radar chart comparing DoRA (green polygon) and LoRA (blue polygon) across eight evaluations: Commonsense on LLaMA, LLaMA2 and LLaMA3, MT-bench on LLaMA and LLaMA2, visual instruction tuning on LLaVA-1.5, image-text and video-text on VL-BART. The green DoRA polygon sits outside the blue LoRA one everywhere.
The same comparison across eight different evaluations, text and multimodal alike. Green (DoRA) lies outside blue (LoRA) on every single axis: the gain is not the artifact of one benchmark, it repeats everywhere, even if it stays modest in absolute terms. Note that no axis carries a curve for full fine-tuning: this chart does not tell you how far ahead that still is.Source : NVIDIA Developer Blog (DoRA team)
What to Take from the Results

At equal rank, DoRA beats LoRA everywhere, by a little. This is not a generational leap: it is a steady gain bought with 3% more trainable parameters and a bit more compute. At that price, it is worth having.

Using DoRA in Practice

One setting to change, with Hugging Face's PEFT (Parameter-Efficient Fine-Tuning) library:

from peft import LoraConfig, get_peft_model

config = LoraConfig(
    r=16,
    lora_alpha=32,
    target_modules=["q_proj", "k_proj", "v_proj", "o_proj"],
    use_dora=True,  # Activates DoRA instead of LoRA
    lora_dropout=0.05,
)

model = get_peft_model(base_model, config)

One use_dora=True, and that is all: nothing else to rewrite. The compute overhead comes mainly from dividing column by column by the norm, which has to be redone at every step since the direction keeps changing.

When to Choose DoRA over LoRA?

  • LoRA is enough for a simple adaptation (changing tone, changing answer format) or whenever training speed is the deciding criterion.
  • DoRA is preferable when you want the best quality at a tight parameter budget, or on tasks where LoRA visibly stays below full fine-tuning.
There Is a Training-Time Overhead

DoRA trains slower than LoRA, because the column-wise renormalization has to be redone at every step and the gradient has to pass through it. The paper acknowledges this cost and proposes a way to reduce it.

We put no number on it: the paper's abstract gives no percentage, and the figures in circulation ("20 to 30%") trace back to no measurement we could verify. Measure it on your own setup; it takes minutes.

If speed were the priority, LoRA at a higher rank remains an option.

Combining with QLoRA

DoRA sits happily on top of QLoRA, i.e. a frozen base model compressed to 4 bits. The two act in different places: QLoRA compresses what is frozen, DoRA reorganizes what is learned. The combination, sometimes called QDoRA, fits on a consumer card.

In summary: DoRA separates the magnitude of the weights from their direction, learns the first directly and hands the second to LoRA. A little more quality, 3% more parameters, one setting to change, and nothing to pay at inference since everything merges back.

Check your understanding0 / 4

1. What structural difference did the DoRA authors measure between LoRA and full fine-tuning?

2. In DoRA, how is the learning work divided up?

3. DoRA adds a magnitude vector to every adapted matrix. How much does that add to LoRA's trainable parameters?

4. Where does DoRA make you pay for its quality gain?