FP8 KV Cache: Fit More Requests on a GPU
Quantizing the KV cache to FP8 halves its memory, so one GPU holds longer contexts and more concurrent requests. How FP8 KV cache works in vLLM, and its limits.
Quantizing the KV cache to FP8 halves its memory, so one GPU holds longer contexts and more concurrent requests. How FP8 KV cache works in vLLM, and its limits.
Prefix caching only pays off when the next request lands on the replica that already holds the cache. How KV-cache-aware routing keeps it warm at scale.
Chunked prefill slices a long prompt into pieces so decode steps never stall behind it. How vLLM's default scheduler keeps token streams smooth under load.
Prompting an LLM for JSON fails eventually. Constrained decoding masks the model tokens against a grammar so the output parses every single time.
Running prefill and decode on separate GPU pools steadies tail latency and lets each phase scale on its own. How disaggregated LLM serving works.
vLLM reuses the KV cache of a shared prompt prefix across requests. How automatic prefix caching hashes blocks, when it hits and misses, and how to tune it.
One base model, many fine-tuned LoRA adapters, one GPU. How multi-LoRA serving works, the batched kernels that make it fast, and how to run it in vLLM.
Inference engineering is serving trained models fast, cheaply and reliably. What an inference engineer does: the metrics, the levers and the skills.
A model too big for one GPU has to be split. How tensor and pipeline parallelism divide an LLM, what each costs, and when to reach for which.
How rotary position embeddings encode token order by rotating query and key vectors, and how position interpolation and YaRN stretch a model's context window.
Pick a GPU for an LLM and it 'fits' on paper, then OOMs under load. A quick way to estimate the VRAM a model needs: weights, KV cache, and overhead.
Mixture of Experts routes each token to a couple of expert layers, so the model runs cheaper per token yet still needs every expert sitting in GPU memory.
A naive LLM server holds finished slots idle until the slowest request in the batch drains. Continuous batching refills them every step. How it works.
Speculative decoding uses a small draft model to guess tokens a big model verifies in one parallel pass, cutting LLM latency with no change to output.
The first token is slow, the rest stream fast. Why LLM inference splits into a compute-bound prefill and a memory-bound decode, and what it costs you.
A self-hosted LLM server wastes most of its GPU memory to KV cache fragmentation. Here is how PagedAttention in vLLM pages the cache like an OS.
Grouped-query attention shares key/value heads across query heads to cut the KV cache. How GQA sits between MHA and MQA, with the memory math and code.
Attention is memory-bound, not compute-bound. Here's how FlashAttention uses tiling and online softmax to skip the N×N matrix and run exact attention faster.
The weights don't fit on the GPU you have. How LLM quantization shrinks them to INT8 or INT4, why GPTQ and AWQ beat naive rounding, and where it breaks.
Speculative decoding uses a small draft model to guess tokens a big model verifies in one pass, cutting LLM latency 2-3x without changing the output.
Static batching leaves the GPU idle when requests finish at different steps. How continuous batching schedules LLM inference per token to raise throughput.
A long prompt or a long agent run can hit CUDA out of memory, and the KV cache is usually why. How it grows, the per-token math, and how to shrink it.