VRAMScore
ML Training & Adapter Memory Lab

LLM Fine-Tuning VRAM Calculator (QLoRA, LoRA & Full BF16)

Fine-tuning consumes vastly more VRAM than inference because backpropagation must store gradients, optimizer momentum/variance states, and sequence activation checkpoints. Size your GPU accurately before launching Unsloth, Axolotl, LLaMA-Factory, or Apple MLX.

QLORA / LORA / FULL BF16 TRAINING VRAM ENGINE

Fine-Tuning & Training Memory Calculator (PyTorch / Unsloth / Axolotl)

Calculate exact training VRAM across model weights, backpropagation gradients, AdamW optimizer states, and sequence activations before renting H100s or launching a local run.

3. Fine-Tuning Method
Optimizer
LoRA Rank (r)r = 32
Seq Length
Micro Batch
A TIERFits Training Run (98% of 32GB)
Trainable Params: 1.2%
TOTAL TRAINING VRAM31.5 GBvs 32 GB usable
BASE WEIGHTS18.4 GB4-bit NF4 Frozen
OPTIMIZER + GRADS1.7 GBOpt 0.8 + Grad 0.9
ACTIVATIONS9.2 GBCheckpointing ON
RUNTIME OVERHEAD2.2 GBPyTorch / CUDA / Metal
RECOMMENDED ENGINEUnsloth / AxolotlCUDA Backend
Training Starter Command
python train_unsloth.py --model deepseek-r1-32b --load_in_4bit --lora_r 32 --max_seq_length 4096 --batch_size 2 --use_gradient_checkpointing unsloth
Selected Hardware Fits: RTX 5090 32GB

Need multi-GPU FSDP/DeepSpeed scaling for 70B+ full fine-tuning? Try our Cluster Planner.

Why QLoRA Saves 70%+ Training VRAM

QLoRA freezes base weights in 4-bit NF4 and attaches tiny low-rank BF16 adapter matrices (typically 0.5%–2% of total parameters), shrinking optimizer and gradient memory dramatically so even 32B models fine-tune on a single 24GB–32GB GPU.

Gradient Checkpointing Trade-Off

Recomputing intermediate layer activations during the backward pass adds ~20–25% wall time while slashing activation memory by ~75% — essential for 4K–16K sequence lengths.

Master the Underlying Memory Math

Read our pure engineering reference guides covering transformer weights, KV caches, quantization trade-offs, and multi-GPU parallelism.

Read LLM VRAM Math Guide