LLM infrastructure

LLM Serving Calculator

Estimate GPU memory, concurrent requests, tokens per second, and batch runtime for a large language model on your hardware.

GPU and model

Each replica loads a full model across its GPUs. Replicas serve requests independently.

Workload

Count the system prompt and chat history in input tokens. Thinking tokens count toward generation and context.

Advanced assumptions

The VRAM budget reserves space for runtime overhead. Adjust the efficiency inputs using measurements from the same engine and hardware.

Planning estimate

Capacity estimate

1 GPU · 200 generated tokens / request

Concurrent request capacity
133
Active in this scenario
50
Decode speed / request
40.33 tok/s
Total decode throughput
2,016.37 tok/s

Capacity is capped by KV memory and the engine sequence limit. Active requests also depend on job size and target concurrency.

Output throughput incl. prefill
618.78 tok/s
Requests per second
3.09
Time to first token, no queue
11.23 s
Request duration, no queue
16.16 s
Batch completion time
16.16 s
Generated tokens in job
10,000 tok
KV capacity before engine limit
133
Decode bottleneck
Memory bandwidth

VRAM per GPU

Budget
72 GiB
Weights
32.99 GiB
KV cache / request
0.29 GiB
Peak modeled usage
47.64 GiB

How the estimate works v1.1.0

Memory and concurrency

Weights use 2, 1.08, or 0.56 bytes per parameter for BF16, FP8, or 4-bit weights respectively. For GQA and MQA, KV bytes per token per GPU are layers × 2 × local KV heads × head dimension × bytes per element. Tensor parallelism shards KV heads when possible and replicates them otherwise. MLA uses a compressed cache on every tensor-parallel GPU. Input and all generated tokens are rounded up to a 16-token cache block for capacity.

Prefill and decode

Each phase uses the larger of estimated compute time and memory transfer time. Prefill processes input tokens in a wave and produces the first token. Decode reuses the weights across the active batch and reads KV at the average context length. MoE models use the active parameter count for compute and assumes independent, uniform expert routing to estimate weight reads.

Service and job throughput

Output throughput including prefill divides generated tokens (answer plus thinking) by full-wave duration. Batch time adds consecutive waves, including a smaller final wave when needed. Replicas get balanced workloads.

Scope and calibration

This is a GPU-resident text generation model for identical GPUs and tensor-parallel replicas. Queueing, CPU offload, expert parallelism, prefix reuse, and continuous batching are outside the model. Engine kernels, quantized checkpoints and interconnects can materially change results. Use the custom GPU option if reported VRAM differs from the nominal preset. Validate with vLLM serving benchmarks on representative prompts. For Qwen YaRN deployments, enter the deployed context limit in a custom model.

Specifications and benchmark references