Fine-Tuning & Serving

vLLM PagedAttention Concurrency & QPS Calculator

Calculate maximum concurrent requests, aggregate tokens/sec, and sustained QPS from leftover vLLM PagedAttention KV cache VRAM.

Input Parameters

GiB
ratio
GiB
GiB
layers
heads
dim
tokens
tokens
ms
Calculated Output
Primary Result
—
Adjust inputs to recalculate immediately.

vLLM KV Pool & Concurrency Scaling (80GB A100, 16 GiB Model)

Lowering --max-model-len or enabling --kv-cache-dtype fp8 directly multiplies concurrent stream capacity.

ConfigurationKV Cache DtypeAvg Seq LenMax KV TokensMax Concurrent Streams
Default FP16 KVFP16 (2B)4,096 tok~451,700 tok110 concurrent
FP8 KV CacheFP8 (1B)4,096 tok~903,400 tok220 concurrent
Long Context FP16FP16 (2B)16,384 tok~451,700 tok27 concurrent
Long Context FP8FP8 (1B)16,384 tok~903,400 tok55 concurrent

Formula & Engineering Methodology

vLLM allocates a fixed fraction (gpu_memory_utilization) of total VRAM, subtracts weights and CUDA graph buffers, and treats the remaining pool as paged KV blocks. Maximum theoretical QPS divides aggregate batched output throughput by average completion length.

kv_pool_gib = (gpu_vram_gib * gpu_mem_util) - weights_gib - overhead_gib max_kv_tokens = (kv_pool_gib * 1073741824) / (2 * layers * kv_heads * head_dim * kv_bytes) max_concurrency = floor(max_kv_tokens / avg_seq_len) qps = (max_concurrency / (tpot_ms / 1000)) / avg_output_tokens

Variable Definitions

Practical Note: At very high concurrency (>128 streams), attention kernel compute and prefill chunking saturate before KV memory runs out, causing TPOT to rise.

Frequently Asked Questions

What does gpu_memory_utilization=0.92 leave unallocated?
It reserves 8% of GPU VRAM for NCCL, driver allocations, and transient PyTorch buffer spikes outside vLLM's managed KV block pool.
Why does PagedAttention prevent out-of-memory fragmentation?
Unlike older static allocators that pre-reserve max_model_len contiguous tensors per request, PagedAttention allocates non-contiguous 16-token blocks on demand.
Does enabling FP8 KV cache degrade throughput?
On Hopper/Ada GPUs (H100, L40S, RTX 4090), FP8 KV reduces memory traffic and doubles concurrency with negligible latency overhead.

Related Engineering Calculators

ComputeSizer runs 100% locally in your browser with open formulas and zero account gates. If these VRAM and GPU cost tools saved your team money, support us via Fourthwall or sponsor an ad-free developer placement.