QLoRA fine-tuning VRAM calculator

Fine-tuning VRAM isn't just model weights. Optimizer states, trainable LoRA adapters, and activation tensors decide whether a 32B run fits on one 24 GB card or forces an 80 GB H100. Size your exact training footprint below.

Interactive calculator

Fine-Tuning MethodWeightsOpt + GradsTotal VRAMMin Single GPU

How to fit larger QLoRA runs on smaller GPUs

  1. Always turn on gradient checkpointing above 2K context. Checkpointing trades roughly 22% extra backward compute for a 65% drop in activation VRAM, letting you fit 4K to 8K sequences on 24 GB cards.
  2. Keep micro-batch at 1 or 2 and use gradient accumulation. Effective batch size depends on micro-batch times accumulation steps. Accumulation costs zero extra activation VRAM.
  3. Use paged AdamW 8-bit instead of 32-bit AdamW. Even with small LoRA adapters, 8-bit paged optimizers prevent sudden host-to-GPU memory spikes during long-sequence outliers.
  4. Target all linear projections at r = 16 or r = 32. Applying LoRA to q, k, v, o, gate, up, and down projections at rank 32 usually outperforms attention-only rank 128 adapters at lower VRAM.

Common questions

How much VRAM does QLoRA 4-bit need for a 70B model?

With NF4 double quantization, gradient checkpointing, and micro-batch 1 at 4K context, a 70B QLoRA run needs roughly 44 GB to 48 GB of VRAM, fitting on a single L40S or A100 80GB.

Does increasing LoRA rank r explode VRAM?

Only modestly. Jumping from r = 16 to r = 64 multiplies trainable adapter parameters by 4x, which usually adds 1 GB to 3 GB depending on base model size.

Why do activations dominate at 8K and 16K sequence lengths?

Attention and MLP intermediate tensors scale linearly with micro-batch and sequence length, quickly dwarfing adapter weights unless gradient checkpointing is active.

When is full BF16 fine-tuning worth the extra GPUs?

Full fine-tuning helps when adapting to a completely new language or massive 10B+ token continual pretraining corpus. For domain style and tool-calling under 500K examples, QLoRA matches it.

All calculations run 100% locally in your browser with zero external API calls. Hardware specs and hourly rates reflect published 2026 cloud and silicon datasheets.