VRAM Math: Can I Actually Run This?
Memory, not compute, is the binding constraint in fine-tuning. The three VRAM consumers, the rules of thumb that place a job in the right GPU class, and the three-question framework you run before you ever load a model.
Memory is the binding constraint, not compute. A modern GPU can do the math for a 7B fine-tune in reasonable time; whether you can hold the working set in memory is what decides whether the job runs at all. Step over the VRAM cliff and the job doesn't go slower — it OOMs and dies.
Training VRAM is three consumers: weights, optimizer states + gradients, and activations. Every OOM is one of these. For full FT the optimizer states (~16 bytes/trainable-param) dominate; for QLoRA the frozen 4-bit base plus a tiny adapter collapses the optimizer bill to rounding error. That is the entire economic argument for PEFT.
The QLoRA-vs-full-FT decision is a ~10× lever on the same model. 7B QLoRA ~10–16 GB → RTX 4090; 7B full FT ~100–160 GB → multi-A100 (~$50K). 70B QLoRA ~48–60 GB → 1× A100 80GB; 70B full FT ~1.0–1.4 TB → 8–16× H100 multi-node. The course default: start at QLoRA, escalate only with evidence.
Three questions pick the GPU class: model size × method × context length. Context is the quadratic lever and the most underestimated — naive attention is N×N, so FlashAttention 2/3 (quadratic→linear) is effectively mandatory. Always size for your 99th-percentile sequence length, not the mean.