Model GPU Memory and Concurrency Capacity Calculator¶
Use estimates first to filter out clearly infeasible combinations, then measure with the target engine. The calculator cannot precisely account for quantization metadata, temporary Workspace, CUDA Graph, fragmentation, MoE activated experts, or engine version differences.
1. Basic Formulas¶
English rendering — the original text is retained below.
BF16/FP16 weights use approximately 2 bytes per parameter, but total GPU memory is never equal to the weight size. Quantization also introduces Scale, Zero Point, packing formats, and Kernel Workspace. Training additionally requires gradients, optimizer states, and activations, so this inference calculator must not be used for training.
2. Per-Request KV Cache¶
KV Cache depends on the number of layers, KV heads, head dimension, precision, input length, generated length, and parallel sharding. The most reliable approach is to fix a request length in the target engine, read the engine metrics or GPU memory delta, and then enter it into the calculator.
3. Cost Calculator¶
The result covers GPU time only. Production cost should also include CPU, memory, storage, model distribution, network, idle redundancy, logging, control plane, and engineering support.
Further reading: Inference Optimization, Cost and Capacity