Self-Hosted vLLM Concurrency & KV-Cache Calculator
Estimate full-context slots for vLLM or TensorRT-LLM and compare the GPU hourly rate with equivalent API spend.
View estimateModel and deployment assumptions
Capacity and hourly economics
Enter valid values to see the estimate.
- KV budget
- —
- KV per slot
- —
- Tokens per slot
- —
- Raw KV bytes / token
- —
- KV budget left after full slots
- —
- Break-even GPU rate
- —
- Self-hosted USD / 1M tokens
- —
- API minus GPU per hour
- —
Budget an inference deployment
Use the break-even rate to compare hosting scenarios alongside the rest of your AI infrastructure.
Method & FAQ
How is KV-cache memory calculated?
The model multiplies two tensors (key and value) by layers, KV heads, head dimension, bytes per element, and allocated context tokens. It rounds context up to whole pages and applies the overhead percentage to the padded cache.
What limits real concurrency?
Slots are a single-GPU memory ceiling for equal-length contexts, including prompt and generation. Actual concurrency depends on the scheduler, measured GPU allocations, model architecture, and prefix sharing. FP8 and INT4 are storage scenarios. Actual precision support and packing vary by engine and hardware.
What does the break-even GPU rate mean?
The rate is the API cost of the tokens you expect to serve in a billed GPU hour. It uses aggregate throughput times the busy-hour share, times 3,600 seconds, times the blended API token rate. Compare it with your all-in GPU hourly cost.