Field Notes
The six layers of an LLM inference system: from capacity to service
Benchmark Context
The editorial claim assessment records no quantitative performance or cost claims for this contribution.
Read the benchmark standard →This post takes different pieces of the inference and assembles them. It starts from the simplest server that works, adds one component at a time, and places each on the six-layer stack the rest of the series uses. If a term is unfamiliar, Appendix A defines it.

The naive server
Start with the simplest thing that works: one GPU, one copy of the model, and a loop that calls generate. Requests are grouped into a batch, the batch runs until it is done, and each request gets a slab of GPU memory big enough for the longest output it could ever produce.
It works, and it wastes almost everything.
- The batch waits for its slowest member. Requests that finish early leave their slots idle, and new arrivals queue until the whole batch drains.
- Memory is reserved for tokens that never arrive. Most requests stop far short of the maximum length, but their reservation caps how many requests fit on the GPU.
- With few requests per step, each decode step streams the weights to serve a handful of tokens. For a dense model at small batch, producing one token per request means reading the model from memory, and most of that bandwidth buys almost nothing.
For the interactive-serving examples here, a useful objective is goodput per GPU-dollar: requests that meet their latency targets, per dollar of GPU spend. It is a design lens for this walk-through, not the only objective serving systems use.
Why an inference system, not a server
Fixing the loop’s waste is only the beginning. Real traffic puts pressure on it that no single generate loop can meet, and each pressure is answered at a different layer of the stack.
- Long prompts stall everyone else. A prompt of tens of thousands of tokens takes over the GPU while every other request waits for its next token. Answered in the engine (L2).
- The KV cache does not fit. Every token a request has seen leaves state behind in every layer, and at long context that state outgrows the weights. Engine (L2).
- Prefixes repeat. System prompts, chat history and agent loops send the same opening again and again, and the loop recomputes it every time. Engine (L2).
- Small-batch decode is limited by memory bandwidth. For a dense model at small effective batch, each step streams the weights to produce one token per request, so tokens per second track bytes per second. Mixture-of-experts models, compression and speculative decoding change that assumption, as the L2 and L3 sections show. Engine (L2).
- The model outgrows one GPU. Its weights alone may not fit, or one GPU is too slow. Replica (L3).
- One replica is not enough. Something has to decide which replica each request goes to, and when to say no. Routing (L4).
- Latency targets differ by workload. A chat user, a batch job and an agent loop do not need the same TTFT and TPOT. Contract (L5).
- Capacity is expensive, can be taken away, and starts cold. GPUs are rented, preempted and slow to load a model onto. Substrate (L1) and capacity (L0).
Two accounting models say what the techniques below are trying to shrink.
Latency. For one request with N output tokens, where Δt_i is the gap between output tokens i — 1 and i:
end-to-end latency = TTFT + (Δt_2 + ... + Δt_N). When TPOT means the mean of those N – 1 gaps for this request, measured at the same boundaries, this becomesTTFT + (N - 1) x TPOT. It holds per request; it is not a relation between percentiles aggregated across requests.- As a simplified decomposition, TTFT is queueing plus prefill compute, plus KV transfer when prefill and decode run on different machines. Scheduling delays, cold starts and retries add to it in real systems.
Memory and bandwidth. On every GPU:
weights + resident KV + activations and workspaces + other runtime allocations <= HBM capacity. Resident KV includes reusable prefixes kept from finished requests, and blocks shared between requests count once.- one small-batch decode step costs roughly the bytes it moves, the weights plus the KV the batch reads, divided by HBM bandwidth.
Batching is the main lever. It increases weight reuse across the token rows of a step, which raises throughput while weight traffic dominates. It does not guarantee that each weight is fetched from HBM exactly once per step: kernels tile the matrix multiply, and the actual traffic depends on shapes and tiling. As the batch grows, other limits can take over: resident KV and KV traffic increase, compute can become limiting, and longer iterations can put pressure on TPOT. The useful batch size depends on the workload and execution configuration. Each technique in the walk-through names the term it reduces.
The six-layer serving stack
The series places each technique on one of six layers, by asking a single question: whose behaviour does it change? Change what capacity you obtain, that is L0. Change how the engine manages KV internally, that is L2. Change how requests are spread across replicas, that is L4.

L5 Contract — what is promised to the consumer, and how it fails
L4 Routing — endpoint choice, queueing and admission across replicas
L3 Replica — how devices, parallel groups and phases form one replica: TP/PP/EP, prefill/decode split
L2 Engine — how an engine schedules work and manages execution state: batching, KV cache, kernels, quantization
L1 Substrate — how the cluster shares, exposes and warms up devices
L0 Capacity — what GPU capacity is obtained, where, at what price
The layers are not independent, but they are not a pipeline either. Targets and decisions flow down: the contract sets targets, routing chooses a replica, the replica fixes how devices and phases are composed, and the engine schedules each step on the GPUs the substrate and capacity layers supply. Resource constraints flow back up: losing GPU capacity at L0 forces the serving system to respond through its recovery and capacity policies, while disaggregation at L3 adds KV-handoff and placement decisions that routing at L4 must account for.
The walk starts at the engine, because that is what the naive server grows into. It then moves outward through the replica, routing and contract, and ends with the ground underneath: substrate and capacity. Each layer section shows how its techniques appeared over time. The arrows in those diagrams show the order in which techniques appeared and the problem each one targets; they do not claim that one paper led to the next.
L2 Engine: from a loop to an engine
The layer’s problem: make one GPU serve as many tokens as possible, within latency, given memory that cannot hold everyone’s KV cache.

Scheduling: who runs in each step
Iteration-level batching (Orca) is the first of two ideas that turned the loop into an engine. The scheduler revisits the batch at every model iteration instead of every batch: a finished request leaves at once, and a waiting one joins at the next step. Combined with batching per-token operations across requests while running attention per request, this is what the field now calls continuous batching. It removes the queueing and idle slots of static batching.
Chunked prefill (Sarathi-Serve) answers the long-prompt problem. It cuts a long prompt into chunks that fit a per-iteration token budget and runs each chunk in the same step as the ongoing decodes, so no single prefill can take over an iteration. Decodes keep their rhythm; long prompts take more iterations to finish. Preemption goes further under bursts: TokenFlow preempts requests to keep text streaming responsive when requests arrive in a rush.
Length-aware batching deals with the fact that generation length is unknown in advance. Multi-Bin Batching groups requests with similar predicted execution times into bins, provably improving throughput under static batching while quantifying the gap that remains to continuous batching. SCLS cuts the maximum generation length into slices and serves batches slice by slice, which makes time and memory predictable enough to schedule; throughput improves by up to 315.8%. Since length is unknown, either predict it or cut it into predictable pieces.
Memory: making the KV cache fit
Paged KV memory (PagedAttention / vLLM) is the second founding idea. The KV cache is cut into fixed-size blocks allocated on demand and located through a per-request block table, the way an operating system pages memory. Memory is no longer reserved for tokens that never arrive, so more requests fit and each step’s weights serve more of them. Sequences that share a prefix can share blocks. The cost is that the cache is no longer contiguous, so attention kernels must read it through the block table.
Everything after paging attacks one of four places.

- The allocator. vAttention objects to paging’s cost. It uses CUDA virtual memory to keep the KV cache contiguous in virtual memory while mapping physical pages on demand, so unmodified attention kernels work. It reports up to 1.23x higher serving throughput than PagedAttention-based kernels of FlashAttention and FlashInfer.
- The contents. Keep fewer tokens, or keep them in fewer bits.
- H2O (Zhang et al., 2023) observes that a small set of “heavy hitter” tokens carries most of the attention, and evicts the rest while keeping recent tokens.
- KIVI (Liu et al., 2024) quantizes the KV cache to 2 bits, keys per channel and values per token.
- Zipage puts token-wise eviction inside PagedAttention, keeping roughly 95% of full-KV quality at a 2.1x speedup on large-scale mathematical reasoning.
- The tier. Move KV off the GPU and bring it back when needed.
- FastDecode runs part of the KV work on CPUs in a heterogeneous pipeline.
- AdaptCache chooses, per KV entry, the compression algorithm, rate and device, so that reuse hits land in DRAM rather than on SSD; at equal quality it saves 1.43 to 2.4x delay.
- LMCache packages the tier as a KV cache layer outside the engine, so KV can live in CPU memory or storage and be shared between engine instances.
- The layer schedule. OrbitFlow solves a small ILP per request to decide which layers’ KV stays on the GPU, re-solving when the plan goes stale; TPOT and TBT SLO attainment improve by 66% and 48%.
The four routes act on different things. The allocator changes how KV is allocated and laid out; eviction and quantization change how much KV is kept and in how many bits; tiering changes where it resides; the layer schedule changes which of it stays on the GPU. Each pays in a different place: kernel and driver complexity, lossy approximation, or copying between tiers.
Compute and reuse: more tokens per byte read
Kernels. FlashAttention (Dao et al., 2022) tiles attention so the full attention matrix never has to be written to HBM, cutting memory traffic. FlashInfer is an attention engine built for serving, with kernels for the paged and ragged KV layouts the engine creates.
Prefix reuse. SGLang keeps the KV of finished requests in a radix tree, RadixAttention, and reuses the longest matching prefix for the next request, skipping that part of prefill. vLLM hashes each full block together with its parent’s hash, so it reuses whole blocks; the engines article compares how the major engines match prefixes. CacheGen compresses KV so it can be streamed over the network instead of recomputed. Cached KV competes with the running batch for memory, and a hit only helps if the request reaches the replica holding it; that is a routing problem, taken up at L4.
Speculative decoding (Leviathan et al., 2023) lets a cheap drafter propose several tokens and has the target model verify them all in one pass, so one pass over the weights can yield several tokens. With the exact acceptance rule of speculative sampling, the output distribution is unchanged. The drafter varies: a separate small model in the original paper; extra decoding heads verified as a tree in Medusa (Cai et al., 2024), which also offers a typical-acceptance scheme that relaxes exactness for a higher acceptance rate; a draft built from the target’s own features in EAGLE (Li et al., 2024); multi-token prediction modules trained with the model (Gloeckle et al., 2024; DeepSeek-AI, 2024). Drafts that get rejected cost compute.
Quantization shrinks the bytes themselves. AWQ (Lin et al., 2024) quantizes weights to 4 bits and protects the small fraction of channels that activations show to be salient. QServe co-designs 4-bit weights and KV with 8-bit activations. The risk is accuracy, and each format needs kernels for each hardware generation.
L2 in one line: continuous batching on paged KV turned the loop into an engine; everything since makes each step serve more tokens from the same bytes.
L3 Replica: when one GPU is not one replica
The layer’s problem: compose GPUs into a replica when the model does not fit on one, or when prefill and decode want different hardware.

Splitting the model
Tensor parallelism (Megatron-LM, Shoeybi et al., 2019) splits each layer’s matrices across GPUs and combines partial results at every layer, which needs a fast interconnect and usually stays inside a node. Pipeline parallelism (GPipe, Huang et al., 2019) assigns contiguous layers to stages and streams micro-batches through them, paying with pipeline bubbles and per-stage latency. Expert parallelism spreads a mixture-of-experts model’s experts across GPUs and sends each token to the GPUs holding its experts, turning every MoE layer into an all-to-all exchange. ELDR routes decode requests with expert locality in mind for this setting. All three reduce weight bytes per GPU, and all three pay in communication inside every step.
Splitting the phases
Prefill/decode disaggregation runs the two phases on different GPUs. Chunked prefill controls how much prefill work runs in each iteration; disaggregation controls where prefill and decode execute. DistServe gives each phase its own GPUs and picks each phase’s parallelism to maximize goodput. Splitwise (Patel et al., 2024) splits the phases onto separate machines so each can use hardware suited to it. The price is handing the KV cache from the prefill instance to the decode instance, a new term in TTFT, and two pools whose sizes have to be balanced. The handoff does not require a tier outside the GPU: in DistServe, decode instances pull KV from the prefill instances’ GPU memory, and placement keeps matching stages on one node so the transfer can ride NVLink.
The KV pool. Mooncake, the serving platform behind Kimi, takes a different design: it pools the idle CPU, DRAM and SSD of the GPU cluster into a disaggregated KV cache, with a KV-centric scheduler on top. It also admits that under heavy overload not everyone can be served, and rejects requests early based on predicted load. In production this let Kimi handle 75% more requests.
Split anywhere. DynaServe argues that with skewed prompt and response lengths, neither colocated nor disaggregated deployment wins. It splits each request at any token boundary into at most two cooperating segments on unified GPU instances, raising serving capacity 1.15 to 3.07x. The prefill/decode decision moves from deployment time to request time.
The stage graph. vLLM-Omni carries the split into any-to-any multimodal models. It decomposes the model into a graph of stages, each served by its own engine with its own batching and GPU allocation; job completion time drops by up to 91.4%.
Side branches
- Heterogeneous placement. Helix models heterogeneous GPUs and network links as a max-flow problem and jointly optimizes model placement and request scheduling, improving throughput up to 3.3x.
- Co-serving. FlexLLM runs inference and finetuning in the same token batch, improving finetuning throughput 1.9 to 4.8x under heavy inference load without breaking inference SLOs. PromptTuner points at the same trend for prompt-tuning jobs: inference and tuning are being pushed into one pool.
L3 in one line: once prefill and decode can live apart, the unit you place stops being a layer of the model and becomes a phase of the request.
L4 Routing: managing queues, cache locality and load
The layer’s problem: decide where each request goes, and whether it goes at all, using state the router can only see with a delay.

The default is simple: many routers rotate requests round robin, as the layers article records for TensorRT-LLM’s router and Dynamo’s frontend. Round robin knows nothing about the request, and disaggregation at L3 made that ignorance expensive.

Prefill deflection (Arun et al., 2026) measured on a production-style 2P2D A100 cluster that prefill execution is only 2 to 23% of P95 TTFT; the rest is queueing and inter-node KV transfer. Its answer is to let decode nodes absorb prefill chunks into their in-flight batches, choosing the largest chunk schedule that still keeps those decodes inside their TBT SLO. Chunking and disaggregation, in other words, combine.
Admission and queues. QLM organizes traffic into request groups and virtual queues, estimates how long each queued request will wait, and lets a global scheduler pull, evict, balance and swap models. SLO attainment improves 40 to 90%. UELLM treats profiling, batching and deployment as one problem; latency falls 72.3 to 90.3%.
SLO-aware routing. SLOs-Serve allocates tokens across chunked prefill and optional speculative decoding for several SLOs at once, with multi-replica routing on top, improving per-GPU capacity by 2.2x on average.
Cache affinity. A prefix hit at L2 only pays if the request reaches the replica that holds the prefix, while sending every request there overloads it. DualMap targets cache affinity and load balance together. Among open-source control planes, llm-d’s router scores replicas by prefix-cache match by default, while Dynamo’s KV router is implemented but off by default.
Balance and the tail.
- In serving configurations whose forward passes synchronize across data-parallel ranks, such as data-parallel attention combined with cross-rank expert parallelism, load imbalance makes the slowest rank set each decode step’s time. Independent replicas share no such barrier. BalanceRoute targets the synchronized setting, routing inside a sub-100 ms decode budget to even that load out, evaluated on a 144-NPU cluster.
- Kairos orders prefill by urgency and packs short requests into the slack between decode step time and the TPOT SLO. TTFT, TPOT and end-to-end SLO attainment improve by 23.9%, 27.1% and 33.8%.
Heterogeneous pools. GoodServe routes agentic requests across heterogeneous GPUs in a predict-and-rectify manner: it estimates output lengths and GPU status, picks just enough instance for each request, and migrates requests at run time when their SLOs come at risk. Goodput improves by up to 27.4% over existing routing methods.
L4 in one line: splitting the replica at L3 pushed the complexity up here, and the router now needs to know the queue, the cache and the load to place a request well.
L5 Contract: someone finally writes down what is promised
The layer’s problem: decide what counts as goodput, and what happens when the promise breaks.

Goodput. Raw throughput counts every token, including those that arrived too late to matter. DistServe framed serving as maximizing requests that meet both a TTFT and a TPOT target, which is the objective most of this post optimizes.
Several SLOs. SLOs-Serve admits that summarization, coding, chat, tool calling and reasoning need different targets, and optimizes for several at once.
Workload classes. Human-Less asks whether the targets fit the traffic at all. TTFT and TPOT encode what a human perceives, yet agent loops call models with nobody watching, and meeting human-facing SLOs for them costs 60 to 93% of throughput. Its proposal is SLA configuration that knows the workload class, which means the request has to carry its class and the system has to honour it.
Failure. The other half of the contract is what happens when it breaks.
- The production incident study codes a year of high-severity incidents. Around 60% are inference-engine failures, and a large share were mitigated by traffic routing, node rebalancing or capacity changes rather than code fixes. Your menu of mitigations determines your availability.
- SLO-Guard tunes vLLM configurations in a search space the paper calls failure-prone, where many plausible configurations crash outright. In its five-seed study, best-achieved latency was not significantly different from random search (p = 0.84); the claimed advantage is spending the tuning budget more consistently.
L5 in one line: the objective moved from a number to a table of workload classes; among the works examined here, fewer of them study what happens when the promise breaks.
L1 Substrate: the GPU is no longer exclusive
The layer’s problem: share devices between models and tenants, and get a model onto a GPU fast enough that scaling up helps.

Sharing. MIG and MPS share a GPU in different ways. MIG partitions it into hardware instances, each with dedicated compute and memory; MPS lets processes run on the same GPU concurrently with weaker isolation between them. The difference matters for multi-tenant isolation, taken up in the open questions. D-STACK predates LLMs: it sizes each model’s GPU share by how much parallelism it can actually use and reaches over 90% of an idealized scheduler’s throughput. GPU sharing was a problem before LLMs; LLMs added the KV cache as a new constraint on it.
Cold start. Loading a large model is slow enough to dominate scale-up.
- ServerlessLLM (Fu et al., 2024) keeps checkpoints in the GPU servers’ own storage, loads them through a multi-tier loading system, live-migrates running inference, and schedules models onto servers where their checkpoints already sit. It reports 10 to 200x lower latency than earlier serverless systems.
- HydraServe distributes the model across servers so it can be fetched in parallel and overlaps the cold-start stages; cold start drops 1.7 to 4.7x.
Prewarming. WarmServe forecasts periodic demand and prewarms several models’ weights into idle KV cache space, cutting tail TTFT by up to 50.8x. Prewarmed weights and live KV now compete for the same HBM.
Streaming weights to slices. C2CServe observes that a MIG slice has too little HBM for modern LLM weights, but that a fast CPU-GPU interconnect such as NVLink-C2C lets weights stay in host memory and stream to the slice on demand. MIG instances can then switch models between requests without reloading weights into HBM. On GH200 it cuts cold-start latency by up to 7.1x for dense models and 4.6x for MoE models.
L1 in one line: the GPU became a shared, warm-startable resource rather than a box you own for the duration.
L0 Capacity: losing a GPU becomes routine
The layer’s problem: obtain GPU capacity at the lowest price that still keeps the promise, when cheap capacity can vanish and comes in mixed types.

The baseline is a pool of identical on-demand GPUs. Everything after it trades price against the risk of losing capacity.

- Spot with migration. SpotServe re-parallelizes the replica onto whatever spot instances remain, plans a minimal migration with bipartite matching, and commits progress at token granularity during the grace period. The paper reports P99 latency 2.4 to 9.1x lower than the best existing serving systems it compares against. Separately, it reports 54% lower monetary cost than using only on-demand instances.
- Spot across regions. SkyServe spreads spot replicas across regions and clouds, because preemptions inside one region are correlated, and cuts cost by 43% on average against on-demand replicas; separately, it improves P50, P90 and P99 latency by 2.1 to 2.3x on average over the other systems it compares.
- Heterogeneous spot pools. ShuntServe swaps geography for hardware diversity: it places replicas over mixed spot GPU types and migrates requests without losing output, reporting 1.42x the throughput of state-of-the-art baselines and, separately, a 31.9% cost-efficiency improvement over on-demand instances for offline serving. Helix, at L3, shows the same joint placement problem without the preemptions.
- Deciding before you buy. InferSave finds that for online workloads a cheaper instance without KV offloading wins by up to 73.7%. OmniPilot predicts serving cost per configuration and abstains on out-of-distribution requests rather than guessing; an advisor that can say “I don’t know” beats one that always has an answer.
L0 in one line: choosing capacity means comparing price, availability and interruption risk, not just the hourly GPU rate.
Putting it together
Here are the components from the six layers assembled into one system.

One request, traced through it.
- The request arrives with its workload class, which sets its TTFT and TPOT targets (L5).
- Admission decides whether to queue it or turn it away, and the router picks a prefill replica by prefix-cache match and current load (L4).
- On the prefill pool, the cached prefix is skipped, the rest of the prompt runs in chunks, and attention runs over paged KV through serving kernels (L2).
- The KV cache is handed to a decode replica (L3), directly GPU to GPU or through the shared KV tier (L2).
- Decode runs in a continuous batch on quantized weights, with a drafter proposing several tokens per step (L2); the model is split across GPUs by tensor or expert parallelism (L3).
- When the request goes idle, its KV is evicted, compressed or offloaded to a slower tier, ready for the next turn (L2).
- Underneath, the cluster warms new replicas and shares devices (L1), and capacity is added, removed and replaced after preemptions (L0).
Where the components interact. These components do not simply add up. The table marks the pairs where one component changes what another can do. Rows without a citation are this article’s reasoning, and are marked so.
Chunked prefill (L2) and disaggregation (L3) — interaction: Both answer prefill/decode interference, on different dimensions: chunking sets how much prefill work runs in an iteration, disaggregation sets where each phase executes. They can be combined; how well depends on the workload and the scheduling policy, and skewed lengths can defeat a static choice of either; basis: prefill deflection; DynaServe
Disaggregation (L3) and routing (L4) — interaction: Separating phases moves request time into queueing and KV transfer; basis: prefill deflection, 2 to 23%
Prefix caching (L2) and routing (L4) — interaction: A hit only pays if routing sends the request to the replica holding the prefix, while concentrating traffic there overloads it; basis: DualMap; llm-d default
Subscribe to Friend of Medium to remove upgrade prompts from your unlocked stories.
Expert parallelism (L3) and data-parallel balance (L4) — interaction: Where data-parallel ranks synchronize every step, as with DP attention and cross-rank EP, each decode step waits for the most loaded rank; independent replicas do not; basis: BalanceRoute; the case study’s three balancers
Spot capacity (L0) and stateful KV (L2, L3) — interaction: State-preserving migration can reduce the cost of interruptions; its value depends on the workload and recovery policy; basis: SpotServe, ShuntServe; SkyServe takes a different route
Prewarming (L1) and KV memory (L2) — interaction: Prewarmed weights and live KV compete for the same HBM; basis: WarmServe
Speculative decoding (L2) and large batches — interaction: The spare compute that verification uses shrinks as the batch grows; basis: editorial reasoning
KV eviction, quantization and tiering (L2) — interaction: Whether they compose or cancel is untested in the works examined here; basis: editorial; see the open questions
Three constraints run through the table.
- Cheaper capacity shifts interruption risk into the serving design. SpotServe and ShuntServe address that risk through reconfiguration and state-preserving migration; SkyServe emphasizes distributing replicas across regions and clouds. These are different ways to absorb preemption, not steps every spot-based service must implement.
- KV handoff, not offloading, is what lets the phases live apart. Prefill and decode can run on different GPUs as long as the KV state the decode instance needs can be transferred or otherwise made available to it. DistServe pulls it from the prefill GPU’s memory; Mooncake moves it through a pool built from CPU memory and SSD. A shared CPU- or storage-backed KV tier is one design option, not a prerequisite; Figure 11 includes one because it also serves prefix reuse.
- The contract sets the targets; routing and placement work within them. Disaggregation adds KV-transfer and coordination costs that those decisions must account for. Different workload classes can justify different latency targets whether the phases are colocated or separated, as SLOs-Serve and Human-Less argue; differentiated contracts are not merely a fallback when routing falls short.
Case study: DeepSeek-V3/R1 in production
DeepSeek’s public overview of its V3/R1 inference system shows many of these components running together in one production system. Every fact below comes from that overview unless marked otherwise. Its production statistics cover one 24-hour window, from noon on 27 February to noon on 28 February 2025 (UTC+8).
- Phases split, with different parallelism (L3). Prefill and decode are disaggregated:
- each prefill unit spans 4 nodes with 32-way expert parallelism;
- each decode unit spans 18 nodes with 144-way expert parallelism;
- attention and the shared expert run data-parallel at the same widths, and 32 redundant routed experts are spread across the GPUs.
- The reason given is the model’s sparsity: only 8 of 256 experts per layer are active, so each expert needs a very large overall batch to stay busy.
- Communication hidden behind compute (L3). Prefill splits each batch into two micro-batches, so that one micro-batch’s communication overlaps the other’s computation. Decode splits the attention layer into two steps and runs a 5-stage pipeline.
- Three load balancers (L4). Attention runs data-parallel next to cross-rank expert parallelism, which is exactly the synchronized setting in which the slowest rank sets the step.
- The prefill balancer evens out core-attention work and input tokens per GPU.
- The decode balancer evens out KV cache usage and request counts.
- The expert balancer minimizes the maximum dispatch load any GPU receives.
- Low precision (L2). Matrix multiplications and dispatch use FP8; core attention (MLA) and combine use BF16.
- Reuse at scale (L2). In that window, 342B of 608B input tokens (56.3%) hit the on-disk KV cache.
- Elastic capacity (L0). Inference takes all nodes at the daytime peak and gives nodes back to research and training at night. Peak occupancy was 278 nodes and the average was 226.75, each with 8 H800 GPUs.
- Reported operating metrics. Average output speed was 20 to 22 tokens per second, at an average KV length of 4,989 tokens per output token. Each H800 node averaged about 73.7k input tokens per second during prefilling, including cache hits, or about 14.8k output tokens per second during decoding. These are operating statistics, not attainment against a stated latency target.
The overview does not say whether the service decodes speculatively. The V3 technical report (DeepSeek-AI, 2024) describes the multi-token prediction modules and notes they can be repurposed for speculative decoding.
Mooncake (L3) is the second public reference: a production platform that also separates the phases, keeps KV in a pool built from idle CPU, DRAM and SSD, and sheds load early under overload. The two systems converge on three moves: split the phases, keep reusable KV in storage off the GPU, and balance load across many workers explicitly. Neither describes a workload-class contract of the kind L5 calls for.
Known tensions and open gaps
Some tensions no single component escapes.
The batch-size dial. Every engine has a limit on batch tokens or sequences, and every setting of it trades throughput against latency. Increasing the batch can improve weight reuse, but it can also increase step time and tighten the TPOT budget. The useful operating point depends on the workload, so one global limit need not suit every workload class, which is one more reason the contract matters. The trade-offs article works through where batching stops helping, with numbers.
A serving triad. This is this article’s argument, not a measured result. Three properties are each manageable alone and in pairs, and hard together:
- KV state that is expensive to move;
- elastic or disaggregated placement that keeps moving work;
- heterogeneous hardware that changes what each move costs.
ShuntServe meets all three at once, and needs a per-GPU-type performance model, output-preserving migration and a shared tensor store to cope. Helix handles heterogeneity by solving placement jointly, at the price of a full optimization problem.
Questions left unresolved by the works examined here, by layer. These are the limits of this selection, not claims about the whole literature.
- L2: How do allocator design, compression, tiering and per-layer residency interact when combined under the same workload? The four KV routes rarely cite each other in this set, though upstream engines may already combine them.
- L3: Where does coordination overhead cap ever-finer splitting? DynaServe stops at two segments as an engineering compromise; what a third would cost is not answered here.
- L4: How should routing work when the router cannot see the state it needs? The works here assume it can, and once inference spans clusters or clouds, as L0 work already does, that assumption weakens.
- L5: Can a scheduler carry and honour the workload class that Human-Less’s SLA configuration needs? None of the works examined here implements one.
- L1: How is one tenant isolated from another in multi-model GPU sharing, for instance when one tenant’s long context eats the KV space? MIG gives hardware partitions and MPS does not, and none of the sharing works here measures the difference for LLM serving.
- L0: How should a service degrade when capacity simply is not available? The capacity works here optimize how to obtain it, while the incident study lists capacity changes among the mitigations operators use.
Appendix A: Key concepts
The primer explains these at length.
- A request carries a prompt and asks for output tokens.
- Prefill processes the prompt’s tokens together, in one pass or in chunks, and produces the first output token. With many tokens per weight read it does a lot of arithmetic per byte, so it tends to be compute-bound.
- Decode then produces one token per request per step. For a dense model at small effective batch, each step is dominated by reading the weights and the batch’s KV, so it is limited by memory bandwidth; larger batches, mixture-of-experts models and speculative decoding shift that balance.
- The KV cache is the request’s history: the keys and values every past token left behind in every layer. It grows with context length, lives mainly in GPU memory (HBM), though engines can offload or tier it to CPU memory and storage, and is the state that makes a request expensive to move.
- TTFT is how long the user waits for the first token. TPOT is the mean gap between output tokens after the first, for one request; TBT (or ITL) is a single gap between consecutive tokens. Percentiles of either are taken across requests and do not plug into a per-request formula.
- An SLO puts targets on those latencies. Goodput counts only the requests, or tokens, that met their SLO; it is not the same number as raw throughput.
- Five resources get spent: compute, HBM bandwidth, HBM capacity, the network between GPUs and nodes, and money.
Appendix B: Where the evidence comes from
This article was first written as a walk through 29 papers, one layer at a time. Those papers now serve as evidence in the layer sections; this appendix records where they came from.
The 29 are not a curated top-30. They are a stratified random draw: 176 includable works, stratified by the layer their primary contribution changes (L0 to L5) crossed with era (up to 2024, 2025 to 2026), three per cell, seed 20260821, yielding 32. Three were then removed by a pre-registered rule for not being about inference serving (two training-cluster traces, one training scheduler), leaving 29.
That has a direct consequence. The engine layer holds 74 of the 176 works but only gets 6 seats here. So the engine papers among the 29 are evidence for the engine section, not a survey of engines. Likewise the contract layer has only 3 works in the entire frame; it is thin here because of what this frame caught, and the draw could not fix that.
Correction, added 2026–09–16. An earlier version of this paragraph explained L5’s thinness by saying the direction was new. A later, larger instrument refutes that: over 400 coded works the contract layer measures 11.25%, and its leading mechanism is the second most-studied in the whole vocabulary. The thin reading was a property of this frame, not of the field. See the next section and the companion snapshot article.

The 176 count is the pilot frame frozen at draw time (data/pilot-draw-log.md, seed 20260821). The series-wide corpus authority is 172 in-scope works in papers.csv after four post-draw L1 exclusions documented in data/reclass-audit.md (S-01); the 29 sampled papers were not redrawn.
A companion article, What the field actually built on, selects works by citation standing and engine adoption instead of by sampling. It is a different instrument on a different frame, so its set and this one are not comparable counts.
L0 · 2023 — system: SpotServe; one-line contribution: re-parallelize under preemption, bipartite-matching migration, token-level progress commits; ID: miao2023spotserve (2311.15566)
L0 · 2025 — system: InferSave; one-line contribution: joint VM selection and KV offloading, calibrated against measured GPU performance; ID: kim2025costefficient (2504.11816)
L0 · 2025 — system: SkyServe; one-line contribution: SpotHedge: spot replicas across regions and clouds, risk-driven on-demand mixture; ID: mao2025skyserve (2411.01438)
L0 · 2026 — system: OmniPilot; one-line contribution: launch advisor for heterogeneous clusters with an OOD abstention layer; ID: balamurugan2026omnipilot (2607.01579)
L0 · 2026 — system: ShuntServe; one-line contribution: placement optimization over heterogeneous spot pools plus output-preserving migration; ID: shuntserve2026 (2606.18600)
L1 · 2023 — system: D-STACK; one-line contribution: GPU share model and spatio-temporal scheduling for multiplexed DNNs (pre-LLM); ID: dhakal2023dstack (2304.13541)
L1 · 2025 — system: HydraServe; one-line contribution: serverless cold start: distributed fetch, stage overlap, pipeline consolidation; ID: lou2025hydraserve (2502.15524)
L1 · 2025 — system: WarmServe; one-line contribution: forecast-driven one-for-many prewarming using idle KV cache space; ID: lou2025warmserve (2512.09472)
L2 · 2024 — system: SCLS; one-line contribution: serve batches slice by slice to make time and memory predictable; ID: cheng2024slicelevel (2406.13511)
L2 · 2024 — system: Multi-Bin Batching; one-line contribution: bin requests by predicted execution time, provable gain under static batching; ID: guldogan2024multibin (2412.04504)
L2 · 2024 — system: vAttention; one-line contribution: CUDA virtual memory keeps KV contiguous, kernels unmodified; ID: prabhu2024vattention (2405.04437)
L2 · 2025 — system: AdaptCache; one-line contribution: per-entry compression and placement to push reuse hits into DRAM; ID: feng2025adaptcache (2509.00105)
L2 · 2026 — system: Zipage; one-line contribution: token-wise eviction and async compression inside PagedAttention; ID: liao2026zipage (2603.08743)
L2 · 2026 — system: OrbitFlow; one-line contribution: ILP decides per-request which layers’ KV stays resident, re-solved at runtime; ID: ma2026orbitflow (2601.10729)
L3 · 2024 — system: FlexLLM; one-line contribution: co-serve inference and PEFT finetuning inside one token batch; ID: oliaro2024flexllm (2402.18789)
L3 · 2024 — system: Mooncake; one-line contribution: KVCache-centric prefill/decode split over a pool built from idle CPU, DRAM and SSD; ID: qin2024mooncake (2407.00079)
L3 · 2024 — system: Helix; one-line contribution: max-flow plus MILP joint placement and scheduling over heterogeneous GPUs; ID: mei2024helix (2406.01566)
L3 · 2025 — system: DynaServe; one-line contribution: micro-requests: split at any token boundary into two cooperating segments; ID: ruan2025dynaserve (2504.09285)
L3 · 2026 — system: vLLM-Omni; one-line contribution: stage graph for any-to-any multimodal models, one engine per stage; ID: yin2026vllmomni (2602.02204)
L3 · 2026 — system: PromptTuner; one-line contribution: SLO-aware elastic scheduling for prompt-tuning services; ID: gao2026prompttuner (2603.05087)
L4 · 2024 — system: UELLM; one-line contribution: profiler, batch scheduler and deployer optimized as one problem; ID: he2024uellm (2409.14961)
L4 · 2024 — system: QLM; one-line contribution: request groups and virtual queues driven by a waiting-time estimator; ID: patke2024queue (2407.00047)
L4 · 2025 — system: SLOs-Serve; one-line contribution: multi-SLO dynamic programming over token allocation, multi-replica routing; ID: chen2025slosserve (2504.08784)
L4 · 2026 — system: Kairos; one-line contribution: urgency-ordered prefill plus slack-guided decode batching; ID: wang2026taming (2605.02329)
L4 · 2026 — system: BalanceRoute; one-line contribution: data-parallel load balancing routing inside a sub-100 ms budget; ID: bu2026tackling (2605.06113)
L4 · 2026 — system: Prefill deflection; one-line contribution: decode nodes absorb prefill as interleaved chunks; ID: arun2026towards (2607.02043)
L5 · 2025 — system: Production incidents; one-line contribution: taxonomy and attribution over 156 high-severity incidents, κ ≈ 0.89; ID: ranganathan2025incidents (2511.07424)
L5 · 2026 — system: SLO-Guard; one-line contribution: crash-aware autotuning that wins on budget consistency, not final quality; ID: lysensten2026sloguard (2604.17627)
L5 · 2026 — system: Human-Less; one-line contribution: quantifies the 60 to 93% throughput tax paid for human-facing metrics; ID: lian2026humanless (2606.20577)
The three excluded works (hu2024acme, phillytraces, luo2025predictionassisted) are training-cluster traces or training schedulers and were removed by the pre-registered rule.
Appendix C: Landmark mechanisms (400-work snapshot, not this draw)
The subsections below use a different instrument: 400 coded works from snapshot-2026 (data/snapshot-2026/), joined to the frozen 25-mechanism vocabulary. Every percentage in this section is a share of those 400 works, never of the 29 papers above. data/landmarks.csv names one landmark paper for each of the 25 mechanisms; the prose below quotes most but not all of them. Entries marked Anchor sit outside the 172-work corpus (cite-only, as in the primer); unmarked entries are in the corpus. The figures are mechanism maps: each node is a mechanism with its landmark paper, and each line names a problem two mechanisms share. They do not claim publication lineage (that one paper extends or objects to another), and they are not runtime coupling across layers.

L0 Capacity
Only two vocabulary mechanisms map here; both sit below 4% of the 400 works, so a bare point estimate would overstate the precision of either. Heterogeneous GPU capacity appears in 3.75% [2.29%, 6.09%] of works (landmark in corpus: OmniPilot). Spot / preemptible capacity is 0.25% [0.04%, 1.40%] (landmark: SpotServe).

L1 Substrate
Cold start / weight loading reaches 5.00% [3.26%, 7.60%] of the 400 works (landmark: HydraServe), exactly at the threshold where the protocol still permits a bare point estimate. GPU sharing (MIG/MPS) is 0.75% [0.26%, 2.18%] (landmark: C2CServe). With only 25 primary-layer works at L1 in the 400 sample, any layer-level conclusion here stays thin.

L2 Engine
Thirteen mechanisms register at L2, the most of any layer. In rank order over the 400 works, the top nine: KV eviction leads at 14.00% [10.94%, 17.74%] (Anchor. H2O); prefix / radix caching 9.75% [7.21%, 13.05%] (SGLang); speculative decoding 8.50% [6.15%, 11.64%] (Anchor. Leviathan et al.); KV-cache quantization 7.50% [5.30%, 10.50%] and weight quantization 6.50% [4.47%, 9.35%], which share the corpus landmark QServe; KV offloading 5.75% [3.86%, 8.48%] (FastDecode); continuous batching 4.00% [2.48%, 6.40%] (Anchor. Orca); priority scheduling / preemption 3.75% [2.29%, 6.09%] (TokenFlow); and paged / block KV 2.50% [1.36%, 4.54%] (PagedAttention).
Two of the layer’s best-known systems sit far down that ranking rather than near the top. Chunked prefill is 1.00% [0.39%, 2.54%] (Sarathi-Serve) and LoRA multiplexing is 1.50% [0.69%, 3.23%] (Anchor. LoRA). Being foundational and being frequently studied are different properties, and this layer separates them clearly.

L3 Replica
Every mechanism here sits below 5% of the 400 works, so all five carry intervals. Prefill/decode disaggregation is 4.50% [2.87%, 7.00%] (DistServe). Pipeline parallelism 3.75% [2.29%, 6.09%] (Anchor. GPipe). Tensor parallelism 2.00% [1.02%, 3.90%] (Anchor. Megatron-LM). MoE expert parallel (also counted at L2) is 1.75% [0.85%, 3.57%] (ELDR). Data-parallel attention is 0.25% [0.04%, 1.40%], a single coded work, and its landmark is the same system this article discusses in the L4 section under its name BalanceRoute.

L4 Routing
Load balancing is 5.75% [3.86%, 8.48%] of the 400 works (GoodServe). Cache-aware routing is 2.50% [1.36%, 4.54%] (DualMap). Admission control is 2.25% [1.19%, 4.22%] (QLM).

L5 Contract
Two mechanisms register at L5, and they could hardly be further apart. SLO targets and goodput is 10.75% [8.08%, 14.17%] of the 400 works (SLOs-Serve), second-highest of any mechanism in the vocabulary. Engine hang watchdog, which is L2/L5, is 0.00% [0.00%, 0.95%] — no coded work received the engine-hang-watchdog label. This result concerns one mechanism under the frozen coding scheme; it does not measure the broader literature on reliability, failures or recovery.

Appendix D: References
Works cited above by author and year. All are outside the 29-paper sample.
- Cai, T. et al. (2024). Medusa: Simple LLM Inference Acceleration Framework with Multiple Decoding Heads. ICML 2024. arXiv:2401.10774
- Dao, T. et al. (2022). FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness. NeurIPS 2022. arXiv:2205.14135
- DeepSeek-AI (2024). DeepSeek-V3 Technical Report. arXiv:2412.19437
- DeepSeek-AI (2025). Day 6: One More Thing, DeepSeek-V3/R1 Inference System Overview. GitHub, open-infra-index
- Fu, Y. et al. (2024). ServerlessLLM: Low-Latency Serverless Inference for Large Language Models. OSDI 2024. arXiv:2401.14351
- Gloeckle, F. et al. (2024). Better & Faster Large Language Models via Multi-token Prediction. ICML 2024. arXiv:2404.19737
- Huang, Y. et al. (2019). GPipe: Easy Scaling with Micro-Batch Pipeline Parallelism. NeurIPS 2019. arXiv:1811.06965
- Kwon, W. et al. (2023). Efficient Memory Management for Large Language Model Serving with PagedAttention. SOSP 2023. arXiv:2309.06180
- Leviathan, Y. et al. (2023). Fast Inference from Transformers via Speculative Decoding. ICML 2023. arXiv:2211.17192
- Li, Y. et al. (2024). EAGLE: Speculative Sampling Requires Rethinking Feature Uncertainty. ICML 2024. arXiv:2401.15077
- Lin, J. et al. (2024). AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration. MLSys 2024. arXiv:2306.00978
- Liu, Z. et al. (2024). KIVI: A Tuning-Free Asymmetric 2bit Quantization for KV Cache. ICML 2024. arXiv:2402.02750
- Patel, P. et al. (2024). Splitwise: Efficient generative LLM inference using phase splitting. ISCA 2024. arXiv:2311.18677
- Shoeybi, M. et al. (2019). Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism. arXiv:1909.08053
- Yu, G.-I. et al. (2022). Orca: A Distributed Serving System for Transformer-Based Generative Models. OSDI 2022. USENIX
- Zhang, Z. et al. (2023). H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models. NeurIPS 2023. arXiv:2306.14048
- Zheng, L. et al. (2024). SGLang: Efficient Execution of Structured Language Model Programs. NeurIPS 2024. arXiv:2312.07104
Corpus works cited above and not in the sample:
- Agrawal, A. et al. (2024). Taming Throughput-Latency Tradeoff in LLM Inference with Sarathi-Serve. arXiv:2403.02310
- Chen, J. et al. (2025). TokenFlow: Responsive LLM Text Streaming Serving under Request Burst via Preemptive Scheduling. arXiv:2510.02758
- Choi, S. et al. (2026). ELDR: Expert-Locality-Aware Decode Routing for PD-Disaggregated MoE Serving. arXiv:2607.00466
- Du, B. et al. (2026). GoodServe: Towards High-Goodput Serving of Agentic LLM Inferences over Heterogeneous Resources. arXiv:2605.16867
- He, J. and Zhai, J. (2024). FastDecode: High-Throughput GPU-Efficient LLM Serving using Heterogeneous Pipelines. arXiv:2403.11421
- Lin, Y. et al. (2024). QServe: W4A8KV4 Quantization and System Co-design for Efficient LLM Serving. arXiv:2405.04532
- Liu, Y. et al. (2023). CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Serving. arXiv:2310.07240
- Liu, Y. et al. (2025). LMCache: An Efficient KV Cache Layer for Enterprise-Scale LLM Inference. arXiv:2510.09665
- Luo, S. et al. (2026). C2CServe: Leveraging NVLink-C2C for Elastic Serverless LLM Serving on MIG. arXiv:2605.19481
- Ye, Z. et al. (2025). FlashInfer: Efficient and Customizable Attention Engine for LLM Inference Serving. arXiv:2501.01005
- Yuan, Y. et al. (2026). DualMap: Enabling Both Cache Affinity and Load Balancing for Distributed LLM Serving. arXiv:2602.06502
- Zhong, Y. et al. (2024). DistServe: Disaggregating Prefill and Decoding for Goodput-optimized Large Language Model Serving. OSDI 2024. arXiv:2401.09670

Feedback
Share feedback on this post.
Add a correction, ask a question, or share what worked in your own production environment.