Systems & Infrastructure
The Inference Stack, Layer by Layer
IntermediateServing a model in production takes far more than an inference engine. This page maps the whole stack, from the API a client calls down to the kernels and the silicon, so you can place any project, feature or bottleneck in one picture.
Why think in layers
By late 2026 the major engines (, , and others) have converged on the same core techniques. What still separates one deployment from another sits around the engine: how requests are routed, how pools are orchestrated and scaled, where the lives, and how well the kernels fit the hardware. A layer map makes those choices visible. For the basics of prefill, decode and batching, start with Inference & Serving; for KV cache sizing, see the KV Cache page.
What the engines now share
Prefill/decode disaggregation
Separate prefill and decode pools are the production default for large MoE models, in open engines and in orchestrators that manage both pools as one unit.
Wide expert parallelism
Decode spreads a MoE model's experts across 64-128 GPUs so each GPU reads fewer weight bytes per step. DeepInfer uses this layout in production.
KV offload built in
Tiering KV cache to CPU memory, SSD and shared storage moved from add-on projects into the engines themselves: vLLM's multi-tier offloading, SGLang HiCache.
Speculative decoding by default
Draft models ship alongside new model releases: vLLM v0.34 serves MiniMax-M3.1-Flash with a DSpark draft, and ATOM runs DSpark and EAGLE3.
FP4 everywhere
New models arrive with NVFP4 or MXFP4 checkpoints (Mistral Large 4 in vLLM, MXFP4 experts in ATOM), and DeepInfer stores its KV cache in FP4.
The whole stack in one picture
Each colored band is one layer, drawn with the parts that live in it: clients and the API frontend at the top, the router that picks a replica, the orchestrator that runs the fleet, engine replicas with their batches, the KV cache in GPU memory and a shared tier below it, the kernels, and the GPUs themselves. You can follow one request down the stack and back, for a first or a returning turn, on one pool or a prefill/decode split.
This turn
Replicas
Step 1 of 9
Client sends a turn
A coding agent sends its next turn: the whole conversation so far plus a new message. The API frontend applies the chat template and tokenizes it on the CPU.
Layer 1 · API & protocol
Messages in, streamed tokens out
The contract between applications and the fleet: chat messages, tool calls, structured output and, increasingly, conversation state held on the server. Requests are turned into tokens here with the model's chat template.
Projects: OpenAI Chat Completions · OpenAI Responses API · Anthropic Messages
Tap any band or box to see what that layer does. Replica loads, cache fill and router scores are illustrative.
The stack, layer by layer
Seven layers, from what a client sees to what the GPU runs. Each has its own job, its own set of open projects and its own way of becoming the bottleneck. Some projects span several layers. ships a router, an orchestrator and KV components, but each piece still does one layer's job.
The serving stack, top to bottom
Click a layer
Gateway & routing
Chooses which replica serves each request. A plain load balancer only sees connections; an inference router sees queue depth, KV cache contents, prefill or decode role, session and priority, and scores every replica before picking one.
Projects (latest release as of Nov 2026)
- Gateway API Inference Extensionv1.6.2
Kubernetes CRDs (InferencePool) and conformance tests for model-aware routing through an endpoint picker. Since v1.6.0 the full endpoint picker lives in llm-d.
- llm-d router (endpoint picker)v1.0.0
Prefix-cache-aware scoring, flow control with fairness and load shedding, session affinity and turn priority for agents.
- Dynamo Routerv1.6.2
KV-aware routing from a radix tree of each worker's cached blocks; the frontend, standalone service and endpoint picker share one selection core.
Typical bottleneck
A bad pick costs a full re-prefill. Routing on load alone throws away cache hits; routing on cache alone piles hot sessions onto one replica.
- Requests flow down; tokens stream back up.
Gateway & routing
Chooses which replica serves each request. A plain load balancer only sees connections; an inference router sees queue depth, KV cache contents, prefill or decode role, session and priority, and scores every replica before picking one.
Projects (latest release as of Nov 2026)
- Gateway API Inference Extensionv1.6.2
Kubernetes CRDs (InferencePool) and conformance tests for model-aware routing through an endpoint picker. Since v1.6.0 the full endpoint picker lives in llm-d.
- llm-d router (endpoint picker)v1.0.0
Prefix-cache-aware scoring, flow control with fairness and load shedding, session affinity and turn priority for agents.
- Dynamo Routerv1.6.2
KV-aware routing from a radix tree of each worker's cached blocks; the frontend, standalone service and endpoint picker share one selection core.
Typical bottleneck
A bad pick costs a full re-prefill. Routing on load alone throws away cache hits; routing on cache alone piles hot sessions onto one replica.
Versions are each project's latest GitHub release as of 17 November 2026; projects without a version ship without tagged releases or inside a larger project.
Follow one request down the stack
A coding agent's 5th turn on a deployment. Almost all of its prompt was sent on turn 4, so the work that matters is finding that context again: the router picks the replica that holds it, skips recomputing it, and only the new tokens are prefilled.
- API
- Routing
- Orchestration
- Engine
- KV cache
- Kernels
- Hardware
API & protocol
Turn 5 arrives
A coding agent sends its 5th turn: the whole conversation so far (58K tokens, identical to turn 4) plus a 2K-token tool result. The frontend applies the chat template and tokenizes it.
From cache
0K
Prefilled
0K
Generated
0
Token counts are illustrative.
The routing step (prefix-aware vs load-aware picks) is covered in more depth on Inference & Serving.
Disaggregation beyond prefill and decode
Splitting prefill from decode was the first cut. The same idea now goes further: a separate encoder stage for images and audio, and a cut inside the model itself that runs attention apart from the FFN and layers. Each cut lets one part scale on its own terms. The cost is something new crossing the network, and the deeper the cut, the more often it crosses.
Aggregated
One pool
Prefill and decode on the same GPUs
Every replica does everything. It's simple and fine at low traffic. But a burst of long prompts stalls every user's decode, and one parallelism plan has to suit two very different workloads.
Where you'll see it: Single-replica and low-traffic deployments.
Serving agents
Agents change the traffic. A coding agent sends dozens of turns per session, each resending a long and growing context, with tool calls in between. The stack has already seen most of every prompt, so what matters is whether it can find that context again. SemiAnalysis built its AgentX benchmark around this, by replaying real Claude Code sessions.
Sessions replayed
393
real Claude Code traces
Median input
142K
tokens per request
Median output
444
tokens per request
Sessions with subagents
44%
up to 10 at once
AgentX v1.0 dataset (Aug 2026), contexts up to 1M tokens.
How routing and retention set the hit rate
The routing and retention policy controls how much of each turn has to be prefilled again.
Routing
KV retention during idle gaps
Input over the session
2.54M
tokens sent across all turns
From cache
95%
of input tokens
Prefill work
1.0x
133K tokens vs the best case
Illustrative session: 20K tokens of setup, 1-9K new tokens per turn and a 400-token reply per turn. Round-robin lands each turn on a replica that last saw the session 4 turns earlier.
What agent-aware serving adds
Session affinity
Keep a conversation on the replica that holds its context. llm-d v1.0 adds session affinity and a session-state plugin; Dynamo's router scores replicas by cached blocks.
Turn priority
A turn in the middle of a session already has an agent and a user waiting on it. llm-d's flow control can rank it ahead of new sessions and shed load fairly under overload.
Retention measured in days
Tool calls, test runs and human review leave long gaps between turns. DeepSeek keeps agent KV cache for 3 days on shared SSD storage so a returning session still hits.
Tenant isolation for shared prefixes
Sharing a cached prefix across tenants can leak information through timing. A cache salt keeps differently salted requests in separate KV entries. Dynamo added it for SGLang workers in v1.6.
How long-lived KV cache is stored and shared is covered on Context Memory; a production example that keeps KV for days is DeepInfer's Inference Stack.
Who builds the stack
The open projects at the center of the stack now have companies and foundations behind them, and that affects how each layer develops.
Inferact (vLLM)
Founded by vLLM's creators; launched in January 2026 with a $150M seed round at an $800M valuation, to offer a managed vLLM while its maintainers keep contributing upstream.
RadixArk (SGLang)
Founded by people behind SGLang; launched in May 2026 with a $100M seed round at a $400M valuation, with NVIDIA and AMD among the investors.
llm-d (CNCF)
Donated by IBM Research, Red Hat and Google Cloud and accepted as a CNCF Sandbox project in March 2026; v1.0 shipped in October 2026. It also took over the endpoint picker from the Gateway API Inference Extension.
NVIDIA Dynamo
Open-source orchestration across vLLM, SGLang and TensorRT-LLM; 1.0 went GA at GTC in March 2026, with NIXL, KVBM and Grove also usable on their own.
Sources
- vLLM releases (v0.34.0; v0.22.0 multi-tier KV offload) ↗
- SGLang releases (v0.5.23) ↗
- NVIDIA Dynamo releases (v1.6.0, v1.6.2) ↗
- llm-d v1.0.0 release notes ↗
- Gateway API Inference Extension v1.6.0 release notes ↗
- vLLM blog: AFD plugin (Jul 2026) ↗
- vLLM blog: encoder disaggregation with EPD (Nov 2026) ↗
- NVIDIA blog: Groq 3 LPX on Vera Rubin (Aug 2026) ↗
- NVIDIA: Dynamo 1.0 enters production (Mar 2026) ↗
- CNCF: welcome llm-d (Mar 2026) ↗
- SemiAnalysis AgentX v1.0 methodology ↗
- TechCrunch: Inferact lands $150M (Jan 2026) ↗
- SiliconANGLE: RadixArk $100M round (May 2026) ↗
- FlashAttention (FlashAttention-4, CuTe DSL) ↗
- AMD ATOM ↗
- DeepInfer deployment Q&A ↗
Release versions and dates were checked against each project's GitHub releases on 17 November 2026.