Skip to main content
Start your own AI-powered blog — freeGet started →

QLoRA vs DoRA: Which Fine-Tuning Method Wins in 2026?

QLoRA vs DoRA: Which Fine-Tuning Method Wins in 2026?
Photo by DeepMind on unsplash

QLoRA vs DoRA: Which Fine-Tuning Method Wins in 2026?

Abstract visualization of a neural network representing model fine-tuning Photo by DeepMind on Unsplash

Quick Answer: They solve different problems — and the best answer in 2026 is often both at once (QDoRA). QLoRA is a memory technique: it quantizes the frozen base model to 4-bit NF4 so you can fine-tune an 8B model on a 10GB card and a 70B on a single 48GB card. DoRA is a quality technique: it decomposes each weight into magnitude and direction, closing most of the accuracy gap between LoRA and full fine-tuning — typically +1–4 points on reasoning and commonsense benchmarks, with the biggest wins at low ranks (r=8–16). DoRA costs roughly 20–25% extra training time and a sliver of VRAM; merged for inference, it's free. If you're VRAM-bound, start QLoRA; if you're quality-bound, flip on use_dora=True.

On This Page

LoRA in 60 Seconds: The Foundation

LoRA (Low-Rank Adaptation) freezes the pretrained weights W and learns a low-rank update: W′ = W + BA, where B and A are tiny matrices of rank r (typically 8–64). Instead of updating 8 billion parameters, you train maybe 40–80 million. Optimizer states shrink proportionally, checkpoints drop from 16GB to ~200MB, and you can hot-swap adapters over one base model.

The catch that motivated everything since: LoRA consistently lands a few points below full fine-tuning, especially on harder tasks and lower ranks. QLoRA and DoRA attack that from opposite ends — QLoRA makes LoRA cheaper, DoRA makes it better.

QLoRA: Quantize the Base, Train the Adapters

QLoRA (Dettmers et al.) keeps the LoRA recipe but stores the frozen base model in 4-bit NF4 (NormalFloat4) instead of 16-bit, with three supporting tricks:

  • NF4 quantization — an information-theoretically optimal 4-bit format for normally distributed weights
  • Double quantization — quantizes the quantization constants themselves, saving ~0.4 bits/parameter
  • Paged optimizers — spill optimizer states to CPU RAM on memory spikes instead of OOM-ing

Gradients still flow through the quantized weights into the 16-bit adapters, so training quality stays remarkably close to 16-bit LoRA — usually within ~1 point. The payoff is dramatic: base model memory drops ~4x, which is the difference between "rent an H100" and "use the RTX 3090 you already own." If you're choosing hardware for this, our GPU buying guide for AI work covers the used-card sweet spots.

DoRA: Magnitude Plus Direction

DoRA (Weight-Decomposed Low-Rank Adaptation, Liu et al., NVIDIA) starts from an observation about how full fine-tuning changes weights: it tends to make substantial directional changes with relatively independent magnitude changes, while vanilla LoRA couples the two. DoRA decomposes each pretrained weight matrix into a magnitude vector m and a directional component V, then:

  1. Applies the LoRA update only to the direction: V′ = (W + BA) normalized column-wise
  2. Trains the magnitude vector m separately and directly
  3. Recombines: W′ = m · V′

This decoupling lets DoRA mimic full fine-tuning's learning dynamics far more closely. In the original paper and subsequent replications, DoRA beats LoRA by ~+3.7 points on Llama-class commonsense reasoning suites and ~+1 point on multimodal instruction tuning — with the largest margins at low rank, where LoRA struggles most. Crucially, DoRA at r=8 often matches LoRA at r=32.

"DoRA is the rare fine-tuning paper whose gains survived independent replication. It's now our default over vanilla LoRA for any run where eval scores matter." — Open Model Training Survey, Q2 2026

Memory vs Quality: The Full Matrix

Approximate peak training VRAM (bf16 activations, batch size 1–2, 2k context, gradient checkpointing on, 8-bit/paged optimizer where applicable):

MethodBase precision8B model VRAM70B model VRAMQuality vs full FTTrainable params (8B, r=16)
Full fine-tunebf16~120–160GB (multi-GPU)~1.2TB+ (cluster)Baseline (100%)8B
LoRAbf16~18–22GB~150–170GB~95–98%~42M
QLoRA4-bit NF4~8–10GB~42–48GB~94–97%~42M
DoRAbf16~19–24GB~155–175GB~97–99%~43M (+magnitude vectors)
QDoRA4-bit NF4~9–11GB~44–50GB~96–98%~43M

Read the table pragmatically:

  • RTX 4090/3090 (24GB): QLoRA or QDoRA on 8B–14B models, comfortably. DoRA on 8B fits, barely, at short context.
  • Single 48GB card (RTX 6000 Ada, A6000): QLoRA/QDoRA on 70B is genuinely viable — this remains QLoRA's killer demo.
  • 8x80GB node: just do DoRA (or full FT) in 16-bit; quantization buys you nothing you need.

Abstract AI neural network visualization Photo by Google DeepMind on Unsplash

When DoRA's Gains Actually Matter

DoRA is not uniformly better — its edge concentrates in specific regimes:

  • Low-rank runs (r=8–16). This is DoRA's home turf. If you keep adapters small for serving/multi-tenant reasons, DoRA recovers most of what small r costs you.
  • Reasoning-heavy targets. Math, code, multi-step instruction following — tasks where LoRA's gap to full FT is widest show DoRA's biggest deltas.
  • Small or hard datasets. With 1k–10k examples, DoRA's closer-to-full-FT dynamics squeeze more from each sample.
  • Where it matters less: simple style/format adaptation, large-r runs (r=64+ narrows LoRA's gap anyway), and giant datasets where every method converges. For a persona-tuning job on 50k chat samples, vanilla QLoRA is usually indistinguishable.

Training Speed and Overhead

DoRA's weight normalization adds real compute during training: expect ~20–25% slower steps than equivalent LoRA in PEFT (earlier implementations were worse; kernel fusion improved through 2025). Memory overhead is small — magnitude vectors are tiny — but the normalization's activation footprint adds ~5–10%.

Two mitigations:

  1. lora_dropout=0 + Unsloth-style fused paths narrow the gap where supported.
  2. Merge for inference. DoRA (like LoRA) merges into the base weights after training — zero inference overhead. The 20% tax is paid once at training time, not on every generation. Note: a merged QDoRA adapter should be evaluated against the quantized base you'll serve, or re-merged into 16-bit weights if you serve unquantized.

Library Support and Config Flags

Support is mature across the 2026 stack:

LibraryDoRAQLoRANotes
HuggingFace PEFTuse_dora=True in LoraConfig✅ via bitsandbytes load_in_4bitReference implementation; QDoRA = both together
Unsloth✅ (supported; fused-kernel speedups mainly for LoRA/QLoRA)✅ (fastest single-GPU QLoRA)2x speed, ~50–70% VRAM savings claims hold up for QLoRA
Axolotlpeft_use_dora: trueload_in_4bit: true + adapter: qloraYAML-first; easiest multi-config sweeps
LLaMA-Factoryuse_dora: trueWeb UI + CLI
TRL (SFTTrainer)✅ via PEFT config passthroughPairs with DPO/GRPO stages

Minimal QDoRA setup with PEFT:

python
from transformers import AutoModelForCausalLM, BitsAndBytesConfig
from peft import LoraConfig, get_peft_model
import torch

bnb = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_use_double_quant=True,
    bnb_4bit_compute_dtype=torch.bfloat16,
)

model = AutoModelForCausalLM.from_pretrained(
    "meta-llama/Llama-3.1-8B-Instruct",
    quantization_config=bnb, device_map="auto",
)

config = LoraConfig(
    r=16, lora_alpha=32, lora_dropout=0.0,
    use_dora=True,                     # ← DoRA switch
    target_modules=["q_proj","k_proj","v_proj","o_proj",
                    "gate_proj","up_proj","down_proj"],
    task_type="CAUSAL_LM",
)
model = get_peft_model(model, config)  # QDoRA: 4-bit base + DoRA adapters

Hyperparameter Starting Points

HyperparameterQLoRA baselineDoRA/QDoRA baselineNotes
Rank (r)16–328–16DoRA tolerates lower r at equal quality
lora_alpha2x rank2x rankStandard scaling heuristic
Learning rate2e-41e-4 to 2e-4DoRA can be slightly LR-sensitive; when in doubt, go lower
lora_dropout0.050.0Dropout disables some fused fast paths
Target modulesAll linear layersAll linear layersAttention-only targeting leaves quality on the table
Epochs1–31–3Watch eval loss; small sets overfit fast
Batch (effective)16–64 via grad accum16–64Same as any LLM fine-tuning workflow

Verdict

  • VRAM-constrained (single 24GB card, big model): QLoRA — it's the only way in.
  • Quality-constrained (benchmarks, reasoning, low rank): DoRA, or QDoRA if memory is also tight — the ~20% training slowdown is almost always worth +1–4 eval points.
  • Default recommendation for 2026: start with QDoRA at r=16. You inherit QLoRA's memory profile and most of DoRA's quality recovery, and you can ablate use_dora=False in one flag if training speed becomes the bottleneck.

The framing "QLoRA vs DoRA" is really a category error the ecosystem has resolved: quantization decides where you can train, decomposition decides how good it gets. Use both.

Related Reads

Key Takeaways

  • Use QLoRA (4-bit NF4 quantization) to fine-tune 8B–70B models on consumer GPUs (e.g., 24GB RTX 3090/4090 or 48GB A6000), reducing VRAM usage ~4x vs 16-bit while maintaining ~94–97% of full fine-tuning quality.
  • Enable DoRA (use_dora=True) to close the accuracy gap between LoRA and full fine-tuning, especially for reasoning-heavy tasks or low ranks (r=8–16), where it typically adds +1–4 points over vanilla LoRA with minimal VRAM overhead.
  • Combine both as QDoRA (4-bit base + DoRA adapters) for the best quality-per-GB tradeoff in 2026: train 70B models on a single 48GB card while matching DoRA’s ~96–98% full fine-tuning accuracy.
  • Start with QDoRA at rank r=16, lora_alpha=32, and learning rate 1e-4–2e-4; lower to r=8 if adapter size or multi-tenant serving is critical (DoRA’s gains are largest at low ranks).
  • Merge DoRA/QLoRA adapters post-training for zero inference overhead, but evaluate merged models against the quantized base you’ll serve (or re-merge into 16-bit if unquantized).
  • Expect ~20–25% slower training steps with DoRA due to weight normalization, but mitigate via lora_dropout=0 and fused kernels (e.g., Unsloth) where supported.

Frequently Asked Questions

Is DoRA always better than LoRA?

Almost always equal or better on quality, at ~20–25% slower training. The advantage is largest at low ranks and on reasoning tasks; at r=64 on easy adaptation tasks the difference can vanish. There's no known regime where DoRA is meaningfully worse in final quality.

Can I combine DoRA with QLoRA?

Yes — that's QDoRA: 4-bit NF4 frozen base plus DoRA adapters, enabled in PEFT by using BitsAndBytesConfig(load_in_4bit=True) together with LoraConfig(use_dora=True). It's the best quality-per-GB option in 2026.

How much VRAM do I need to fine-tune a 70B model?

With QLoRA or QDoRA: roughly 44–50GB, so a single 48GB card (with short context and careful batch sizing) or 2x24GB consumer cards with FSDP/DeepSpeed. In 16-bit LoRA you need ~150GB+; full fine-tuning needs a multi-node cluster.

Does DoRA slow down inference?

No. Like LoRA, DoRA adapters merge back into the base weights after training, so served models run at exactly base-model speed. The compute overhead exists only during training (and if you serve unmerged adapters, where a small penalty remains).

What rank should I use with DoRA?

Start at r=16 with alpha 32. DoRA's headline property is strong performance at low rank, so if adapter size or multi-adapter serving matters, test r=8 — it frequently matches vanilla LoRA at r=32 on the same data.

S
Synor

1 followers

Deep dives on GPUs, decentralized AI, crypto, and open-source ML — buying guides, benchmarks, and tax/compliance explainers.

Comments

Sign in to join the conversation

No comments yet. Be the first to share your thoughts!

More from Synor

Recommended for you