Estimate the VRAM needed for model weights and inference from parameter count, precision bytes and activation overhead, to choose deployment hardware.
训练还需优化器状态(通常 2–4 倍权重)。
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Weight footprint | weight bytes equal parameter count times bytes per parameter | IEEE 754-2019 floating point |
| Activation footprint | activation memory grows with batch and sequence length and often exceeds the weights | Korthikanti et al. 2022, activation recomputation |
| Headroom | framework caching and fragmentation need headroom beyond the theoretical total | PyTorch CUDA memory management docs |