Serving

Wiki chapters and blog posts about Serving.

Wiki

KV Cache and Inference Performance

Understand how the KV cache removes repeated computation from autoregressive decoding, and master the trade-offs between latency, throughput, memory and request scheduling.

Intermediate 18 min read

Prefix Caching and PD Disaggregation: Pay for Repeated Compute Once

Prefix caching reuses the KV cache of system prompts, shared documents, and chat history across requests (RadixAttention, CacheBlend, LMCache). PD disaggregation places compute-bound prefill and bandwidth-bound decoding on different hardware; DistServe, Splitwise, and Mooncake show when it pays off.

Intermediate 12 min read

Model Quantization: INT8, INT4, GPTQ and AWQ Explained and Measured

Quantization stores weights, activations or the KV cache in fewer bits. This page starts from the memory budget, builds up from scales and groups, measures INT8 and INT4 on Qwen2.5-0.5B, implements SmoothQuant, AWQ-style scaling, GPTQ and KV-cache quantization, and ends with a selection guide.

Intermediate 55 min read

Blog posts

vLLM and PagedAttention: Managing the KV Cache Like Paged Memory

The vLLM paper (SOSP 2023) brings operating-system paging to the KV cache: fixed-size blocks, on-demand allocation, a block table, copy-on-write sharing. This post checks the paper's numbers and shows the real range behind the headline 2-4x, what it was compared with, and where it stops applying.

Paper notes SOSP 2023

Topics