DoRA: which component does LoRA actually adapt?
DoRA splits each weight into magnitude and direction, learns the magnitude directly, and applies LoRA only to the direction. This closes more of the gap to full fine-tuning.
Picture aiming a flashlight. A weight has two parts: how far the beam reaches, its length or magnitude, and where you point it, its direction. Plain LoRA tries to learn both at once with a small budget, so it gets pulled two ways and underfits. DoRA hands the length its own simple dial, a single number you turn directly, and spends the small LoRA budget purely on steering the beam. Because length and aim no longer fight over the same budget, the steering comes out cleaner. The result lands closer to retraining the whole flashlight from scratch, while still touching almost no extra parameters.
Detailed answer & concept explanation~7 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: state the decomposition, identify which component LoRA touches, explain the magnitude-direction motivation, then distinguish DoRA from AdaLoRA and QLoRA distractors.
| Method | What it parameterises | Key idea |
|---|---|---|
| LoRA | Low-rank update BA on the full weight | Couples magnitude and direction in one low-rank delta |
| DoRA | Direct magnitude scalar plus LoRA on the direction | Decouples length from aim to mimic full fine-tuning |
| AdaLoRA | SVD-form update with adaptive rank per layer | Allocates rank budget by importance via singular values |
| QLoRA | 4-bit frozen base plus bf16 low-rank factors | Memory trick, orthogonal to the decomposition idea |
Real products, models, and research that use this idea.
- Hugging Face PEFT ships DoRA as a flag (use_dora=True) on its LoRA config, so teams fine-tuning Llama 4 can A/B it against plain LoRA with one line.
- Unsloth and Axolotl both expose DoRA toggles in their fine-tuning recipes for open models like Mistral and Qwen variants.
- NVIDIA NeMo and the broader 2026 PEFT tooling list DoRA among recommended adapters for instruction-tuning open-weight bases such as Llama 4.
- Practitioners commonly benchmark DoRA against LoRA on commonsense-reasoning suites, where DoRA's magnitude-direction split shows a few-point accuracy lift at matched parameters.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy does decoupling magnitude from direction help LoRA approach full fine-tuning?
QHow does DoRA compose with QLoRA, and is stacking them sensible?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Confusing DoRA with AdaLoRA's SVD update or QLoRA's 4-bit base. DoRA's contribution is structural, a magnitude versus direction split, not a quantisation or rank allocation trick.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.