Calculate what consumes VRAM during inference.
Separate model weights, KV cache and runtime reserve. Change precision, context length, concurrency and GPU count to see which part of the memory budget is constraining the deployment.
A planning estimate, not a profiler.
Weights. The minimum approximation is parameter count × bits per stored weight. Quantized formats may add scales, codebooks, padding or other metadata, so format overhead is exposed as a separate input rather than hidden.
KV cache. For standard decoder attention, each layer retains one key and one value vector per KV head, token and sequence. GQA/MQA can use fewer KV heads than query heads. Meta publishes this geometry for Llama 3.1, while vLLM exposes the KV cache as an explicit GPU-memory budget.
Multiple GPUs. The per-GPU figure assumes ideal, even sharding of both weights and KV cache. It is useful as a planning lower bound, but it does not model replicas, pipeline parallelism, indivisible layers, communication buffers, offload or a specific backend layout.
Runtime reserve. The tool applies an editable percentage to weights + KV. Temporary activations, CUDA graphs, kernels and allocator behavior vary by engine and workload, so no fixed percentage is presented as an observed fact.
The KV formula is not a faithful model for MLA, hybrid/sliding-window attention, recurrent state or architecture-specific compressed caches. In those cases, use the result as a comparison estimate and validate the deployment with real serving-engine metrics.
Primary sources: Meta · Llama architecture definitions, Meta · Llama 3.1 model card, and vLLM · KV-cache configuration. Verified 2026-08-21.