LLM GPU VRAM, KV Cache & Token Throughput Calculator
Budget GPU memory for model weights, live context, and activation workspace. Estimate the minimum GPU count and a decode bandwidth ceiling.
Jump to resultsInputs
Results
Runs in your browser- Required memory
- 95.144GB
- Minimum GPU count
- 2GPUs Aggregate memory lower bound
- Decode bandwidth ceiling
- 315.481tok/s Ideal aggregate across the batch
Compare measured decode speed with this bandwidth ceiling. Verify the model fits each rank individually.
| Model weights | 42 GB |
|---|---|
| Active KV cache | 42.95 GB |
| Activation and scratch reserve | 10.194 GB |
| Usable memory per GPU | 72 GB |
| Usable memory across GPUs | 144 GB |
| KV per cached token | 327.68 kB |
| Ceiling per sequence | 78.87 tok/s |
How the estimate works
KV bytes = 2 × layers × hidden width × KV-head ratio × bytes × tokens × sequences
The model assumes dense decoder-only attention. FP16 uses two bytes per parameter, FP8 and INT8 use one, and Q4_K_M uses a rough 0.60 bytes to include mixed precision and quantization metadata. Use the actual model file size to check this assumption.
Keys and values grow with the live context and batch. GQA reduces the cached width by the ratio of KV heads to query heads. Workspace is an adjustable percentage of weights plus KV, with a separate allowance for unavailable GPU memory.
The GPU count is a memory lower bound. The decode ceiling assumes perfect sharding and one sweep of weights and active KV per batch step at full bandwidth. Kernel overhead, compute, prefill, cache sharing, allocator fragmentation, and interconnect can lower measured output.
Frequently asked questions
How does grouped-query attention change inference VRAM?
With 8 KV heads for 64 query heads, the KV cache stores one eighth as much as full multi-head attention with the same head width. Enter 12.5% for the ratio.
Will the minimum GPU count guarantee a model loads?
It is the smallest count with enough aggregate modeled memory. Check per-rank tensor shapes, runtime sharding choices, and reserved memory on the target cards.
Why does a longer context reduce the decode bandwidth ceiling?
Each generated token may read keys and values for the active context. The extra memory movement leaves less bandwidth for decode steps, even when model weights stay constant.