Answer-First Engineering Blueprint
Mixed-precision BF16 training with AdamW requires approximately 16 bytes per parameter for static model states alone (2B BF16 weights + 2B gradients + 4B FP32 master weights + 8B Adam momentum/variance) = 1.12 TB for a 70B model before activations. Inference requires only weight bytes plus dynamic KV cache (2 · n_layers · n_kv_heads · d_head · seq_len · batch · dtype_bytes).
Core Systems Equation
KV_Bytes = 2 × n_layers × n_kv_heads × d_head × seq_len × batch_size × dtype_bytes
Static Memory Footprint Comparison: 8B vs. 32B vs. 70B Models
| Workload State | Bytes / Param | 8B Model | 32B Model | 70B Model | Sharding / Strategy |
| Full BF16 Training (AdamW) | ~16 B | ~128 GB | ~512 GB | ~1,120 GB | ZeRO-3 / FSDP across 16–64 GPUs |
| QLoRA Fine-Tuning (NF4 + LoRA) | ~0.75 B | ~6 GB | ~24 GB | ~52 GB | Fits 1×80 GB A100/H100 + activations |
| Inference Weights (BF16) | 2.0 B | ~16 GB | ~64 GB | ~140 GB | TP=1 (8B/32B) · TP=2–4 (70B) |
| Inference Weights (FP8) | 1.0 B | ~8 GB | ~32 GB | ~70 GB | 1×H200/MI300X or 2×H100 for 70B |
| Inference Weights (INT4 / NVFP4) | ~0.55 B | ~4.5 GB | ~18 GB | ~39 GB | Fits 1×80 GB H100/A100 for 70B |
Reference Basis: All monthly 24/7 figures assume 720 hours/month at dated public neocloud/hyperscaler reference rates (checked November 2026). Enter custom quotes or reserved commitments in the ScalingEfficient Dual-Mode Calculator.
Breaking Down the 16 Bytes/Parameter Mixed-Precision Training Wall
Engineers sizing training clusters frequently underestimate VRAM by counting only 2 bytes/parameter for BF16 weights. Standard mixed-precision AdamW stores BF16 weights (2B), BF16 gradients (2B), an FP32 master weight copy (4B), and FP32 first/second optimizer moments m and v (4B + 4B) = 16 bytes per parameter.
DeepSpeed ZeRO / PyTorch FSDP eliminates redundant copies across data-parallel ranks: ZeRO-1 shards optimizer states (8B/DP), ZeRO-2 shards gradients + optimizer states (10B/DP), and ZeRO-3/FSDP shards weights, gradients, and optimizer states across all GPUs (16B/DP), trading NVLink/InfiniBand all-gather bandwidth for memory capacity.
Controlling KV-Cache Explosion in Long-Context Production Serving
During serving, activation memory is tiny while the KV cache grows linearly with both batch size and sequence length. Grouped Query Attention (GQA) drastically shrinks KV cache compared to Multi-Head Attention (MHA) by sharing a small number of KV heads (typically 8) across 64–128 query heads.
When serving 32K–128K RAG prompts, combine three levers: (1) PagedAttention to remove contiguous-buffer fragmentation, (2) FP8 KV-cache quantization to halve bytes per token, and (3) Automatic Prefix Caching / RadixAttention so shared system prompts and retrieved documents are stored only once in HBM across concurrent requests.
Apply This Blueprint to Your Workload
Plug your model parameters, sequence lengths, peak-to-average burst factor, and current cloud pricing into our browser-local calculator—or request a fixed-fee $99 architecture audit for multi-vendor cluster and serving TCO.
Related Engineering Guides, Datasheets & Comparisons
Frequently Asked Questions
Why does mixed-precision BF16 training require 16 bytes per parameter instead of 2 bytes?
AdamW mixed-precision training stores 2 bytes for BF16 forward weights, 2 bytes for BF16 gradients, 4 bytes for the FP32 master weight copy, and 8 bytes for FP32 Adam first and second moments (m and v), totaling 16 bytes per parameter before activation tensors.
What is the exact formula for LLM inference KV-cache size?
Total KV-cache bytes = 2 (for Key and Value) × n_layers × n_kv_heads × d_head × sequence_length × batch_size × bytes_per_element (2 for BF16, 1 for FP8).
How does QLoRA fit a 70B model fine-tune onto a single 80 GB GPU?
QLoRA quantizes frozen base weights to 4-bit NormalFloat (~38 GB for 70B) and trains only low-rank adapter matrices (<1% of parameters), shrinking AdamW optimizer states from ~840 GB down to a few gigabytes.
How much VRAM should be reserved for CUDA runtime overhead in vLLM or SGLang?
Plan for roughly 8%–12% of total GPU HBM (e.g., 6–10 GB on an 80 GB H100) for PyTorch CUDA context, NCCL communication buffers, CUDA graph capture workspaces, and peak prefill activations (`--gpu-memory-utilization 0.90`).
Does activation checkpointing reduce training VRAM for free?
No. Activation checkpointing dramatically reduces activation memory by discarding intermediate layer outputs during the forward pass, but recomputes them during backpropagation—adding roughly 25%–33% more executed FLOPs per step.
How does Multi-Head Latent Attention (MLA) compare to GQA on KV-cache size?
MLA projects Keys and Values jointly into a compact low-rank latent vector cached in HBM, cutting per-token KV-cache bytes by another ~5×–10× relative to standard GQA on large 100B+ models.