Model guides

GPU memory for fine-tuning: full, LoRA and QLoRA

The memory math for fine-tuning: why full fine-tuning needs 16 to 18 bytes per parameter, what LoRA and QLoRA save, and which GPU fits each size of model.

The memory a fine-tune needs is set by the method before the model. Full fine-tuning costs about 18 bytes per parameter in Hugging Face's accounting, LoRA costs about the 2 bytes per parameter of its frozen BF16 base plus a margin, and QLoRA costs about half a byte. A 70B model is therefore a 1,260 GB job in full (calculated), a 164 GB job with LoRA by Unsloth's table, and a 41 GB job with QLoRA, which fits one 48 GB card.

Full fine-tuning costs 16 to 18 bytes per parameter

Hugging Face's memory guide, checked 1 October 2026, counts 6 bytes per parameter for the weights in mixed precision, an fp16 copy and an fp32 main copy. It adds 8 bytes for Adam's momentum and variance in fp32, and 4 bytes for gradients kept in fp32. That is 18 bytes before activations, and the guide's own example is a 4B model at batch size 16 that needs roughly 85 GB, against 72 GB for those 18-byte states (calculated). The ZeRO paper counts 16 bytes for mixed-precision Adam: an fp16 copy of the parameters and of the gradients at 2 bytes each, plus fp32 parameters, momentum and variance at 4 bytes each. The 2-byte gap is the gradients. ZeRO stores them in fp16 and Hugging Face keeps them in fp32, so both are right for the setup each describes. I plan with 18 and treat 16 as the best case.

The table is the total for a perfectly sharded run with FSDP or ZeRO-3, calculated and before activations. The multi-GPU training guide covers the sharding itself.

ParametersAt 16 bytesAt 18 bytesSmallest VM that holds the 18-byte figure
1 billion16 GB18 GBOne 48 GB card
8 billion128 GB144 GB2x 80 GB or one B200. A 141 GB H200 holds only the 16-byte figure
14 billion224 GB252 GB2x H200 or 4x 80 GB
32 billion512 GB576 GB8x H100. 4x H200 holds only the 16-byte figure
70 billion1,120 GB1,260 GB8x B200. 8x H200 holds the 16-byte figure with 8 GB to spare

The last row is the useful one. A full fine-tune of a 70B model does not fit the largest H200 VM at 18 bytes, and at 16 it leaves no room for activations. That job goes to 8x B200 or larger, or to the cluster quote form. Activation checkpointing helps with the rest: the ZeRO paper puts its cost at about 33% extra computation, and Hugging Face has a gradient checkpointing guide.

LoRA and QLoRA: what the papers claim

The LoRA paper says: "Compared to GPT-3 175B fine-tuned with Adam, LoRA can reduce the number of trainable parameters by 10,000 times and the GPU memory requirement by 3 times." Memory falls by 3 times and not by 10,000 because the frozen base model still has to sit on the GPU. In BF16 that base costs 2 bytes per parameter, 140 GB for a 70B model (calculated), before the adapters, their optimizer state and the activations.

The QLoRA paper begins: "We present QLoRA, an efficient finetuning approach that reduces memory usage enough to finetune a 65B parameter model on a single 48GB GPU while preserving full 16-bit finetuning task performance." It lists three ideas behind that: a 4-bit data type called NormalFloat (NF4), double quantization of the quantization constants, and paged optimizers for memory spikes. The base at 4 bits costs about half a byte per parameter, which is 35 GB for a 70B model (calculated). The quantization guide covers the formats.

Unsloth's table, mapped to DeployGPU cards

Unsloth's requirements page, checked 1 October 2026, lists VRAM by model size and says the figures are the absolute minimum, with a batch size of 1 to 3 as the first fix for running out of memory. The card column compares its figure with each card's memory directly, calculated, with the spare memory beside it.

ModelQLoRA 4-bitCardLoRA 16-bitCard
8B6 GBAny 48 GB card22 GBAny 48 GB card
14B8.5 GBAny 48 GB card33 GBA 48 GB card, 15 GB spare
27B22 GBA 48 GB card, 26 GB spare64 GBAn 80 GB card, 16 GB spare
32B26 GBA 48 GB card, 22 GB spare76 GBAn RTX PRO 6000, 20 GB spare
70B41 GBA 48 GB card, 7 GB spare164 GBOne B200, 16 GB spare, or 2x H200
405B237 GB2x H200, 45 GB spare950 GB8x H200, 178 GB spare

LLaMA-Factory's README gives an estimated table of its own: 16 GB for LoRA on a 7B model, 160 GB for LoRA on a 70B model and 48 GB for 4-bit QLoRA on a 70B model, plus a rule of 18 times the parameter count in GB for full fine-tuning in bf16 or fp16. Against Unsloth's 164 GB and 41 GB for the 70B, the two sources agree to within about 17%.

Why Unsloth, Hugging Face and LLaMA-Factory differ

Bytes per parameter differ with the gradient dtype, as above. Activations scale with batch size, sequence length, depth and hidden size, which is why Hugging Face says a model that fits can still run out of memory on a long sequence. Unsloth calls its figures the absolute minimum and LLaMA-Factory marks its table as estimated, so my rule is to read the spare memory in the table above as a budget for activations and nothing else. If the spare memory is under 10% of the card, go up one tier, as in the 80 GB tier, or fix the batch size first.

The fine-tuning guide picks a framework and the Unsloth guide runs one. For jobs that need 2 or more GPUs in one VM, see the multi-GPU page. If a run still fails, the CUDA out of memory page lists fixes. Stopping a DeployGPU instance deletes its disk, so save adapters and checkpoints off the VM first, as the stop guide explains.

Frequently asked questions

How much VRAM does QLoRA need?

About half a byte per parameter for the 4-bit base, plus adapters and activations. Unsloth's table lists 6 GB for an 8B model, 22 GB for 27B and 41 GB for 70B, so a 48 GB card covers every size up to 70B.

How much memory does full fine-tuning need per parameter?

Hugging Face counts 18 bytes per parameter for mixed-precision Adam, and the ZeRO paper counts 16. Both exclude activations. The gap is whether gradients are stored in fp32 or fp16.

Does LoRA cut memory by 10,000 times?

No. The LoRA paper reports 10,000 times fewer trainable parameters and 3 times less GPU memory against GPT-3 175B fine-tuned with Adam, because the frozen base model still has to fit.

Can I fine-tune a 70B model on one GPU?

With QLoRA, yes: Unsloth lists 41 GB, which fits one 48 GB card with little spare. With LoRA in 16-bit it needs 164 GB, so one B200 or 2x H200. A full fine-tune needs 8x B200 or a cluster.

Why did my fine-tune run out of memory when the table said it fits?

The tables give minimums. Activations grow with batch size and sequence length, so lower the batch size to 1 to 3, shorten the sequence or use gradient checkpointing before moving to a bigger card.