Can vLLM Really Cut Inference Costs by 73%?
Can you really cut inference costs of LLM serving by 73% with vLLM?
I went through the architecture to understand if this number even makes sense. My honest assessment: it's technically plausible. Here's why.
First, the core problem.
When an LLM serves your request, two very different things happen:
Prefill: The model reads your entire prompt in one shot. Compute-heavy. Saturates the GPU.
Decode: The model generates tokens one by one. Memory-bound. The GPU mostly waits.
Most setups run both on the same GPU. Neither gets optimized. And when one user sends a 10,000-token prompt for prefill, it blocks generation for everyone else mid-conversation.
vLLM's approach: disaggregated prefilling.
Prefill and decode run on separate GPU pools. A Rust-based router directs requests to the right prefill instance via prefix-aware hashing. The KV cache then transfers to a decode instance over high-speed RDMA.
The GPUs still do the same math but you assign compute-heavy GPUs to prefill and cheaper memory-optimized GPUs to decode. Right hardware for each job. Fewer machines overall.
Note: this requires high-bandwidth interconnects. On slower networks, transfer latency eats into the gains. Datacenter-grade optimization.
On top of that, four well-documented optimizations:
1. PagedAttention: KV cache in non-contiguous 16-token blocks (like virtual memory). Waste drops from 60-80% to under 4%. Throughput: 2-24x.
2. Continuous Batching: iteration-level scheduling, new requests inject the moment a slot opens. 23x throughput vs HuggingFace Transformers baseline.
3. Automatic Prefix Caching: identical system prompts served from cache instead of recomputed. Up to 170x faster than cache-blind scheduling.
4. Speculative Decoding: a small model drafts tokens, the full model verifies in one pass. 2.7x speedup, identical output quality.
Why these compound into 73%:
Each targets a different source of waste:
- PagedAttention recovers wasted GPU memory - Continuous Batching fills idle compute cycles - Prefix Caching eliminates redundant computations - Speculative Decoding generates multiple tokens per step - Disaggregation matches workloads to the right hardware
Five independent optimizations compounding. That's what makes 73% plausible.
Every optimization above has published benchmarks. But your actual savings depend on workload, hardware, and traffic patterns.