▶Fine-tune Calculator▋

// guides

How Much VRAM Do You Need to Fine-Tune an LLM? Full vs LoRA vs QLoRA

The memory bill for fine-tuning an open-weight model — weights, gradients, optimizer state and activations — and why QLoRA turns a 120 GB job into a 5 GB one.

reviewed 2026-11-15 · by Bedino

Fine-tuning has a reputation for needing a data-centre. It does — if you update every weight. But most useful fine-tunes today use a trick that cuts the memory bill by one to two orders of magnitude. To see why, you need to know what the bill is made of.

The four line items

When you train a model, the GPU holds:

  1. Base weights. The model itself. 2 bytes per parameter in bf16, about 0.5 in a 4-bit format.
  2. Gradients. One value per trainable parameter, usually in bf16 (2 bytes).
  3. Optimizer state. Adam keeps two moving averages per trainable parameter (8 bytes in fp32), and full fine-tuning in mixed precision also keeps an fp32 master copy of the weights (4 more bytes).
  4. Activations. The intermediate values of the forward pass, needed for the backward pass. These scale with batch size, sequence length and model width — not with the number of trainable parameters.

Full fine-tuning makes every parameter trainable, so line items 2 and 3 are as big as the model, several times over. That is the 16 bytes per parameter people quote: 2 (weights) + 2 (gradients) + 4 (fp32 master)

  • 8 (Adam state).

Three methods, three very different bills

All figures use the calculator’s reference setup: batch size 4, sequence length 2,048, gradient checkpointing on, LoRA rank 16, Adam. Values are in GiB.

Model Full fine-tune LoRA (16-bit base) QLoRA (4-bit base)
Llama 3.1 8B 121.1 16.6 5.4
Qwen3 14B 222.0 29.9 9.3
Qwen3 32B 490.7 64.2 18.4
Llama 3.3 70B 1,055.8 137.3 38.7

Full fine-tuning of an 8B model is 15.0 GiB of weights, 15.0 GiB of gradients and 89.7 GiB of optimizer state and master weights, plus 1.4 GiB of activations. It needs at least two 80 GB cards, usually with sharding (see the multi-GPU guide). A 70B full fine-tune is a cluster job.

LoRA freezes the base model and trains small low-rank adapter matrices on the attention and MLP projections. For Llama 3.1 8B at rank 16 that is about 29 million trainable parameters — 0.37 percent of the model. Gradients and optimizer state shrink to a few hundred megabytes, so the bill is the 16-bit base plus activations: 16.6 GiB, which fits a 24 GB card.

QLoRA does the same but stores the frozen base in 4 bits, so the base shrinks from 15.0 to 3.7 GiB. The adapters are still trained in 16-bit. The total for the 8B model is 5.4 GiB: it runs on an 8 GB card. A 32B model fits a 24 GB card (18.4 GiB) and a 70B model fits a 48 GB card (38.7 GiB).

What each method is good for

Goal Method
Teach a style, a format, a domain vocabulary, tool use LoRA or QLoRA
Squeeze a big model onto limited hardware QLoRA
Maximum quality on a large, high-quality dataset, with budget Full fine-tuning
Continued pre-training on lots of new text Full fine-tuning (or high-rank LoRA with care)
Many specialised variants of one base model LoRA: ship small adapters, share the base

LoRA adapters have a practical bonus: an adapter for an 8B model at rank 16 is about 60 MB, so you can keep dozens of them and swap them at serving time.

What the numbers leave out

These are first-order estimates. They do not include framework specifics — DeepSpeed, FSDP, Unsloth and Axolotl each use memory a little differently — nor flash-attention’s activation savings, sequence packing, CPU or NVMe offload, or the exact set of modules you adapt. Treat the result as a way to pick a method and a batch size, then confirm with a short real run and watch the peak memory.

Reduce the bill further

The next guide covers the levers that matter most once you have chosen a method: the optimizer, gradient checkpointing and batch size. To compare methods on your own model, use the fine-tuning VRAM calculator.

faq
Why does full fine-tuning need so much more memory than running the model?
Running a model only needs its weights and a cache. Training also needs a gradient for every trainable weight, optimizer state for each of them (Adam keeps two extra values per weight) and, in mixed precision, an fp32 master copy of the weights. That adds up to roughly 16 bytes per parameter, eight times the 2 bytes per parameter that the 16-bit weights alone cost.
Is QLoRA as good as LoRA?
In the published QLoRA results, fine-tuning through a 4-bit frozen base matched 16-bit LoRA and full fine-tuning on common benchmarks. Your own task may differ, and the 4-bit base is slightly slower per step because weights are de-quantized on the fly. If the 16-bit LoRA fits in memory, use it; if not, QLoRA is the standard fallback.
How much does the LoRA rank change the memory?
Very little. Going from rank 8 to rank 64 on an 8B model changes the trainable parameters from 15 million to 117 million, but the total footprint moves by only about 1 GiB because the frozen base dominates. Choose the rank for quality and speed, not for memory.
Can I fine-tune on a laptop or a gaming GPU?
Yes, with QLoRA and a small batch. An 8B model needs about 5.4 GiB in the calculator's reference setup, a 14B about 9.3 GiB and a 32B about 18.4 GiB, so an 8 GB, 12 GB and 24 GB card respectively can work, with short sequences.
more guides