Full fine-tuning with Adam needs about 16–20 bytes per parameter (128–160 GB for an 8B model) before activations. 16-bit LoRA needs about 2 bytes per parameter plus a few GB (≈20–26 GB for 8B). QLoRA needs about 0.5–0.6 bytes per parameter plus a few GB (≈8–13 GB for 8B, 45–60 GB for 70B).
- Full fine-tune (Adam, mixed precision)
- 16–20 bytes per parameter + activations
- 16-bit LoRA
- 2 bytes per parameter + a few GB
- QLoRA (4-bit NF4)
- 0.5–0.6 bytes per parameter + a few GB
- Llama 3.1 8B QLoRA
- ≈ 8–13 GB
- Llama 3.3 70B QLoRA
- ≈ 45–60 GB
- 70B full fine-tune
- ≈ 1,120–1,400 GB before activations
- Headroom to leave
- 10–20% for CUDA context and fragmentation
The fastest way to waste money on a fine-tuning job is to rent the wrong amount of GPU memory: too little and the run crashes at step one, too much and you pay for capacity you never touch. The good news is that fine-tuning memory is predictable. This guide gives the bytes-per-parameter rules, shows where every gigabyte goes, and maps 1B to 70B models onto real GPUs for full fine-tuning, LoRA and QLoRA. For how this fits into training as a whole, see our GPU model training guide.
Where does fine-tuning memory go?
Fine-tuning memory has five parts: model weights, gradients, optimiser state, activations, and overhead. The first three scale with the number of parameters you hold and train; activations scale with batch size and sequence length; overhead is roughly fixed.
| Component | What it is | Full fine-tune (Adam, BF16 mixed precision) |
|---|---|---|
| Weights | The model parameters used in the forward pass | 2 bytes/param (BF16) |
| Gradients | One gradient per trained parameter | 2 bytes/param |
| Master weights | FP32 copy that the optimiser updates | 4 bytes/param |
| Optimiser state | Adam's first and second moments, FP32 | 8 bytes/param |
| Subtotal | 16 bytes/param | |
| Activations | Intermediate values kept for the backward pass | Depends on batch × sequence length |
| Overhead | CUDA context, framework buffers, fragmentation | ≈ 1–3 GB, plus 10–20% headroom |
Some setups hold FP32 gradients as well, or keep extra buffers, which is why the range quoted in most guides is 16–20 bytes per parameter. Inference, by contrast, needs only the weights plus a KV cache, which is why a model you can run on a card is usually far too big to fully train on the same card. Our explainer on what GPU VRAM is covers the hardware side.
How do LoRA and QLoRA change the sum?
LoRA and QLoRA freeze the base weights, so the base needs no gradients, master copy or optimiser state. Only the small adapters, typically 0.2–1% of the parameter count, carry the full 16-byte training cost.
| Method | Base model | Adapters (≈0.5% of params) | Example: 8B model |
|---|---|---|---|
| Full fine-tune | 16–20 B/param | – | 128–160 GB |
| LoRA, 16-bit base | 2 B/param | ≈ 16 B × adapter params | 16 GB + 42M × 16 B ≈ 0.7 GB → ≈ 17 GB + activations |
| QLoRA, 4-bit base | 0.5–0.6 B/param | ≈ 16 B × adapter params | 4–4.8 GB + 0.7 GB → ≈ 5–5.5 GB + activations |
The 42 million adapter parameters are for Llama 3.1 8B at rank 16 on all linear layers; the arithmetic is in our LoRA and QLoRA guide. Notice how small the adapter term is. Once you use LoRA, base precision and activations decide whether you fit.
How much VRAM does each model size need?
Here is the full table. All figures are rule-of-thumb estimates at a 2,048-token sequence, micro-batch 1–4, gradient checkpointing on, with 10–20% headroom included in the totals.
| Model | Full fine-tune (16–20 B/param) | 16-bit LoRA | QLoRA |
|---|---|---|---|
| 1B (e.g. Llama 3.2 1B) | 16–20 GB → ≈ 20–26 GB total | ≈ 5–8 GB | ≈ 3–5 GB |
| 3B (Llama 3.2 3B) | 48–60 GB → ≈ 55–70 GB | ≈ 10–14 GB | ≈ 5–8 GB |
| 8B (Llama 3.1 8B) | 128–160 GB → ≈ 145–185 GB | ≈ 20–26 GB | ≈ 8–13 GB |
| 14B (Qwen2.5 14B) | 224–280 GB → ≈ 250–320 GB | ≈ 33–40 GB | ≈ 12–17 GB |
| 32B (Qwen2.5 32B) | 512–640 GB → ≈ 560–720 GB | ≈ 72–80 GB | ≈ 22–31 GB |
| 70B (Llama 3.3 70B) | 1,120–1,400 GB → ≈ 1,250–1,600 GB | ≈ 150–165 GB | ≈ 45–60 GB |
The full fine-tune column is the one that surprises people. Even an 8B model needs more memory than any single card except a B200 (180 GB usable) or B300 (288 GB), and in practice you would shard it across several GPUs.
Which GPU fits which fine-tuning job?
Divide the total by the card's VRAM and keep headroom. The table below uses the GPUs Wandering Giants Compute rents and their published memory; prices are our per-GPU-hour rates as of November 2026.
| GPU | VRAM | Price per GPU-hour | QLoRA up to | 16-bit LoRA up to | Full fine-tune, 1 card |
|---|---|---|---|---|---|
| RTX 4090 | 24 GB | $1.59/hr | ≈ 14B | ≈ 8B (short sequences) | ≈ 1B |
| L40S | 48 GB | $1.89/hr | ≈ 32B | ≈ 14B | ≈ 2B |
| A100 80GB | 80 GB | $3.79/hr | 70B | ≈ 32B (tight) | ≈ 3B |
| H100 | 80 GB | $4.99/hr | 70B | ≈ 32B (tight) | ≈ 3B |
| RTX PRO 6000 | 96 GB | $4.89/hr | 70B with room for longer context | ≈ 32B | ≈ 4B |
| H200 | 141 GB | $9.09/hr | 70B with long context | ≈ 50B | ≈ 7B |
| B200 | 180 GB | $15.49/hr | 70B+ with long context | 70B | ≈ 8B (tight) |
| B300 | 288 GB | $18.09/hr | 100B+ | 70B with long context | ≈ 14B |
The "full fine-tune, 1 card" column divides usable memory by about 20 bytes per parameter and leaves activation room, so it is conservative. With an 8-bit optimiser or CPU offload you can push further, at a speed cost.
How much memory do activations take?
Activations are the values each layer saves during the forward pass so the backward pass can compute gradients. They grow linearly with micro-batch size and sequence length, and they are the part that changes most between runs of the same model.
Without gradient checkpointing, a transformer stores many tensors per layer per token. With checkpointing, it keeps only each layer's input and recomputes the rest during the backward pass, which typically cuts activation memory by several times for about 20–30% extra compute. A practical rule:
- At 2,048 tokens and micro-batch 1–4, with checkpointing and Flash Attention or PyTorch SDPA, activations for 8B models are usually a few GB.
- At 8,192 tokens, expect roughly 4× that. At 32k tokens, activations can exceed the weights on a QLoRA run.
- Attention without a memory-efficient kernel grows with the square of sequence length. Always use Flash Attention or SDPA for long sequences.
If you need long-context fine-tuning, budget activation memory first, then pick the card. This is one place where the 141 GB H200 or 180 GB B200 earn their price even for an 8B model.
How do you cut fine-tuning VRAM?
You can almost always make a job fit with a few switches. In rough order of value:
- Use LoRA instead of full fine-tuning. Removes about 14 of the 16 bytes per parameter for the base.
- Use QLoRA if 16-bit LoRA still does not fit. Base weights drop from 2 to about 0.55 bytes per parameter.
- Turn on gradient checkpointing. Large activation saving, about 20–30% slower.
- Use Flash Attention or SDPA. Essential above 4k tokens.
- Lower micro-batch size, raise gradient accumulation. Same effective batch, less memory per step.
- Use an 8-bit or paged optimiser (
adamw_bnb_8bit,paged_adamw_8bit). Adam state drops from 8 to about 2 bytes per trained parameter. - Shard across GPUs with FSDP or DeepSpeed ZeRO-3. Divides weights, gradients and optimiser state by the number of GPUs.
- Offload to CPU (ZeRO-Offload). Fits much bigger models on fewer GPUs, but each step is slower because data crosses PCIe.
In Hugging Face code, items 3, 5 and 6 are single arguments:
from trl import SFTConfig
args = SFTConfig(
output_dir="out",
per_device_train_batch_size=1,
gradient_accumulation_steps=16,
gradient_checkpointing=True,
optim="paged_adamw_8bit",
bf16=True,
max_length=4096,
)What changes when you use several GPUs?
With plain data parallelism (DDP), every GPU holds a full replica, so per-GPU memory does not fall at all; you just process more data per step. With sharding, it does. FSDP's full-shard mode and DeepSpeed ZeRO stage 3 split weights, gradients and optimiser state across GPUs, so the parameter-proportional part divides by the GPU count. Activations do not shrink, because each GPU still processes its own micro-batch.
Worked example, full fine-tune of an 8B model at 16 bytes per parameter:
| Setup | Parameter-related memory per GPU | Plus activations and overhead | Fits on |
|---|---|---|---|
| 1 GPU | 128 GB | ≈ 140–165 GB | B200 (180 GB), B300 |
| 4 GPUs, ZeRO-3 / FSDP full shard | 128 ÷ 4 = 32 GB | ≈ 40–50 GB | 4 × A100 80GB or H100; 4 × L40S tight |
| 8 GPUs, ZeRO-3 / FSDP full shard | 128 ÷ 8 = 16 GB | ≈ 22–30 GB | 8 × L40S; 8 × RTX 4090 very tight |
And for 70B full fine-tuning: 1,120 GB ÷ 8 = 140 GB per GPU before activations. That fits 8 × B200 or 8 × B300 in one machine, but not 8 × H100. Anything bigger needs a multi-node cluster. If you are choosing where to rent for this, see the best GPU clouds for fine-tuning. Our comparison of single vs multi-GPU training explains DDP, FSDP and ZeRO in detail.
How do you check memory before a long run?
Do a pilot run of 20–50 steps and read the peak. The number that matters is peak allocated memory during the backward pass, not what nvidia-smi shows at idle.
import torch
# ... after a few training steps:
print(f"peak allocated: {torch.cuda.max_memory_allocated() / 1e9:.1f} GB")
print(f"peak reserved: {torch.cuda.max_memory_reserved() / 1e9:.1f} GB")nvidia-smi --query-gpu=index,memory.used,memory.total,utilization.gpu --format=csv -l 5If the peak sits within 10% of the card's capacity, longer examples later in the dataset may push you over. Sort by length and test the longest batch, or set PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to reduce fragmentation.
What does the right-sized GPU save?
The memory sum also sets your cost, because a bigger card that finishes sooner can be cheaper per run. A Llama 3.1 8B fine-tune on 20 million tokens, estimated as 6 × parameters × tokens FLOPs at NVIDIA's dense BF16 peaks with 25% utilisation for QLoRA and 35% for LoRA:
| Option | Fits? | Estimated GPU-hours | Price per GPU-hour | Cost |
|---|---|---|---|---|
| QLoRA on RTX 4090 | Yes | 6.5 | $1.59/hr | $10.34 |
| 16-bit LoRA on L40S | Yes | 2.1 | $1.89/hr | $3.97 |
| 16-bit LoRA on H100 | Yes | 1.0 | $4.99/hr | $4.99 |
| Full fine-tune on 4 × H100 | Yes, with FSDP | 1.0 compute + sharding overhead | $4.99/hr | ≈ $5.99–$7.49 |
Estimates, not measurements; prices as of November 2026. The method that fits is not always the cheapest. Work out both and compare; the cost to fine-tune an LLM article runs more scenarios.
When renting from Wandering Giants fits
Once your sum gives a number, Wandering Giants Compute lets you rent exactly that: 24 GB to 288 GB on one card, or 1, 2, 4 or 8 of the same card in one machine for sharded jobs, with root access and per-minute billing. If you guess wrong, stop the machine and relaunch on a bigger card; you pay only the minutes used. We do not offer multi-node clusters, so a 70B full fine-tune that needs more than eight B200s' worth of memory belongs with a provider that sells InfiniBand clusters.
Frequently asked questions
How much VRAM do I need to fine-tune a 7B or 8B model?
About 8–13 GB with QLoRA, 20–26 GB with 16-bit LoRA, and 128–160 GB for full fine-tuning with Adam, all at around 2,048 tokens with gradient checkpointing. A 24 GB RTX 4090 handles QLoRA easily and 16-bit LoRA at shorter sequences.
Can I fine-tune a 70B model on one GPU?
Yes, with QLoRA on an 80 GB card: the 4-bit weights are about 35–42 GB and adapters, optimiser state and activations bring the total to roughly 45–60 GB. 16-bit LoRA on 70B needs about 150 GB, which means a B200 or several GPUs.
Why does full fine-tuning need so much more memory than inference?
Inference stores only the weights (2 bytes per parameter in BF16). Training with Adam also stores gradients, an FP32 master copy of the weights and two FP32 optimiser moments, which adds up to about 16 bytes per parameter, plus activations saved for the backward pass.
Does sequence length affect fine-tuning VRAM?
Yes. Activation memory grows with batch size times sequence length, so doubling context roughly doubles activation memory. Gradient checkpointing and Flash Attention cut it sharply, which is why both are on by default in most fine-tuning recipes.
Does using 2 GPUs double my VRAM?
Only if you shard. Plain data parallel (DDP) keeps a full copy of everything on each GPU, so the per-GPU requirement does not fall. FSDP or DeepSpeed ZeRO-3 split weights, gradients and optimiser state across GPUs, dividing that part of the memory by the number of cards.
Is 8-bit Adam worth using?
Often. An 8-bit optimiser stores Adam's two moments in about 2 bytes per parameter instead of 8, saving roughly 6 bytes per trained parameter. For full fine-tuning that takes an 8B model from about 128 GB to about 80 GB before activations.
Rent the GPU for this, by the minute.
Pick the card your VRAM sum points to, from a 24 GB RTX 4090 to a 288 GB B300, and pay only for the minutes you train.
Prepaid credit, billed by the minute, stops itself when credit runs out. Prices in £, $, €, ¥, CA$, A$, CHF and S$; UK prices include VAT.
Keep reading
- Complete guideWhat Is GPU Model Training? A Complete Guide
- GuideWhat Is LoRA and QLoRA? A Practical Guide
- TutorialHow to Fine-Tune Llama on a Cloud GPU
- GuideWhat Is GPU VRAM and Why Does It Matter for AI?
- GuideSingle GPU vs Multi-GPU Training: What Changes?
- GuideHow Much GPU Memory Do You Need to Run LLMs?
About this article. Written by the Wandering Giants Compute team, the people who run Wandering Giants Compute. Hardware figures are the manufacturers’ published specifications. Speeds and costs marked as estimates are worked out from those specifications and our current prices, with the method shown; they are not measured benchmarks. Wandering Giants prices are taken live from our price list each time this page is built.
Last reviewed 25 November 2026.