<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/xsl" href="rss.xsl"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>llm-d Blog</title>
        <link>https://llm-d.ai/blog</link>
        <description>llm-d Blog</description>
        <lastBuildDate>Wed, 25 Nov 2026 09:00:00 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <item>
            <title><![CDATA[MoRI in llm-d: P/D Disaggregation and Expert Parallelism for Long Context with GLM-5.3 on MI355X]]></title>
            <link>https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori</link>
            <guid>https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori</guid>
            <pubDate>Wed, 25 Nov 2026 09:00:00 GMT</pubDate>
            <description><![CDATA[AMD MoRI carries RDMA KV transfer and expert parallelism in llm-d, with a long-context case study of amd/GLM-5.3-Quark-MXFP4-AttnFP8 on AMD Instinct™ MI355X GPUs.]]></description>
            <content:encoded><![CDATA[<p>Serving a large mixture-of-experts (MoE) model with llm-d moves two kinds of data between GPUs. With
prefill/decode disaggregation (P/D), the KV cache that prefill computes has to reach the decode GPUs.
With expert parallelism, every MoE layer sends tokens to the GPUs that hold their experts and gathers
the results. We wanted AMD users of llm-d to carry both through the AMD communication library
MoRI (Modular RDMA Interface), straight from stock llm-d and vLLM.</p>
<p>We wired MoRI upstream into the llm-d routing sidecar and
vLLM's KV connector and expert-parallel backend. We then ran <a href="https://huggingface.co/amd/GLM-5.3-Quark-MXFP4-AttnFP8" target="_blank" rel="noopener noreferrer" class=""><code>amd/GLM-5.3-Quark-MXFP4-AttnFP8</code></a>, a MoE model, at 128k–512k
context on AMD Instinct™ MI355X GPUs. The first half of this post covers the stack; the second covers the
case study: where P/D helped and what it cost.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="at-a-glance">At a glance<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#at-a-glance" class="hash-link" aria-label="Direct link to At a glance" title="Direct link to At a glance" translate="no">​</a></h2>
<p>The AMD MoRI path runs on stock upstream llm-d and vLLM. vLLM's MoRI-IO connector carries the KV cache, and its MoRI-EP backend carries expert traffic. The routing sidecar coordinates each P/D request, and llm-d's gateway and Endpoint Picker are unchanged. The case study adds routing and model settings from its recipe.</p>
<ul>
<li class=""><strong>Model:</strong> <code>amd/GLM-5.3-Quark-MXFP4-AttnFP8</code> (MXFP4 experts, FP8 attention) at 128k–512k context on AMD Instinct MI355X GPUs.</li>
<li class=""><strong>Result:</strong> on the focus workload, P/D held ITL p99 more than 4× below colocated serving, at lower throughput per GPU, using the recipe's missing-block READ.</li>
<li class=""><strong>Ready to run:</strong> the llm-d P/D and wide-EP guides with MoRI run in nightly CI on AMD GPUs; the case study's guide and recipe are in <a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#try-it" class="">Try it</a>.</li>
</ul>
<blockquote>
<p><strong>Glossary.</strong></p>
<ul>
<li class=""><strong>P/D, 1P1D, 2P1D:</strong> prefill/decode disaggregation; 1P1D is one prefill and one decode instance,
and 2P1D adds a second prefill instance. Here each instance is one 8-GPU node; an instance can
also span pods (Figure 3b). <strong>Colocated:</strong> prefill and decode share GPUs.</li>
<li class=""><strong>RDMA:</strong> remote direct memory access, which moves data between machines without a CPU copy.</li>
<li class=""><strong>Missing-block READ:</strong> decode reads only the KV blocks absent from its cached history, a recipe
change not yet upstream for this model. <strong>Whole-prompt READ:</strong> decode reads the whole prompt's KV.</li>
<li class=""><strong>Colocated control:</strong> two 4-GPU replicas per node, expert parallel, or tensor parallel where marked
TP, whichever gave more throughput when both were run.</li>
<li class=""><strong>TTFT:</strong> time to first token, reported at p90. <strong>ITL:</strong> inter-token latency, here the gap between
decode steps. With <strong>MTP-3</strong> speculative decoding, a step delivered 2.55–2.58 tokens in the
missing-block P/D runs, so a 150 ms step is about 58 ms per generated token.</li>
</ul>
</blockquote>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="enabling-mori-in-llm-d">Enabling MoRI in llm-d<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#enabling-mori-in-llm-d" class="hash-link" aria-label="Direct link to Enabling MoRI in llm-d" title="Direct link to Enabling MoRI in llm-d" translate="no">​</a></h2>
<p><a href="https://github.com/ROCm/mori" target="_blank" rel="noopener noreferrer" class="">MoRI</a> is an open-source AMD library for moving data directly between GPUs
over RDMA. It gives llm-d one library for both GPU-to-GPU flows in MoE serving: handing the KV cache
from prefill to decode, and exchanging tokens between experts. Figure 1 shows the result (the case
study measures 1P1D and 2P1D), and Figure 2 the software stack underneath.</p>
<p><strong>What we added.</strong></p>
<ul>
<li class=""><strong>vLLM:</strong> the <a href="https://github.com/vllm-project/vllm/pull/29304" target="_blank" rel="noopener noreferrer" class=""><code>MoRIIOConnector</code></a>, which moves the
KV cache over MoRI-IO by READ (decode pulls it) or WRITE (prefill pushes it), and
<a href="https://github.com/vllm-project/vllm/pull/28664" target="_blank" rel="noopener noreferrer" class="">MoRI-EP</a> as the expert all-to-all backend.</li>
<li class=""><strong>llm-d routing sidecar:</strong> READ runs on its standard P/D path;
<a href="https://github.com/llm-d/llm-d-router/pull/1564" target="_blank" rel="noopener noreferrer" class="">opt-in <code>--moriio-*</code> flags</a> add WRITE, sent
serially or in parallel, and support for roles that span pods
(<a href="https://github.com/llm-d/llm-d-router/blob/main/pkg/sidecar/proxy/MORIIO_README.md" target="_blank" rel="noopener noreferrer" class="">README</a>).</li>
<li class=""><strong>Guides and CI:</strong> the llm-d
<a href="https://github.com/llm-d/llm-d/tree/main/guides/pd-disaggregation/modelserver/amd/vllm/moriio" target="_blank" rel="noopener noreferrer" class="">P/D</a>
and <a href="https://github.com/llm-d/llm-d/tree/main/guides/wide-ep/modelserver/amd/vllm" target="_blank" rel="noopener noreferrer" class="">wide-EP</a> guides
deploy MoRI on AMD GPUs, both with WRITE, and run nightly CI
(<a href="https://github.com/llm-d/llm-d/actions/workflows/nightly-e2e-pd-disaggregation-amd-ci-acc-rocm-vllm-moriio.yaml" target="_blank" rel="noopener noreferrer" class="">P/D</a>,
<a href="https://github.com/llm-d/llm-d/actions/workflows/nightly-e2e-wide-ep-amd-ci-acc-rocm-vllm-moriio.yaml" target="_blank" rel="noopener noreferrer" class="">wide-EP</a>).
On AMD, llm-d's nightly runs cover
(<a href="https://github.com/llm-d/llm-d/blob/main/release/README.md#nightly-testing" target="_blank" rel="noopener noreferrer" class="">nightly matrix</a>):
<ul>
<li class="">Optimized baseline on vLLM, SGLang and ATOM</li>
<li class="">P/D disaggregation with MoRI or NIXL</li>
<li class="">Wide expert parallelism with MoRI-EP</li>
<li class="">Tiered prefix cache: CPU and filesystem tiers, native and LMCache</li>
<li class="">Precise prefix-cache and predicted-latency routing</li>
<li class="">Flow control and KEDA autoscaling</li>
</ul>
</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="what-mori-does">What MoRI does<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#what-mori-does" class="hash-link" aria-label="Direct link to What MoRI does" title="Direct link to What MoRI does" translate="no">​</a></h3>
<ul>
<li class=""><strong>MoRI-IO</strong> copies KV blocks between GPUs over RDMA, by READ or WRITE
(<a href="https://rocm.github.io/mori/MORI-IO-GUIDE.html" target="_blank" rel="noopener noreferrer" class="">MORI-IO guide</a>).</li>
<li class=""><strong>MoRI-EP</strong> runs the MoE expert all-to-all over XGMI, the AMD GPU-to-GPU links, inside a node and over
RDMA across nodes (<a href="https://rocm.github.io/mori/MORI-EP-GUIDE.html" target="_blank" rel="noopener noreferrer" class="">MORI-EP guide</a>). In vLLM it is
the all-to-all backend for prefill and decode. Here it stays within each 8-GPU node; the
<a href="https://github.com/llm-d/llm-d/tree/main/guides/wide-ep" target="_blank" rel="noopener noreferrer" class="">wide-EP guide</a> and the
<a href="https://events.linuxfoundation.org/pytorch-conference-north-america/program/schedule-posters/?id=1295891" target="_blank" rel="noopener noreferrer" class="">PyTorch Conference North America 2026 poster</a>
cover the inter-node case.</li>
</ul>
<p>The <a href="https://rocm.github.io/mori/" target="_blank" rel="noopener noreferrer" class="">MoRI documentation</a> and <a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#further-reading" class="">Further reading</a> cover
the rest of MoRI, and the
<a href="https://rocm.docs.amd.com/projects/ai-ecosystem/en/latest/inference/distributed/vllm-mori-recipe.html" target="_blank" rel="noopener noreferrer" class="">vLLM and MoRI recipe for AMD ROCm™ software</a>
covers deployment.</p>
<div style="text-align:center;margin:20px 0">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/long-context-mori/llmd-mori-scale.png" alt="Figure 1. For one or more prefill and decode instances, llm-d's gateway and EPP need no changes; MoRI-IO moves KV, and MoRI-EP carries expert traffic." style="width:100%;height:auto" class="img_ev3q">
  <p style="text-align:center"><em>Figure 1. For one or more prefill and decode instances, llm-d's gateway and EPP need no changes; MoRI-IO moves KV, and MoRI-EP carries expert traffic.</em></p>
</div>
<div style="text-align:center;margin:20px 0">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/long-context-mori/llmd-mori-stack-v.png" alt="Figure 2. MoRI sits under vLLM and serves both paths: MoRI-EP for expert traffic, issued from the GPU through MORI-SHMEM, and MoRI-IO for KV blocks, posted from the host." style="width:100%;height:auto" class="img_ev3q">
  <p style="text-align:center"><em>Figure 2. MoRI sits under vLLM and serves both paths: MoRI-EP for expert traffic, issued from the GPU through MORI-SHMEM, and MoRI-IO for KV blocks, posted from the host.</em></p>
</div>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="where-mori-plugs-into-llm-d">Where MoRI plugs into llm-d<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#where-mori-plugs-into-llm-d" class="hash-link" aria-label="Direct link to Where MoRI plugs into llm-d" title="Direct link to Where MoRI plugs into llm-d" translate="no">​</a></h3>
<p>llm-d's gateway and Endpoint Picker (EPP) need no changes. The EPP's
P/D decider splits a request across prefill and decode when at least 2,048 input tokens are uncached
(the configured threshold). The routing sidecar then runs the two legs. Figure 3 shows two deployment
shapes: one node per role, and roles spanning two pods.</p>
<div style="text-align:center;margin:20px 0">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/long-context-mori/llmd-mori-deploy.png" alt="Figure 3. MoRI-EP stays inside the node when each role fits one node (a), and crosses pods over RDMA when a role spans two (b)." style="width:100%;height:auto" class="img_ev3q">
  <p style="text-align:center"><em>Figure 3. MoRI-EP stays inside the node when each role fits one node (a), and crosses pods over RDMA when a role spans two (b).</em></p>
</div>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="a-read-request-step-by-step">A READ request, step by step<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#a-read-request-step-by-step" class="hash-link" aria-label="Direct link to A READ request, step by step" title="Direct link to A READ request, step by step" translate="no">​</a></h3>
<p>The case study uses MoRI-IO READ; Figure 4 follows one request.</p>
<div style="text-align:center;margin:20px 0">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/long-context-mori/call-flow.png" alt="Figure 4. Decode pulls prefill's KV with one RDMA READ (step 9); the other steps are small control messages, and the handshake runs once per prefill engine." style="width:100%;height:auto" class="img_ev3q">
  <p style="text-align:center"><em>Figure 4. Decode pulls prefill's KV with one RDMA READ (step 9); the other steps are small control messages, and the handshake runs once per prefill engine.</em></p>
</div>
<p>The two legs run in order, so decode fetches KV right after prefill finishes. READ needs no
<code>--moriio-*</code> sidecar flags; the case-study guide sets <code>read_mode=true</code> on vLLM's connector. Because
decode reads from whichever rank prefill names, a second prefill instance (2P1D) needs no extra routing
state. Most P/D runs used missing-block READ (see the glossary), so a transfer scales with a turn's new
tokens, not its context: NIC counters measured about 2.8 GB per +30k turn, which takes under 60 ms (estimated) at the ~390 Gb/s per-NIC bandwidth measured before the runs.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="case-study-long-context-glm-53-on-mi355x">Case study: long-context GLM-5.3 on MI355X<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#case-study-long-context-glm-53-on-mi355x" class="hash-link" aria-label="Direct link to Case study: long-context GLM-5.3 on MI355X" title="Direct link to Case study: long-context GLM-5.3 on MI355X" translate="no">​</a></h2>
<p>With the path in place, we asked whether P/D over MoRI-IO helps long agentic sessions on a large MoE
model, and at what cost. Such sessions hold hundreds of thousands of tokens of context and keep adding
to it. When one session sends a new 30k-token turn to a colocated server, the other streams on that
replica slow from under 50 ms to 300–400 ms between chunks until that prefill finishes. P/D prefills
long new prompts on GPUs that aren't streaming tokens.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-model">The model<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#the-model" class="hash-link" aria-label="Direct link to The model" title="Direct link to The model" translate="no">​</a></h3>
<p><a href="https://huggingface.co/amd/GLM-5.3-Quark-MXFP4-AttnFP8" target="_blank" rel="noopener noreferrer" class=""><code>amd/GLM-5.3-Quark-MXFP4-AttnFP8</code></a>
is quantized with AMD Quark from <a href="https://huggingface.co/zai-org/GLM-5.3" target="_blank" rel="noopener noreferrer" class=""><code>zai-org/GLM-5.3</code></a>, with
MXFP4 (4-bit microscaling) routed and shared experts, FP8 per-block attention, and the embeddings,
<code>lm_head</code>, MTP projection and router gate in their original precision. MI355X matrix cores support MXFP4 directly; AMD
<a href="https://www.amd.com/en/products/accelerators/instinct/mi350/mi355x.html" target="_blank" rel="noopener noreferrer" class="">lists 10.1 PFLOPS of peak MXFP4 matrix throughput</a>.
The checkpoint is 409.5 GB, 54% of the 755.6 GB FP8 <code>zai-org/GLM-5.3</code> release. Its
<a href="https://huggingface.co/amd/GLM-5.3-Quark-MXFP4-AttnFP8" target="_blank" rel="noopener noreferrer" class="">model card</a> reports GSM8K of 91.43 versus
91.96 for <code>zai-org/GLM-5.3</code> and 99–101% of the base scores on six other benchmarks.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="setup-and-workloads">Setup and workloads<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#setup-and-workloads" class="hash-link" aria-label="Direct link to Setup and workloads" title="Direct link to Setup and workloads" translate="no">​</a></h3>
<p>This case study is an initial deployment of the AMD MoRI path with llm-d, run to study P/D and
colocated serving on long-context workloads. The results are from first, untuned runs of one model on
one hardware and software configuration, and are a starting point rather than a tuned benchmark.</p>
<p>Each node has eight AMD Instinct MI355X GPUs and one RDMA NIC per GPU. 1P1D uses two
nodes (one prefill, one decode), each role running DP8/EP8/TP1, and 2P1D, used for cold prompts only,
uses three (two prefill, one decode). In this setup, an Envoy Lua filter at the gateway pins each
session to one data-parallel rank with a session-hash header, so its KV stays cached. Each P/D layout is compared with colocated nodes at equal
sessions per GPU; Appendix B marks node counts that differ from two. Beyond layout, the arms
differ in prefill batching (16,384-token P/D batches versus 2,048-token colocated chunks), routing
(session-hash rank pinning versus the EPP's prefix-affinity and load scoring) and replica size (8-GPU
roles versus two 4-GPU replicas per node). Each deployment or node ran once, untuned; ranges span them.</p>
<p>Warm workloads are named by cached history plus new tokens per turn: "256k +30k" means about 256k
cached tokens and 30k new ones. Cold prompts have nothing cached. Every request generates 1,000 tokens.
The targets are an ITL p99 of 150 ms and a TTFT p90 that scales with context: 12.8 s at 128k, 25.6 s at
256k and 51.2 s at 512k. Appendix A gives the full method.</p>























































<table><thead><tr><th>Workload</th><th style="text-align:right">Sessions: P/D deployment / colocated node</th><th>What it models</th></tr></thead><tbody><tr><td>128k +10k†</td><td style="text-align:right">32 / 16</td><td>Coding agent, small tool outputs</td></tr><tr><td>128k +30k</td><td style="text-align:right">32 / 16</td><td>Coding agent reading new files</td></tr><tr><td>128k +70k</td><td style="text-align:right">16 / 8</td><td>Copilot adding a large document</td></tr><tr><td><strong>256k +30k</strong> (focus, recipe default)</td><td style="text-align:right"><strong>16 / 8</strong></td><td><strong>Long coding-agent session</strong></td></tr><tr><td>256k +70k</td><td style="text-align:right">16 / 8</td><td>Document or repository analysis</td></tr><tr><td>512k +30k</td><td style="text-align:right">8 / 4</td><td>Very long agent session</td></tr><tr><td>Cold 256k, 2P1D</td><td style="text-align:right">12 / 4</td><td>First request on a large repository</td></tr><tr><td>Cold 512k, 1P1D</td><td style="text-align:right">4 / 2</td><td>First request on a very large corpus</td></tr><tr><td>Cold 512k, 2P1D</td><td style="text-align:right">6 / 2</td><td>First request on a very large corpus</td></tr></tbody></table>
<p>† Uses whole-prompt READ (Appendix B).</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="results">Results<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#results" class="hash-link" aria-label="Direct link to Results" title="Direct link to Results" translate="no">​</a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="decode-step-latency-under-long-prefills">Decode-step latency under long prefills<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#decode-step-latency-under-long-prefills" class="hash-link" aria-label="Direct link to Decode-step latency under long prefills" title="Direct link to Decode-step latency under long prefills" translate="no">​</a></h3>
<p><strong>P/D kept decode steps mostly under the 150 ms target during long prefills, at 66–92% of the colocated
throughput per GPU.</strong></p>
<p>In colocated serving, a new 30k-token turn is prefilled in chunks that share engine steps with
decode. Expert parallelism makes the replica's four GPUs wait for each other, so every stream on that
replica slows until the prefill finishes. Figure 5 shows one round of 256k +30k as clients see it. The panels share one time axis; the P/D round
serves twice as many requests (48 versus 24) and runs longer.</p>
<div style="text-align:center;margin:20px 0">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/long-context-mori/f1-prefill-stalls.png" alt="Figure 5. Colocated streams stall at 300–400 ms for about 15 s during another session's prefill, while P/D streams stay near 45 ms, with brief spikes up to about 640 ms. One round of 256k +30k." style="width:100%;height:auto" class="img_ev3q">
  <p style="text-align:center"><em>Figure 5. Colocated streams stall at 300–400 ms for about 15 s during another session's prefill, while P/D streams stay near 45 ms, with brief spikes up to about 640 ms. One round of 256k +30k.</em></p>
</div>
<p>The slowest 1 in 100 steps (ITL p99) took 71–73 ms with P/D versus 316–322 ms colocated (Figure 6), and steps
slower than 150 ms fell from about 1 in 75 to fewer than 1 in 1,000.</p>
<div style="text-align:center;margin:20px 0">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/long-context-mori/pair-f3-f2.png" alt="Figure 6. P/D matches colocated on typical decode steps and cuts the slowest 1 in 100 from 316–322 ms to 71–73 ms (256k +30k). Outlined bars: ≤50 ms." style="width:100%;height:auto" class="img_ev3q">
  <p style="text-align:center"><em>Figure 6. P/D matches colocated on typical decode steps and cuts the slowest 1 in 100 from 316–322 ms to 71–73 ms (256k +30k). Outlined bars: ≤50 ms.</em></p>
</div>
<p>Figure 7 omits 128k +10k, which used upstream whole-prompt READ; there, P/D's ITL p99 was 311 ms
(Appendix B). Missing-block READ cut 128k +30k ITL p99 from 437 to 129 ms, 256k +30k p99.9 from about 940 to
145–149 ms (though p99 rose from ≤50 to 71–73 ms), and 256k +30k READ traffic per request from 24.1 to
3.6 GB.</p>
<p>In Figure 7, P/D held ITL p99 under 130 ms on warm workloads and at or below 50 ms on cold prompts; on
256k +30k it delivered 31.8 versus 37.6 tok/s/GPU. Colocated serving also met 150 ms at 512k +30k, where
each node runs 4 sessions instead of 8 at 256k.</p>
<div style="text-align:center;margin:20px 0">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/long-context-mori/pair-f4-f5.png" alt="Figure 7. P/D keeps the slowest decode steps under 150 ms on every workload shown (a); colocated reaches the first token sooner (b). Green: meets target; outlined: ≤50 ms; TP: tensor-parallel colocated." style="width:100%;height:auto" class="img_ev3q">
  <p style="text-align:center"><em>Figure 7. P/D keeps the slowest decode steps under 150 ms on every workload shown (a); colocated reaches the first token sooner (b). Green: meets target; outlined: ≤50 ms; TP: tensor-parallel colocated.</em></p>
</div>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="time-to-first-token">Time to first token<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#time-to-first-token" class="hash-link" aria-label="Direct link to Time to first token" title="Direct link to Time to first token" translate="no">​</a></h3>
<p><strong>Colocated serving returned the first token 1.5–2.3× sooner on the warm workloads in Figure 7.
P/D dedicates half (1P1D) or two-thirds (2P1D) of its GPUs to
prefill.</strong></p>
<p>On 256k +30k, TTFT p90 rose from 6.2 s to 14.0 s, within its 25.6 s target. P/D met its TTFT target on
256k +30k and 512k +30k and missed it on the rest of Figure 7; colocated also missed on cold prompts
(Figure 7b). These targets scale with retained context. Against a new-token target, P/D would not meet
both targets on any workload (Appendix A).</p>
<ul>
<li class=""><strong>By design:</strong> at equal sessions per GPU, each 1P1D prefill rank serves twice as many sessions as a
colocated rank.</li>
<li class=""><strong>Measured:</strong> in whole-prompt READ runs of the same workloads, average prefill queue time was under
2 ms at 256k +30k and 512k +30k, and 1.4–1.7 s at 128k +30k and the +70k workloads.</li>
<li class=""><strong>Cold prompts</strong> carry no session ID, so each lands on a random rank; on cold 512k some ranks
received several and waited for KV capacity.</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="accuracy-checks">Accuracy checks<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#accuracy-checks" class="hash-link" aria-label="Direct link to Accuracy checks" title="Direct link to Accuracy checks" translate="no">​</a></h3>
<p>Before the performance runs we checked the P/D path, with every request sent through KV transfer,
using GSM8K (91.28%; the model card's 91.43 used different settings) and needle-in-a-haystack retrieval
at 64k–512k tokens, which succeeded on 94% of single-turn and multi-turn probes.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="conclusion">Conclusion<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#conclusion" class="hash-link" aria-label="Direct link to Conclusion" title="Direct link to Conclusion" translate="no">​</a></h2>
<p>For a large MoE model like <code>amd/GLM-5.3-Quark-MXFP4-AttnFP8</code> serving long agentic sessions (128k–512k tokens of
history, 10k–70k new tokens per turn) on 8-GPU MI355X nodes, the choice between P/D and colocated
serving depends on which target matters most. This guidance applies to comparable model sizes, context
lengths and turn sizes.</p>
<ul>
<li class=""><strong>Choose colocated serving</strong> when throughput per GPU or time to first token matters most, or when the
inter-token latency target is relaxed (a few hundred milliseconds). Smaller prefill chunks bring its
ITL tail down further, to about 190 ms with 1,024-token chunks at a small TTFT cost (Appendix B).</li>
<li class=""><strong>Choose P/D</strong> when sessions keep adding large turns and streaming must stay smooth under a tight
inter-token target, such as 150 ms. With the context-scaled TTFT target, only P/D met both targets at
256k +30k, and both layouts did at 512k +30k (Figure 7). For steady decode (Figures 5–6), P/D gives
up some throughput per GPU and some first-token time. Each session's KV must also fit the decode
GPUs' smaller KV memory (Appendix C).</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="try-it">Try it<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#try-it" class="hash-link" aria-label="Direct link to Try it" title="Direct link to Try it" translate="no">​</a></h2>
<p>The llm-d guide deploys the case study's P/D layout and router values. The ROCm MAD recipe holds
every layout's serving command and environment, benchmarks, accuracy checks and reference results.
Build the engine image from the recipe's Dockerfile and set the guide's image entry to it.</p>
<ul>
<li class="">Guide: <a href="https://github.com/llm-d/llm-d/pull/3034" target="_blank" rel="noopener noreferrer" class="">llm-d: GLM-5.3 Quark MXFP4 on AMD MI355X with MoRI-IO</a></li>
<li class="">Recipe: <a href="https://github.com/ROCm/MAD/pull/304" target="_blank" rel="noopener noreferrer" class="">ROCm MAD: GLM-5.3-Quark-MXFP4-AttnFP8 P/D image and long-context recipe</a></li>
<li class="">Missing-block READ: <a href="https://github.com/ROCm/MAD/pull/304/files#diff-7b9ce3d2211ba032eaa0ac4065bac373827b0938f93b7f57df58385cd3bb853b" target="_blank" rel="noopener noreferrer" class="">vLLM patch in the recipe</a></li>
<li class="">Model checkpoint: <a href="https://huggingface.co/amd/GLM-5.3-Quark-MXFP4-AttnFP8" target="_blank" rel="noopener noreferrer" class=""><code>amd/GLM-5.3-Quark-MXFP4-AttnFP8</code></a></li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="whats-next">What's next<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#whats-next" class="hash-link" aria-label="Direct link to What's next" title="Direct link to What's next" translate="no">​</a></h2>
<ul>
<li class=""><strong>Configuration screening:</strong> screen larger P/D configurations with ROCm InferaSim
(<a href="https://rocm.blogs.amd.com/software-tools-optimization/inferasim/README.html" target="_blank" rel="noopener noreferrer" class="">blog</a>, <a href="https://arxiv.org/abs/2611.04032" target="_blank" rel="noopener noreferrer" class="">paper</a>) before spending GPU time, such as 2P1D and other prefill/decode
mixes on warm workloads and wide-EP across nodes. Measure MoRI-IO WRITE, which the upstream guides
run, on these workloads.</li>
<li class=""><strong>Engines and models:</strong> SGLang and ATOM, the AMD inference engine, with MoRI inside llm-d; other
long-context models, with tool calls and context up to 1M tokens.</li>
<li class=""><strong>Routing and measurement:</strong> session-aware rank selection in the EPP, alternative cold-request
placement, and a per-request TTFT breakdown including KV-transfer time.</li>
<li class=""><strong>Tuning and capacity:</strong> kernel, batching and parallelism tuning; larger KV budgets, KV offload and
FP8 KV for more 512k sessions per GPU.</li>
</ul>
<p>Try the guide and recipe in <a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#try-it" class="">Try it</a> and tell us what you see on other models.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="further-reading">Further reading<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#further-reading" class="hash-link" aria-label="Direct link to Further reading" title="Direct link to Further reading" translate="no">​</a></h2>
<ul>
<li class="">MoRI: <a href="https://rocm.github.io/mori/MORI-SHMEM-GUIDE.html" target="_blank" rel="noopener noreferrer" class="">MORI-SHMEM guide</a>, <a href="https://rocm.github.io/mori/MORI-IO-BENCHMARK.html" target="_blank" rel="noopener noreferrer" class="">MORI-IO benchmarks</a>, <a href="https://rocm.github.io/mori/MORI-EP-BENCHMARK.html" target="_blank" rel="noopener noreferrer" class="">MORI-EP benchmarks</a>.</li>
<li class="">AMD ROCm blogs: <a href="https://rocm.blogs.amd.com/software-tools-optimization/wide-ep-deepseek/README.html" target="_blank" rel="noopener noreferrer" class="">DeepSeek on MI300X</a>, <a href="https://rocm.blogs.amd.com/software-tools-optimization/di-glm-wideep/README.html" target="_blank" rel="noopener noreferrer" class="">GLM-5.1-FP8 on 64 MI300X GPUs</a>, <a href="https://rocm.blogs.amd.com/software-tools-optimization/di-kimi-k3-mxfp4/README.html" target="_blank" rel="noopener noreferrer" class="">Kimi-K3 MXFP4 on MI300X and MI325X</a>.</li>
<li class="">vLLM: <a href="https://vllm.ai/blog/2026-04-07-moriio-kv-connector" target="_blank" rel="noopener noreferrer" class="">MoRI-IO KV connector blog</a>, <a href="https://docs.vllm.ai/en/latest/features/disagg_prefill.html" target="_blank" rel="noopener noreferrer" class="">disaggregated prefilling</a>, <a href="https://github.com/vllm-project/vllm/blob/main/docs/features/moriio_connector_usage.md" target="_blank" rel="noopener noreferrer" class="">MoRI-IO connector guide</a>, <a href="https://github.com/vllm-project/vllm/blob/main/docs/serving/expert_parallel_deployment.md" target="_blank" rel="noopener noreferrer" class="">expert-parallel deployment</a>.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="acknowledgements">Acknowledgements<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#acknowledgements" class="hash-link" aria-label="Direct link to Acknowledgements" title="Direct link to Acknowledgements" translate="no">​</a></h2>
<p>We thank the AMD vLLM, AITER, MoRI, SGLang and ATOM teams for their support.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="join-the-llm-d-community">Join the llm-d community<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#join-the-llm-d-community" class="hash-link" aria-label="Direct link to Join the llm-d community" title="Direct link to Join the llm-d community" translate="no">​</a></h2>
<p>If you are working on long-context serving, come build with us:</p>
<ul>
<li class=""><a href="https://llm-d.ai/slack" target="_blank" rel="noopener noreferrer" class="">Join the llm-d Slack</a></li>
<li class=""><a href="https://github.com/llm-d" target="_blank" rel="noopener noreferrer" class="">Explore llm-d on GitHub</a></li>
<li class=""><a href="https://llm-d.ai/community" target="_blank" rel="noopener noreferrer" class="">Join the public community call</a></li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="appendix-amdglm-53-quark-mxfp4-attnfp8-case-study-details">Appendix: amd/GLM-5.3-Quark-MXFP4-AttnFP8 case-study details<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#appendix-amdglm-53-quark-mxfp4-attnfp8-case-study-details" class="hash-link" aria-label="Direct link to Appendix: amd/GLM-5.3-Quark-MXFP4-AttnFP8 case-study details" title="Direct link to Appendix: amd/GLM-5.3-Quark-MXFP4-AttnFP8 case-study details" translate="no">​</a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="a-methodology">A. Methodology<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#a-methodology" class="hash-link" aria-label="Direct link to A. Methodology" title="Direct link to A. Methodology" translate="no">​</a></h3>
<ul>
<li class=""><strong>Sessions and rounds.</strong> A session is one conversation with its own session ID. Each run has six
rounds. In every round, each session sends a warm-up turn with its retained context, prefilled from
scratch only in round 1, then two measured turns that each add the workload's new tokens. Cold
workloads send one uncached prompt per session. The focus workload, 256k +30k, was fixed before the
runs as the recipe and guide default.</li>
<li class=""><strong>What was measured.</strong> Engine ITL comes from vLLM's step-latency histogram over rounds 2–6, on the
decode instance for P/D. Client ITL (Figure 5) is the gap between streamed chunks. TTFT p90 is
client-measured over the measured turns, and tok/s/GPU is output throughput while all sessions are
active.</li>
<li class=""><strong>Targets.</strong> ITL p99 must be at most 150 ms. The TTFT p90 target is max(10 s, retained context ÷ 10k
tokens/s), using the prompt length for cold prompts. A layout meets its targets only if every
deployment or node in it does. Scored against new tokens instead, every warm target becomes 10 s,
and P/D would miss on 256k +30k (14.0 s) and 512k +30k (12.3 s), so it would not meet both
targets on any workload; colocated would still meet both on 512k +30k (8.4–8.5 s).</li>
<li class=""><strong>Histogram resolution.</strong> Engine percentiles are interpolated between bucket edges at 50, 75, 100,
150, 200, 300 and 400 ms, so values such as 71–73 ms are approximate. "≤50 ms" or "≤300 ms" means
the percentile falls in the bucket ending there. Because 150 ms is an edge, pass/fail verdicts are
exact.</li>
<li class=""><strong>Why colocated p99 jumps.</strong> Colocated decode steps are either short or stalled 300–400 ms behind a
prefill. p99 therefore reads ≤50 ms when stalls are under 1% of steps and jumps to the stall range, about 270 ms or more, above that;
the 256k +30k nodes had 1.3–1.4%. That is why some colocated ranges span ≤50–379 ms.</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="b-full-results">B. Full results<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#b-full-results" class="hash-link" aria-label="Direct link to B. Full results" title="Direct link to B. Full results" translate="no">​</a></h3>
<p>The colocated control is expert parallel unless marked TP.</p>































































































<table><thead><tr><th>Workload</th><th style="text-align:right">tok/s/GPU: P/D / colocated</th><th style="text-align:right">Ratio</th><th style="text-align:right">TTFT p90 (s): P/D / colocated</th><th style="text-align:right">P/D ITL p99 (ms)</th><th style="text-align:right">Colocated ITL p99 (ms)</th><th>Meets both targets: P/D / colocated</th></tr></thead><tbody><tr><td>128k +10k (whole-prompt READ)</td><td style="text-align:right">70.4 / 92.5 TP</td><td style="text-align:right">0.76×</td><td style="text-align:right">8.9 / 7.5</td><td style="text-align:right">311</td><td style="text-align:right">273–274</td><td>No (ITL) / No (ITL)</td></tr><tr><td>128k +30k</td><td style="text-align:right">55.0 / 60.7 (one node)</td><td style="text-align:right">0.91×</td><td style="text-align:right">19.9 / 9.8</td><td style="text-align:right">129</td><td style="text-align:right">358</td><td>No (TTFT) / No (ITL)</td></tr><tr><td>128k +70k</td><td style="text-align:right">23.9 / 29.6</td><td style="text-align:right">0.81×</td><td style="text-align:right">24.0 / 12.4</td><td style="text-align:right">≤50</td><td style="text-align:right">345–354</td><td>No (TTFT) / No (ITL)</td></tr><tr><td><strong>256k +30k</strong></td><td style="text-align:right"><strong>31.8 / 37.6</strong></td><td style="text-align:right"><strong>0.85×</strong></td><td style="text-align:right"><strong>14.0–14.1 / 6.2</strong></td><td style="text-align:right"><strong>71–73</strong></td><td style="text-align:right"><strong>316–322</strong></td><td><strong>Yes / No (ITL)</strong></td></tr><tr><td>256k +70k</td><td style="text-align:right">21.1 / 29.0</td><td style="text-align:right">0.73×</td><td style="text-align:right">27.6 / 14.1–14.2</td><td style="text-align:right">65</td><td style="text-align:right">314–327</td><td>No (TTFT) / No (ITL)</td></tr><tr><td>512k +30k</td><td style="text-align:right">16.6 / 18.1</td><td style="text-align:right">0.92×</td><td style="text-align:right">12.3 / 8.4–8.5</td><td style="text-align:right">≤50</td><td style="text-align:right">≤50</td><td>Yes / Yes</td></tr><tr><td>Cold 256k, 2P1D</td><td style="text-align:right">5.5 / 6.7 TP (one node)</td><td style="text-align:right">0.82×</td><td style="text-align:right">91.8 / 51.3</td><td style="text-align:right">≤50</td><td style="text-align:right">291</td><td>No (TTFT) / No (TTFT, ITL)</td></tr><tr><td>Cold 512k, 1P1D</td><td style="text-align:right">1.61 / 2.43</td><td style="text-align:right">0.66×</td><td style="text-align:right">172.4 / 89.0–90.5</td><td style="text-align:right">≤50</td><td style="text-align:right">340–379</td><td>No (TTFT) / No (TTFT, ITL)</td></tr><tr><td>Cold 512k, 2P1D</td><td style="text-align:right">1.65 / 2.44 (three nodes)</td><td style="text-align:right">0.68×</td><td style="text-align:right">146.7 / 89.0–90.5</td><td style="text-align:right">≤50</td><td style="text-align:right">≤50–379</td><td>No (TTFT) / No (TTFT, ITL)</td></tr></tbody></table>
<ul>
<li class=""><strong>Smaller colocated chunks.</strong> On 256k +30k, 1,024-token chunks gave ITL p99 of about 190 ms, TTFT p90
of 7.2 s and 37.7 tok/s/GPU, within a 250 ms target, in one-node runs where a 2,048-token run matched
the control.</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="c-configuration-memory-and-capacity">C. Configuration, memory and capacity<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#c-configuration-memory-and-capacity" class="hash-link" aria-label="Direct link to C. Configuration, memory and capacity" title="Direct link to C. Configuration, memory and capacity" translate="no">​</a></h3>
<p>The recipe and guide in <a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#try-it" class="">Try it</a> hold the full configuration; these settings explain the results:</p>






























<table><thead><tr><th></th><th>P/D (DP8/EP8/TP1 per 8-GPU role)</th><th>Colocated control (two 4-GPU replicas per node, DP4/EP4/TP1 or TP4)</th></tr></thead><tbody><tr><td>Prefill batching</td><td>up to 16,384 tokens per step, eager; decode up to 256 tokens per step</td><td>2,048-token chunks</td></tr><tr><td>KV budget per GPU (GB = 10⁹ bytes)</td><td>80 GB, or 851,856 tokens (2P1D decode: 55 GB, or 585,648)</td><td>100 GB (EP), 149 GB (TP)</td></tr><tr><td>Rest of 288 GB per GPU</td><td>about 66 GB weights and 17 GB MoRI-EP heap; about 80 GB less free memory after registering the KV cache for RDMA READ, per peer instance; about 45 GB activations and runtime</td><td>about 133 GB at load, MoRI-EP heap included (EP), plus activations and runtime; no registration</td></tr><tr><td>Routing</td><td>P/D decider and session-pinned ranks (see <a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#setup-and-workloads" class="">Setup</a>)</td><td>per-rank endpoints, prefix-affinity and load scoring</td></tr></tbody></table>
<p>The P/D budget is smaller because registering the KV cache for RDMA READ reduced the driver-reported free GPU memory by about the KV size, per peer instance, with no matching allocation in vLLM; the 2P1D decode instance registers once per prefill instance. Each resident token takes 93,912 bytes per GPU (BF16 compressed MLA state in 79 layers plus FP8 indexer keys in 22). Sized by peak footprint (last measured turn plus 1,000 output tokens), an 80 GB decode GPU holds 4 sessions at 128k +30k, 2 at 256k +30k and 1 at 512k +30k: the Setup table's 32, 16 and 8 per decode instance.</p>
<p><strong>Prefix cap.</strong> The EPP matches at most 131,072 prefix tokens, so requests over 133,120 tokens, including the 256k and 512k warm-up turns, are disaggregated even when fully cached.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="disclaimer">Disclaimer<a href="https://llm-d.ai/blog/serving-long-context-workloads-with-llm-d-and-mori#disclaimer" class="hash-link" aria-label="Direct link to Disclaimer" title="Direct link to Disclaimer" translate="no">​</a></h2>
<div class="disclaimer">
<p>DISCLAIMER: The information contained herein is for informational purposes only and is subject to change without notice. While every precaution has been taken in the preparation of this document, it may contain technical inaccuracies, omissions and typographical errors, and AMD is under no obligation to update or otherwise correct this information. Advanced Micro Devices, Inc. makes no representations or warranties with respect to the accuracy or completeness of the contents of this document, and assumes no liability of any kind, including the implied warranties of noninfringement, merchantability or fitness for particular purposes, with respect to the operation or use of AMD hardware, software or other products described herein. No license, including implied or arising by estoppel, to any intellectual property rights is granted by this document. Terms and limitations applicable to the purchase or use of AMD products are set forth in a signed agreement between the parties or in AMD's Standard Terms and Conditions of Sale. GD-18u.</p>
<p>© 2026 Advanced Micro Devices, Inc. All rights reserved. AMD, the AMD Arrow logo, AMD Instinct, ROCm and combinations thereof are trademarks of Advanced Micro Devices, Inc. Other product names used in this publication are for identification purposes only and may be trademarks of their respective owners. Certain AMD technologies may require third-party enablement or activation. Supported features may vary by operating system. Please confirm with the system manufacturer for specific features. No technology or product can be completely secure.</p>
</div>]]></content:encoded>
            <author>shiksha.patel@amd.com (Shiksha Patel)</author>
            <author>ravi.gupta@amd.com (Ravi Gupta)</author>
            <author>Vincent.Cave@amd.com (Vincent Cave)</author>
            <author>Anshu.Raina@amd.com (Anshu Raina)</author>
            <category>blog posts</category>
            <category>Inference</category>
            <category>Agentic Inference</category>
            <category>Long Context</category>
            <category>Large Models</category>
            <category>KV Cache</category>
            <category>Disaggregation</category>
            <category>vLLM</category>
            <category>MoRI</category>
        </item>
        <item>
            <title><![CDATA[Bringing First-Class SGLang Serving to llm-d]]></title>
            <link>https://llm-d.ai/blog/serving-glm-5-2-sglang-tiered-kv-cache-on-llm-d</link>
            <guid>https://llm-d.ai/blog/serving-glm-5-2-sglang-tiered-kv-cache-on-llm-d</guid>
            <pubDate>Mon, 23 Nov 2026 09:00:00 GMT</pubDate>
            <description><![CDATA[How the llm-d and SGLang communities brought first-class Kubernetes-native SGLang Wide-EP serving to llm-d, and how HiCache L2 host RAM and Shared L3 storage perform across single- and multi-replica H200 deployments.]]></description>
            <content:encoded><![CDATA[<p>In <a class="" href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d">Serving GLM-5.2 for Agentic Workloads on llm-d</a>, we showed how <code>llm-d</code> serves long-context coding agents on NVIDIA H200 GPUs with vLLM—combining disaggregated prefill and decode pools, wide expert parallelism, prefix- and load-aware routing, and tiered KV caching. Since then, contributors from the <code>llm-d</code> and <a href="https://github.com/sgl-project/sglang" target="_blank" rel="noopener noreferrer" class="">SGLang</a> communities have made <strong>SGLang</strong> a first-class, Kubernetes-native inference engine in <code>llm-d</code>'s <a href="https://github.com/llm-d/llm-d/tree/main/guides/models/glm-5-2" target="_blank" rel="noopener noreferrer" class="">GLM-5.2 well-lit path</a>, the project's tested reference deployment. We also measured SGLang's multi-tier KV cache on single-replica and multi-replica clusters. This post tells that story in three parts:</p>
<ol>
<li class=""><strong>Engine-agnostic <code>llm-d</code> architecture:</strong> how <code>llm-d</code> decouples Kubernetes workload orchestration, prefix-affinity routing, and disaggregated serving from individual model servers so vLLM and SGLang share a common operational model.</li>
<li class=""><strong>First-class SGLang integration:</strong> how the SGLang and <code>llm-d</code> communities adapted SGLang's Wide-EP runtime to work natively with <code>llm-d</code>'s Kubernetes routing and disaggregated serving.</li>
<li class=""><strong>Tiered KV-cache offloading:</strong> how pairing SGLang's hierarchical KV cache with <code>llm-d</code>'s prefix-aware routing and Kubernetes failover keeps long agent sessions cached across host RAM and shared storage—surviving high concurrency, pod evictions, and cold restarts.</li>
</ol>
<details class="details_lb9f alert alert--info details_b_Ee alert alert--success" data-collapsed="true"><summary><strong>TL;DR — What We Enabled and What Operators Can Expect</strong></summary><div><div class="collapsibleContent_i85q"><ul>
<li class="">
<p><strong>One <code>llm-d</code> platform across engines:</strong> <code>llm-d</code> users can choose <strong>SGLang</strong> as their serving engine backend alongside vLLM. By swapping only the engine-specific deployment overlay and router configuration, SGLang runs on the same <code>DisaggregatedSet</code> orchestration, per-rank <code>InferencePool</code> discovery, prefix-cache-aware routing, and verification workflow.</p>
</li>
<li class="">
<p><strong>Kubernetes-native SGLang Wide-EP:</strong> In Wide-EP deployments, each attention data-parallel (<code>DP</code>) rank holds its own KV cache while sharing expert weights across GPUs. To let <code>llm-d</code> route requests to the rank holding a warm prefix, we worked with the SGLang community so every DP rank acts as an independent, routable, and observable Kubernetes endpoint—even across multi-node prefill and decode pools.</p>
</li>
<li class="">
<p><strong>Host RAM (<code>L2</code>) eliminates the <code>L1</code> thrashing cliff:</strong> On a 16-GPU <code>1P1D</code> deployment, offloading evicted KV blocks to host RAM keeps cache hit rates at <code>85%–95%</code>, raises concurrency-<code>128</code> output <strong><code>3.94x</code></strong> from <code>319</code> to <code>1,257 tok/s</code>, and cuts median TTFT from <code>174.2 s</code> to <code>20.1 s</code>.</p>
</li>
<li class="">
<p><strong>Multi-replica scale-out and <code>Shared L3</code> resilience:</strong> Scaling to <code>32</code> H200 GPUs across two prefill replicas and a 2-node decode pool cuts concurrency-<code>128</code> median TTFT <strong><code>5.9x</code></strong> from <code>20.1 s</code> to <code>3.43 s</code> at <code>1,903 tok/s</code> output. Adding <code>Shared L3</code> restores evicted sessions on the surviving replica during live pod failover—loading <code>1.08M</code> tokens at a <strong><code>99.94%</code> hit rate</strong> and cutting survivor queue recovery time in half—and cuts cold-replica recovery TTFT by <strong><code>57%</code></strong> from <code>38.8 s</code> to <code>16.8 s</code>.</p>
</li>
</ul></div></div></details>
<figure class="glm-figure glm-figure--wide"><img src="https://llm-d.ai/img/blogs/glm52-sglang-tiered-kv/topology-tiered-architecture.png" alt="Engine-agnostic llm-d architecture with Kubernetes-native SGLang Wide-EP and Shared L3"><figcaption><p><strong>Figure 1:</strong> Engine-agnostic <code>llm-d</code> architecture with Kubernetes-native SGLang Wide-EP and Shared L3.</p></figcaption></figure>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="1-llm-d-architecture-and-engine-agnostic-design">1. <code>llm-d</code> Architecture and Engine-Agnostic Design<a href="https://llm-d.ai/blog/serving-glm-5-2-sglang-tiered-kv-cache-on-llm-d#1-llm-d-architecture-and-engine-agnostic-design" class="hash-link" aria-label="Direct link to 1-llm-d-architecture-and-engine-agnostic-design" title="Direct link to 1-llm-d-architecture-and-engine-agnostic-design" translate="no">​</a></h2>
<p>A central design goal of <code>llm-d</code> is to give platform teams a unified Kubernetes control and routing layer regardless of which inference engine runs inside the serving containers. Rather than maintaining separate gateways, autoscalers, or cache-routing stacks per engine, <code>llm-d</code> separates cluster-level serving primitives from engine-specific execution, as shown in Figure 1:</p>
<ul>
<li class=""><strong>Declarative disaggregated orchestration:</strong> Multi-node prefill and decode pools run as native Kubernetes workloads through <code>DisaggregatedSet</code>, with coordinated gang scheduling, rolling updates, and Dynamic Resource Allocation for GPUs and RDMA NICs. Scaling from a single-replica <code>16</code>-GPU deployment to multi-replica <code>32</code>- or <code>64</code>-GPU Wide-EP pools uses the same declarative overlays and operational lifecycle across engines.</li>
<li class=""><strong>Per-DP-rank <code>InferencePool</code> endpoint discovery:</strong> Rather than exposing a multi-GPU pod as one aggregated endpoint, <code>llm-d</code> registers each attention-DP rank as its own <code>InferencePool</code> endpoint, following the design from the <a class="" href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#fitting-repository-scale-sessions-in-memory">earlier GLM-5.2 post</a>. This lets the router see and target each GPU's separate KV cache directly.</li>
<li class=""><strong>Pluggable <code>Endpoint Picker</code> (<code>EPP</code>) routing pipeline:</strong> Fronted by Envoy and the Kubernetes Gateway API, the <code>EPP</code> inference router parses each request and tracks, per rank, which prefixes are cached and how many tokens are in flight. It selects the prefill rank holding the warm prefix and the least-loaded decode rank, while the <code>routing-proxy</code> sidecar on the decode pod runs the prefill-to-decode handshake and dispatches both stages.</li>
</ul>
<p>Because <code>llm-d</code> defines these primitives—per-DP-rank endpoints, separate prefill and decode scheduling profiles, and composable Kustomize components—at the platform layer, adding SGLang did not require a parallel routing stack or custom operator workflow. Once SGLang exposed the same per-rank endpoint and disaggregation contracts, users could choose SGLang as their serving backend under <code>llm-d</code>'s Kubernetes control plane—getting out-of-the-box Wide-EP dispatch on RoCE networks and tiered KV-cache offloading with SGLang's Hierarchical Cache (<code>HiCache</code>).</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="2-first-class-sglang-integration-in-llm-d">2. First-Class SGLang Integration in <code>llm-d</code><a href="https://llm-d.ai/blog/serving-glm-5-2-sglang-tiered-kv-cache-on-llm-d#2-first-class-sglang-integration-in-llm-d" class="hash-link" aria-label="Direct link to 2-first-class-sglang-integration-in-llm-d" title="Direct link to 2-first-class-sglang-integration-in-llm-d" translate="no">​</a></h2>
<p>SGLang could already run GLM-5.2 Wide-EP as a standalone server, but integrating it into <code>llm-d</code> exposed a core boundary mismatch. In a Wide-EP deployment, MoE experts are shared across GPUs, while each attention-DP rank owns a separate KV cache. Because <code>llm-d</code> routes requests, tracks prefix locality, and pairs prefill with decode (<code>P/D</code>) at the per-DP-rank level, a single node-level endpoint is not enough. Every DP rank needs to act like an independent server—with its own port, its own <code>P/D</code> pairing handshake, and its own health and observability signals.</p>
<p>The goal of our engineering work was making SGLang's Wide-EP runtime fit cleanly into <code>llm-d</code>'s Kubernetes control plane:</p>
<table><thead><tr><th style="text-align:left"><strong>Pain we hit</strong></th><th style="text-align:left"><strong>What we changed</strong></th><th style="text-align:left"><strong>What operators get</strong></th></tr></thead><tbody><tr><td style="text-align:left"><strong>One node-level port hid eight separate KV caches behind a single endpoint.</strong></td><td style="text-align:left">Leveraged the embedded Rust HTTP server for each DP rank with per-rank warmup readiness.</td><td style="text-align:left">Every DP rank across single- and multi-node pools is a routable <code>InferencePool</code> endpoint.</td></tr><tr><td style="text-align:left"><strong><code>P/D</code> pairing only worked on rank 0; routing to any other rank failed during the handshake.</strong></td><td style="text-align:left">Replicated <code>P/D</code> pairing state across all rank listeners, carried routing metadata across OpenAI and native APIs, used standard Linux <code>DMA-BUF</code> RDMA for KV transfers, and added clean decode cancellation on prefill failure.</td><td style="text-align:left"><code>EPP</code> can pair any prefill rank with any decode rank across nodes on standard GPU nodes.</td></tr><tr><td style="text-align:left"><strong>Operators and routers lacked per-rank visibility into serving and cache hits.</strong></td><td style="text-align:left">Exposed model and launch metadata per rank, correlated <code>P/D</code> traces and logs across nodes, and added SGLang KV-event decoding in <code>EPP</code>.</td><td style="text-align:left">Per-endpoint visibility in logs and traces, supporting zero-scrape approximate routing today and preparing exact KV-event tracking.</td></tr></tbody></table>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="3-tiered-kv-cache-offloading-and-multi-replica-performance">3. Tiered KV-Cache Offloading and Multi-Replica Performance<a href="https://llm-d.ai/blog/serving-glm-5-2-sglang-tiered-kv-cache-on-llm-d#3-tiered-kv-cache-offloading-and-multi-replica-performance" class="hash-link" aria-label="Direct link to 3. Tiered KV-Cache Offloading and Multi-Replica Performance" title="Direct link to 3. Tiered KV-Cache Offloading and Multi-Replica Performance" translate="no">​</a></h2>
<p>With SGLang running natively behind <code>llm-d</code>'s prefix-aware router, the remaining bottleneck for agentic serving is <strong>KV-cache capacity and survival</strong>. Using SGLang's <strong>HiCache</strong> on the prefill pool, we evaluate a three-tier KV-cache memory hierarchy on 8-GPU NVIDIA H200 nodes on GKE A3 Ultra with ConnectX-7 RoCE and a <code>9,000 GiB</code> Google Cloud Managed Lustre volume:</p>
<ul>
<li class=""><strong><code>L1</code> — GPU HBM:</strong> Fast GPU-resident KV and DSA indexer pool holding <code>261K</code> tokens per GPU, or <code>2.09M</code> tokens per 8-GPU prefill pod—enough for roughly <code>20–30</code> repository-scale sessions.</li>
<li class=""><strong><code>L2</code> — Host RAM:</strong> Per-rank pinned host memory transferred over direct PCIe Gen5 DMA when pages evict from <code>HBM</code>, expanding a single prefill pod to <code>17.5M</code> <code>L1 + L2</code> tokens at <code>98.4 GiB</code> per rank.</li>
<li class=""><strong><code>L3</code> — Shared Storage:</strong> SGLang's file backend on a <code>ReadWriteMany</code> PersistentVolumeClaim—so any standard Kubernetes shared filesystem works without running a separate storage service—holding <code>~163M</code> tokens across the <code>9,000 GiB</code> volume, backed by a client-side metadata cache so each rank remembers pages it has already seen. Because GLM-5.2's MLA KV representation is identical across attention-DP ranks, page files carry no rank suffix—creating <strong>one deduplicated cache pool shared across every rank and prefill replica</strong>.</li>
</ul>
<figure class="glm-figure glm-figure--wide"><img src="https://llm-d.ai/img/blogs/glm52-sglang-tiered-kv/hbm-and-tier-capacity.png" alt="Extending GLM-5.2 KV-cache capacity from GPU HBM to host RAM and shared storage"><figcaption><p><strong>Figure 2:</strong> Extending GLM-5.2 KV-cache capacity from GPU HBM to host RAM and shared storage. All memory values are in binary <code>GiB</code>: an H200 exposes <code>140.4 GiB</code> of HBM, and each <code>DEP8</code> GPU holds one-eighth of the routed MoE experts alongside replicated MLA attention and EAGLE MTP weights for <code>111.1 GiB</code> total.</p></figcaption></figure>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="extending-single-node-memory-with-host-ram-on-16x-h200">Extending single-node memory with Host RAM on 16x H200<a href="https://llm-d.ai/blog/serving-glm-5-2-sglang-tiered-kv-cache-on-llm-d#extending-single-node-memory-with-host-ram-on-16x-h200" class="hash-link" aria-label="Direct link to Extending single-node memory with Host RAM on 16x H200" title="Direct link to Extending single-node memory with Host RAM on 16x H200" translate="no">​</a></h3>
<p>We measured how <code>L2</code> host RAM and <code>Shared L3</code> remote storage behave on the default 16-GPU single-replica <code>1P1D</code> layout—one 8-GPU prefill pod paired with one 8-GPU decode pod—under the <code>900s</code> <a href="https://github.com/ai-dynamo/aiperf/blob/main/docs/tutorials/agentx-mvp.md" target="_blank" rel="noopener noreferrer" class="">AIPerf <code>inferencex-agentx-mvp</code> benchmark</a> on the <a href="https://huggingface.co/datasets/semianalysisai/cc-traces-weka-062126" target="_blank" rel="noopener noreferrer" class=""><code>cc-traces-weka-062126</code></a> Claude Code trace corpus with a <code>142K</code> context cap, swept from concurrency <code>16</code> to <code>128</code>:</p>
<figure class="glm-figure glm-figure--wide"><img src="https://llm-d.ai/img/blogs/glm52-sglang-tiered-kv/tiered-offloading-scaling.png" alt="L2 host RAM eliminates the L1 thrashing cliff on a single 16-GPU replica"><figcaption><p><strong>Figure 3:</strong> L2 host RAM eliminates the L1 thrashing cliff on a single 16-GPU replica.</p></figcaption></figure>
<p>Past concurrency <code>32</code>, active sessions exceed the <code>2.09M</code>-token <code>HBM</code> budget and evict one another, dropping the cache hit rate to <code>6.0%</code> and pushing median TTFT to <code>174.2 s</code> at concurrency <code>128</code>. Offloading to <code>L2</code> host RAM preserves <code>85%–95%</code> cache reuse across the full sweep, cuts concurrency-<code>128</code> median TTFT <strong><code>8.7x</code></strong>, and raises output <strong><code>3.94x</code></strong>—whereas our <code>Shared L3</code> file configuration, which uses <code>write_through</code> backups for every new page and synchronous <code>wait_complete</code> prefetches, adds <code>14%–33%</code> to median TTFT across concurrencies <code>16</code> to <code>128</code> and trims concurrency-<code>128</code> output by <code>~9%</code> on a single warm pod for no significant extra benefit.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="multi-replica-shared-l3-on-32x-h200">Multi-replica Shared L3 on 32x H200<a href="https://llm-d.ai/blog/serving-glm-5-2-sglang-tiered-kv-cache-on-llm-d#multi-replica-shared-l3-on-32x-h200" class="hash-link" aria-label="Direct link to Multi-replica Shared L3 on 32x H200" title="Direct link to Multi-replica Shared L3 on 32x H200" translate="no">​</a></h3>
<p><code>Shared L3</code> pays off across multi-replica failover, pod evictions, and cold restarts. To test this, we scale out to <code>32</code> H200 GPUs across two 8-GPU prefill pods and one 2-node 16-GPU decode pool. We measure sustained load at <code>64</code> and <code>128</code> concurrent sessions, a live failover test where we delete <code>prefill-0</code> at <code>t = 95 s</code> across <code>24</code> active <code>~98K</code>-token sessions so <code>EPP</code> moves its <code>11</code> sessions onto <code>prefill-1</code>, and a cold-replica recovery test that replays <code>16</code> <code>~92K</code>-token sessions against a freshly restarted prefill pod:</p>
<figure class="glm-figure glm-figure--wide"><img src="https://llm-d.ai/img/blogs/glm52-sglang-tiered-kv/multi-replica-shared-l3.png" alt="Multi-replica Shared L3 on 32x H200: live pod failover and scale-out"><figcaption><p><strong>Figure 4:</strong> Multi-replica Shared L3 on 32x H200 (<code>p2w1d1w2</code>): live pod failover and scale-out.</p></figcaption></figure>
<p>Scaling out to two prefill replicas with a 2-node decode pool cuts concurrency-<code>128</code> median TTFT <strong><code>5.9x</code></strong> to <code>3.43 s</code> at <code>1,903 tok/s</code>. Under the same synchronous file configuration, <code>Shared L3</code> adds steady-state overhead without failures—raising median TTFT by <code>26%</code> at concurrency <code>64</code> and <code>66%</code> at concurrency <code>128</code>, while reducing output by <code>&lt;5%</code> to <code>11%</code>—but it restores <strong><code>99.94%</code></strong> of failed-over prefix tokens from storage instead of recomputing them, cutting failover median TTFT by <strong><code>25%</code></strong> from <code>38.4 s</code> to <code>28.8 s</code> and cold-replica recovery TTFT by <strong><code>57%</code></strong> from <code>38.8 s</code> to <code>16.8 s</code>. Operators should therefore run <strong><code>L1 + L2</code></strong> on steady single-replica pods and add <strong><code>Shared L3</code></strong> when resilience to Spot preemptions, upgrades, or multi-replica failover matters; full deployment overlays are in <a href="https://github.com/llm-d/llm-d/tree/main/guides/models/glm-5-2" target="_blank" rel="noopener noreferrer" class=""><code>guides/models/glm-5-2</code></a>.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="running-the-recipe">Running the Recipe<a href="https://llm-d.ai/blog/serving-glm-5-2-sglang-tiered-kv-cache-on-llm-d#running-the-recipe" class="hash-link" aria-label="Direct link to Running the Recipe" title="Direct link to Running the Recipe" translate="no">​</a></h2>
<p>Deploying the SGLang GLM-5.2 stack on <code>llm-d</code> takes two steps—installing the standalone inference router with <a href="https://github.com/llm-d/llm-d/blob/main/guides/models/glm-5-2/router/sglang.values.yaml" target="_blank" rel="noopener noreferrer" class=""><code>sglang.values.yaml</code></a>, and applying one of the deployment overlays from <a href="https://github.com/llm-d/llm-d/tree/main/guides/models/glm-5-2" target="_blank" rel="noopener noreferrer" class=""><code>guides/models/glm-5-2</code></a>:</p>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token builtin class-name" style="color:hsl(35, 99%, 36%)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:hsl(221, 87%, 60%)">REPO_ROOT</span><span class="token operator" style="color:hsl(221, 87%, 60%)">=</span><span class="token variable" style="color:hsl(221, 87%, 60%)">$(</span><span class="token variable" style="color:hsl(221, 87%, 60%)">realpath </span><span class="token variable punctuation" style="color:hsl(119, 34%, 47%)">$(</span><span class="token variable" style="color:hsl(221, 87%, 60%)">git rev-parse --show-toplevel</span><span class="token variable punctuation" style="color:hsl(119, 34%, 47%)">)</span><span class="token variable" style="color:hsl(221, 87%, 60%)">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token builtin class-name" style="color:hsl(35, 99%, 36%)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:hsl(221, 87%, 60%)">GUIDE_NAME</span><span class="token operator" style="color:hsl(221, 87%, 60%)">=</span><span class="token plain">glm-5-2</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token builtin class-name" style="color:hsl(35, 99%, 36%)">export</span><span class="token plain"> </span><span class="token assign-left variable" style="color:hsl(221, 87%, 60%)">NAMESPACE</span><span class="token operator" style="color:hsl(221, 87%, 60%)">=</span><span class="token plain">llm-d-glm-5-2</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token builtin class-name" style="color:hsl(35, 99%, 36%)">source</span><span class="token plain"> </span><span class="token variable" style="color:hsl(221, 87%, 60%)">${REPO_ROOT}</span><span class="token plain">/guides/env.sh</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token comment" style="color:hsl(230, 4%, 64%)"># 1. Deploy the engine-agnostic llm-d router with the SGLang Wide-EP configuration:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">helm </span><span class="token function" style="color:hsl(221, 87%, 60%)">install</span><span class="token plain"> </span><span class="token variable" style="color:hsl(221, 87%, 60%)">${GUIDE_NAME}</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token variable" style="color:hsl(221, 87%, 60%)">${ROUTER_STANDALONE_CHART}</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token parameter variable" style="color:hsl(221, 87%, 60%)">-f</span><span class="token plain"> </span><span class="token variable" style="color:hsl(221, 87%, 60%)">${REPO_ROOT}</span><span class="token plain">/guides/recipes/router/base.values.yaml </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token parameter variable" style="color:hsl(221, 87%, 60%)">-f</span><span class="token plain"> </span><span class="token variable" style="color:hsl(221, 87%, 60%)">${REPO_ROOT}</span><span class="token plain">/guides/models/</span><span class="token variable" style="color:hsl(221, 87%, 60%)">${GUIDE_NAME}</span><span class="token plain">/router/</span><span class="token variable" style="color:hsl(221, 87%, 60%)">${GUIDE_NAME}</span><span class="token plain">.values.yaml </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token parameter variable" style="color:hsl(221, 87%, 60%)">-f</span><span class="token plain"> </span><span class="token variable" style="color:hsl(221, 87%, 60%)">${REPO_ROOT}</span><span class="token plain">/guides/models/</span><span class="token variable" style="color:hsl(221, 87%, 60%)">${GUIDE_NAME}</span><span class="token plain">/router/sglang.values.yaml </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token parameter variable" style="color:hsl(221, 87%, 60%)">-n</span><span class="token plain"> </span><span class="token variable" style="color:hsl(221, 87%, 60%)">${NAMESPACE}</span><span class="token plain"> </span><span class="token parameter variable" style="color:hsl(221, 87%, 60%)">--version</span><span class="token plain"> </span><span class="token variable" style="color:hsl(221, 87%, 60%)">${ROUTER_CHART_VERSION}</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token comment" style="color:hsl(230, 4%, 64%)"># 2. Option A: 32-GPU multi-replica p2w1d1w2 with L1 + L2 host RAM (use deployments/p1w1d1w1 for the 16-GPU layout):</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">kubectl apply </span><span class="token parameter variable" style="color:hsl(221, 87%, 60%)">-n</span><span class="token plain"> </span><span class="token variable" style="color:hsl(221, 87%, 60%)">${NAMESPACE}</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token parameter variable" style="color:hsl(221, 87%, 60%)">-k</span><span class="token plain"> </span><span class="token variable" style="color:hsl(221, 87%, 60%)">${REPO_ROOT}</span><span class="token plain">/guides/models/glm-5-2/modelserver/gpu/sglang/deployments/p2w1d1w2</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token comment" style="color:hsl(230, 4%, 64%)"># 2. Option B: 16-GPU p1w1d1w1 with Shared L3 (adds components/hicache-fs).</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token comment" style="color:hsl(230, 4%, 64%)">#    Needs a ReadWriteMany PVC named llm-d-kv-cache-storage. For multi-replica</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token comment" style="color:hsl(230, 4%, 64%)">#    Shared L3, add the same component to the p2w1d1w2 overlay.</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">kubectl apply </span><span class="token parameter variable" style="color:hsl(221, 87%, 60%)">-n</span><span class="token plain"> </span><span class="token variable" style="color:hsl(221, 87%, 60%)">${NAMESPACE}</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token parameter variable" style="color:hsl(221, 87%, 60%)">-k</span><span class="token plain"> </span><span class="token variable" style="color:hsl(221, 87%, 60%)">${REPO_ROOT}</span><span class="token plain">/guides/models/glm-5-2/modelserver/gpu/sglang/deployments/benchmark/hicache-fs/p1w1d1w1</span><br></div></code></pre></div></div>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="conclusion">Conclusion<a href="https://llm-d.ai/blog/serving-glm-5-2-sglang-tiered-kv-cache-on-llm-d#conclusion" class="hash-link" aria-label="Direct link to Conclusion" title="Direct link to Conclusion" translate="no">​</a></h2>
<p>Bringing first-class SGLang serving to <code>llm-d</code> started with a simple constraint: supporting a second engine could not mean building a second platform. Contributors added per-rank Rust endpoints and replicated <code>P/D</code> pairing state in SGLang. As a result, <code>llm-d</code> now orchestrates and routes SGLang Wide-EP alongside vLLM through one Kubernetes stack.</p>
<p>On top of that integration, SGLang's <code>HiCache</code> keeps long-context agent sessions alive as traffic grows: run <code>L1 + L2</code> host RAM on steady single-pod deployments, and add <code>Shared L3</code> when pod evictions, cold starts, or multi-replica failover matter. Ready-to-run configurations are available in <a href="https://github.com/llm-d/llm-d/tree/main/guides/models/glm-5-2" target="_blank" rel="noopener noreferrer" class=""><code>guides/models/glm-5-2</code></a>.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="whats-next">What’s next<a href="https://llm-d.ai/blog/serving-glm-5-2-sglang-tiered-kv-cache-on-llm-d#whats-next" class="hash-link" aria-label="Direct link to What’s next" title="Direct link to What’s next" translate="no">​</a></h2>
<p>We are working to connect SGLang's disaggregated Rust preprocessing layer—<code>sglang-processor</code>, which is already shared across SGLang's router, standalone renderer, and per-rank Rust servers—with <code>llm-d</code>'s router so prompts are rendered and tokenized once at ingress without router-to-worker token drift. Pairing that shared preprocessing with per-rank Rust metrics and KV-cache event streaming across <code>L1</code>, <code>L2</code>, and <code>L3</code> will move SGLang routing in <code>llm-d</code> from approximate prefix tracking to exact, block-level cache awareness.</p>]]></content:encoded>
            <author>nishjain@google.com (Nishtha Jain)</author>
            <category>blog posts</category>
            <category>SGLang</category>
            <category>GLM-5.2</category>
            <category>Agentic Inference</category>
            <category>KV Cache</category>
            <category>Storage</category>
            <category>Scheduling</category>
            <category>Disaggregation</category>
            <category>GKE</category>
        </item>
        <item>
            <title><![CDATA[Multi-Tenant and Multi-Priority Model Serving with llm-d]]></title>
            <link>https://llm-d.ai/blog/multi-tenant-multi-priority-model-serving-llm-d</link>
            <guid>https://llm-d.ai/blog/multi-tenant-multi-priority-model-serving-llm-d</guid>
            <pubDate>Mon, 16 Nov 2026 10:00:00 GMT</pubDate>
            <description><![CDATA[A recommended architecture for sharing one GPU pool across many teams and priorities with llm-d: durable per-tenant queues, quota and rate-limit gates, six-lane strict priority scheduling, and a defined degradation policy at saturation, powered by llm-d Async.]]></description>
            <content:encoded><![CDATA[<p>You have multiple teams consuming multiple models, with use-cases of varying importance — and one pool of expensive GPU hardware to serve them all. You need to impose quotas and priorities so that no team starves another and no batch job exhausts the cluster.</p>
<p>In this write-up we walk through a recommended architecture for this scenario built on the llm-d open-source stack, focusing on the <a href="https://github.com/llm-d/llm-d-async" target="_blank" rel="noopener noreferrer" class="">llm-d Async</a> component: an asynchronous dispatch processor that provides quota management, rate limiting, and strict priority scheduling in front of your inference gateways.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-hard-reality-of-shared-gpu-clusters">The Hard Reality of Shared GPU Clusters<a href="https://llm-d.ai/blog/multi-tenant-multi-priority-model-serving-llm-d#the-hard-reality-of-shared-gpu-clusters" class="hash-link" aria-label="Direct link to The Hard Reality of Shared GPU Clusters" title="Direct link to The Hard Reality of Shared GPU Clusters" translate="no">​</a></h2>
<p>Large Language Model (LLM) serving on modern accelerators is a massive capital expense. Statically partitioning that hardware — dedicated node pools per team, or fixed slicing like MIG — leads to a predictable and painful result: siloed hardware with asymmetrical utilization. One team's GPUs idle at 5% over the weekend while another team's batch pipeline faces a multi-hour backlog.</p>
<p>To maximize ROI, hardware must be shared. However, dynamic sharing of large models introduces three critical engineering challenges:</p>
<ol>
<li class=""><strong>The Noisy Neighbor Problem:</strong> A single team launching a massive document-extraction batch (e.g., 100,000 documents) can instantly saturate the inference engine's prefill capacity, causing the interactive chat applications of other teams to experience catastrophic latency spikes or HTTP 429 timeouts.</li>
<li class=""><strong>Priority Starvation:</strong> In a shared FIFO queue, low-priority background jobs (offline evaluations, embeddings backfills) land ahead of critical real-time requests, starving the high-priority lanes.</li>
<li class=""><strong>Control-Plane Coupling:</strong> Synchronous HTTP gateways hold client connections open through long prefill and decode cycles. Under load, slowness cascades backward into client microservices as connection exhaustion and retry storms.</li>
</ol>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-recommended-architecture-decoupled--gated-dispatch">The Recommended Architecture: Decoupled &amp; Gated Dispatch<a href="https://llm-d.ai/blog/multi-tenant-multi-priority-model-serving-llm-d#the-recommended-architecture-decoupled--gated-dispatch" class="hash-link" aria-label="Direct link to The Recommended Architecture: Decoupled &amp; Gated Dispatch" title="Direct link to The Recommended Architecture: Decoupled &amp; Gated Dispatch" translate="no">​</a></h2>
<p>By combining a durable queue layer with an intelligent async dispatch processor, the llm-d stack resolves these shared-pool bottlenecks by cleanly decoupling ingestion from execution:</p>
<div style="text-align:center;margin:20px 0">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/multitenant-async/architecture.jpg" alt="Four-tier architecture: Team Alpha chat and Team Beta document extraction write to per-tenant queues in the persistent backlog layer (GCP Pub/Sub or Redis); the llm-d Async dispatch processor polls them under budget through redis-quota gates and the tier-priority merge policy, stamping priorities and objectives; requests are posted to the llm-d Router / EPP infrastructure gateway for saturation and admission control, then served by vLLM replicas in a shared GKE GPU/TPU compute pool" style="max-width:640px;width:100%;height:auto" class="img_ev3q">
</div>
<p>This four-tier architecture provides complete isolation, high utilization, and predictable QoS levels:</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="tier-1-the-persistent-backlog-layer-queue-per-tenant">Tier 1: The Persistent Backlog Layer (Queue-per-Tenant)<a href="https://llm-d.ai/blog/multi-tenant-multi-priority-model-serving-llm-d#tier-1-the-persistent-backlog-layer-queue-per-tenant" class="hash-link" aria-label="Direct link to Tier 1: The Persistent Backlog Layer (Queue-per-Tenant)" title="Direct link to Tier 1: The Persistent Backlog Layer (Queue-per-Tenant)" translate="no">​</a></h3>
<p>Instead of teams hitting the inference gateway directly, requests are written to tenant-specific or workload-specific queues using a durable message broker (like GCP Pub/Sub or Redis). If Team Beta submits 100,000 batch requests, they accumulate safely in <code>beta-batch</code> with zero impact on the serving pods' memory. Producers disconnect immediately and pick up results later from a result queue.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="tier-2-llm-d-async-gated-dispatch">Tier 2: llm-d Async (Gated Dispatch)<a href="https://llm-d.ai/blog/multi-tenant-multi-priority-model-serving-llm-d#tier-2-llm-d-async-gated-dispatch" class="hash-link" aria-label="Direct link to Tier 2: llm-d Async (Gated Dispatch)" title="Direct link to Tier 2: llm-d Async (Gated Dispatch)" translate="no">​</a></h3>
<p>The processor consumes from all queues concurrently, but not blindly. Each queue passes through dispatch gates (quota, rate limit, capacity) and a merge policy (priority scheduling) before a worker forwards the request to the gateway. This is where isolation is enforced, and the rest of this post is mostly about this tier.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="tier-3-llm-d-router-router-side-admission-control">Tier 3: llm-d Router (Router-Side Admission Control)<a href="https://llm-d.ai/blog/multi-tenant-multi-priority-model-serving-llm-d#tier-3-llm-d-router-router-side-admission-control" class="hash-link" aria-label="Direct link to Tier 3: llm-d Router (Router-Side Admission Control)" title="Direct link to Tier 3: llm-d Router (Router-Side Admission Control)" translate="no">​</a></h3>
<p>The llm-d Router sits in front of the model servers and arbitrates in-flight traffic using flow control and saturation detection, driven by real-time engine signals such as vLLM's <code>num_requests_waiting</code>. Crucially, this telemetry is exported as Prometheus metrics — and llm-d Async's Prometheus-backed gates poll those same metrics to throttle dequeuing, closing an end-to-end backpressure loop: engine → router metrics → dispatch budget → queue.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="tier-4-the-shared-compute-pool">Tier 4: The Shared Compute Pool<a href="https://llm-d.ai/blog/multi-tenant-multi-priority-model-serving-llm-d#tier-4-the-shared-compute-pool" class="hash-link" aria-label="Direct link to Tier 4: The Shared Compute Pool" title="Direct link to Tier 4: The Shared Compute Pool" translate="no">​</a></h3>
<p>Shared model serving instances kept densely utilized across interactive and batch workloads admitted by upstream tiers.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-isolation-pillars">The Isolation Pillars<a href="https://llm-d.ai/blog/multi-tenant-multi-priority-model-serving-llm-d#the-isolation-pillars" class="hash-link" aria-label="Direct link to The Isolation Pillars" title="Direct link to The Isolation Pillars" translate="no">​</a></h2>
<p>To achieve true QoS isolation, your llm-d Async configuration relies on four core mechanisms:</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="pillar-1-quota-and-rate-limiting-gates">Pillar 1: Quota and Rate-Limiting Gates<a href="https://llm-d.ai/blog/multi-tenant-multi-priority-model-serving-llm-d#pillar-1-quota-and-rate-limiting-gates" class="hash-link" aria-label="Direct link to Pillar 1: Quota and Rate-Limiting Gates" title="Direct link to Pillar 1: Quota and Rate-Limiting Gates" translate="no">​</a></h3>
<p>To stop noisy neighbors, llm-d Async supports a Redis-backed distributed quota gate (<code>redis-quota</code>) keyed on any request metadata attribute (a team ID, a user ID). Each gate runs in one of two modes: <code>rate-limit</code> (requests per time window) or <code>concurrency</code> (simultaneous in-flight requests):</p>
<div class="language-json codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-json codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token property" style="color:hsl(5, 74%, 59%)">"gate_type"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"redis-quota"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token property" style="color:hsl(5, 74%, 59%)">"gate_params"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token property" style="color:hsl(5, 74%, 59%)">"address"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"redis.llm-d:6379"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token property" style="color:hsl(5, 74%, 59%)">"attribute"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"team_id"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token property" style="color:hsl(5, 74%, 59%)">"mode"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"concurrency"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token property" style="color:hsl(5, 74%, 59%)">"limit"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"20"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token property" style="color:hsl(5, 74%, 59%)">"gating_mode"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"classifying"</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><br></div></code></pre></div></div>
<p>To enforce both axes at once, compose two quota gates with the <code>composite</code> gate — quota acquisition across the inner gates is all-or-nothing.</p>
<p>What happens when a team exceeds its quota depends on <code>gating_mode</code>:</p>
<ul>
<li class=""><strong><code>blocking</code></strong> — over-quota messages simply stop being dequeued. They sit safely on the broker, invisible to the serving pods, until quota frees up.</li>
<li class=""><strong><code>classifying</code></strong> — over-quota messages still flow, but are tagged <code>overflow</code> instead of <code>reserved</code>. This tag is the input to the next pillar, and it's what turns a blunt rate limiter into a work-conserving scheduler: overflow traffic may still run when the cluster has spare capacity, but never at the expense of anyone's reserved share.</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="pillar-2-multi-lane-priority-scheduling">Pillar 2: Multi-Lane Priority Scheduling<a href="https://llm-d.ai/blog/multi-tenant-multi-priority-model-serving-llm-d#pillar-2-multi-lane-priority-scheduling" class="hash-link" aria-label="Direct link to Pillar 2: Multi-Lane Priority Scheduling" title="Direct link to Pillar 2: Multi-Lane Priority Scheduling" translate="no">​</a></h3>
<p>Each queue declares a QoS tier via its labels (<code>interactive</code>, <code>async</code>, or <code>batch</code>), so a tenant's traffic is split across queues by urgency. The <code>tier-priority</code> merge policy combines that per-queue tier with the per-request classification from Pillar 1 into six strict priority lanes:</p>

































<table><thead><tr><th style="text-align:left">Lane</th><th style="text-align:left">Priority</th></tr></thead><tbody><tr><td style="text-align:left"><code>reserved-interactive</code></td><td style="text-align:left">Highest</td></tr><tr><td style="text-align:left"><code>reserved-async</code></td><td style="text-align:left"></td></tr><tr><td style="text-align:left"><code>reserved-batch</code></td><td style="text-align:left"></td></tr><tr><td style="text-align:left"><code>overflow-interactive</code></td><td style="text-align:left"></td></tr><tr><td style="text-align:left"><code>overflow-async</code></td><td style="text-align:left"></td></tr><tr><td style="text-align:left"><code>overflow-batch</code></td><td style="text-align:left">Lowest</td></tr></tbody></table>
<p>When a worker frees up, lanes drain in strict order, with round-robin fairness among queues within a lane. An interactive chat request inside its quota always dispatches ahead of a document-extraction batch — and a team that has blown through its quota drops below every other team's reserved traffic, rather than being rejected outright.</p>
<p>Merging happens per worker pool, not globally: queues are grouped by <code>worker_pool_id</code>, and each pool gets its own independent merged channel. A saturated pool for one model blocks only its own channel; the pool for another model next to it keeps dispatching. That per-pool topology is the mechanism behind the isolation claims, not an aspiration.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="pillar-3-propagating-priority-to-the-gateway">Pillar 3: Propagating Priority to the Gateway<a href="https://llm-d.ai/blog/multi-tenant-multi-priority-model-serving-llm-d#pillar-3-propagating-priority-to-the-gateway" class="hash-link" aria-label="Direct link to Pillar 3: Propagating Priority to the Gateway" title="Direct link to Pillar 3: Propagating Priority to the Gateway" translate="no">​</a></h3>
<p>Scheduling doesn't stop at dispatch. The merge policy stamps two headers onto the outgoing request so the gateway's flow control continues the policy inside the serving tier:</p>
<ul>
<li class=""><strong><code>x-llm-d-inference-objective</code></strong> — the lane's <code>InferenceObjective</code>, mapped via <code>lane_objectives</code> (e.g., <code>reserved-interactive</code> → <code>premium-latency</code>, <code>overflow-batch</code> → <code>best-effort</code>). The llm-d Router uses this to apply the matching priority and SLO treatment.</li>
<li class=""><strong><code>x-llm-d-inference-fairness-id</code></strong> — the tenant identity, read from the same metadata attribute the quota gate keys on, so the identity the gateway arbitrates on is exactly the one quota was accounted against. (Prefer opaque tenant IDs over emails — this value can end up in gateway access logs.)</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="pillar-4-behavior-at-saturation">Pillar 4: Behavior at Saturation<a href="https://llm-d.ai/blog/multi-tenant-multi-priority-model-serving-llm-d#pillar-4-behavior-at-saturation" class="hash-link" aria-label="Direct link to Pillar 4: Behavior at Saturation" title="Direct link to Pillar 4: Behavior at Saturation" translate="no">​</a></h3>
<p>The most important moments in a multi-tenant cluster are the moments there's no capacity left. The <code>tier-priority-admission</code> gate wraps a saturation signal (e.g., a <code>prometheus-saturation</code> inner gate watching the pool's saturation metric) and issues a three-way verdict when the pool is full:</p>
<ul>
<li class=""><strong>Reserved requests park:</strong> the worker waits in memory and dispatches the moment capacity frees, with no broker redelivery churn.</li>
<li class=""><strong>Overflow interactive requests are dropped immediately with a 429</strong> — an interactive caller gains nothing from a stale answer, so fail fast and let the client decide.</li>
<li class=""><strong>Overflow async/batch requests are returned to the broker</strong> for redelivery with backoff — they'll run when the rush is over.</li>
</ul>
<p>This is the difference between "we rate limit" and "we have a defined, tiered degradation policy under overload."</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="an-example-two-teams-one-pool">An Example: Two Teams, One Pool<a href="https://llm-d.ai/blog/multi-tenant-multi-priority-model-serving-llm-d#an-example-two-teams-one-pool" class="hash-link" aria-label="Direct link to An Example: Two Teams, One Pool" title="Direct link to An Example: Two Teams, One Pool" translate="no">​</a></h2>
<p>Team Alpha runs a customer-facing chat product; team Beta runs nightly document extraction. Both share one vLLM pool.</p>
<p>Transport configuration (<code>--transport redis-sortedset --transport-config-file queues.json</code>):</p>
<div class="language-json codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-json codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token property" style="color:hsl(5, 74%, 59%)">"url"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"redis://redis.llm-d:6379/0"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token property" style="color:hsl(5, 74%, 59%)">"queues"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">[</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token property" style="color:hsl(5, 74%, 59%)">"queue_name"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"alpha-chat"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token property" style="color:hsl(5, 74%, 59%)">"igw_base_url"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"http://llm-d-router.llm-d:80"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token property" style="color:hsl(5, 74%, 59%)">"request_path_url"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"/v1/chat/completions"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token property" style="color:hsl(5, 74%, 59%)">"worker_pool_id"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"shared-pool"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token property" style="color:hsl(5, 74%, 59%)">"labels"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token plain"> </span><span class="token property" style="color:hsl(5, 74%, 59%)">"tier"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"interactive"</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token property" style="color:hsl(5, 74%, 59%)">"gate_type"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"redis-quota"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token property" style="color:hsl(5, 74%, 59%)">"gate_params"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token property" style="color:hsl(5, 74%, 59%)">"address"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"redis.llm-d:6379"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token property" style="color:hsl(5, 74%, 59%)">"attribute"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"team_id"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token property" style="color:hsl(5, 74%, 59%)">"mode"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"concurrency"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token property" style="color:hsl(5, 74%, 59%)">"limit"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"20"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token property" style="color:hsl(5, 74%, 59%)">"gating_mode"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"classifying"</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token property" style="color:hsl(5, 74%, 59%)">"queue_name"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"beta-batch"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token property" style="color:hsl(5, 74%, 59%)">"igw_base_url"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"http://llm-d-router.llm-d:80"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token property" style="color:hsl(5, 74%, 59%)">"worker_pool_id"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"shared-pool"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token property" style="color:hsl(5, 74%, 59%)">"labels"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token plain"> </span><span class="token property" style="color:hsl(5, 74%, 59%)">"tier"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"batch"</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token property" style="color:hsl(5, 74%, 59%)">"gate_type"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"redis-quota"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token property" style="color:hsl(5, 74%, 59%)">"gate_params"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token property" style="color:hsl(5, 74%, 59%)">"address"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"redis.llm-d:6379"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token property" style="color:hsl(5, 74%, 59%)">"attribute"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"team_id"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token property" style="color:hsl(5, 74%, 59%)">"mode"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"rate-limit"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token property" style="color:hsl(5, 74%, 59%)">"limit"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"600"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token property" style="color:hsl(5, 74%, 59%)">"window"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"1m"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token property" style="color:hsl(5, 74%, 59%)">"gating_mode"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"classifying"</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">]</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><br></div></code></pre></div></div>
<p>Worker pool with a saturation-aware admission gate (<code>--pool-config-file</code>):</p>
<div class="language-json codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-json codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token punctuation" style="color:hsl(119, 34%, 47%)">[</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token property" style="color:hsl(5, 74%, 59%)">"id"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"shared-pool"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token property" style="color:hsl(5, 74%, 59%)">"workers"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">32</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token property" style="color:hsl(5, 74%, 59%)">"gate_type"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"tier-priority-admission"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token property" style="color:hsl(5, 74%, 59%)">"gate_params"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token property" style="color:hsl(5, 74%, 59%)">"saturation_gate"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"prometheus-saturation"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token property" style="color:hsl(5, 74%, 59%)">"saturation_gate_params"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"{\"pool\":\"shared-pool\",\"threshold\":\"0.8\"}"</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">]</span><br></div></code></pre></div></div>
<p>Merge policy (<code>--request-merge-policy-config-file</code>):</p>
<div class="language-json codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-json codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token property" style="color:hsl(5, 74%, 59%)">"type"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"tier-priority"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token property" style="color:hsl(5, 74%, 59%)">"parameters"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token property" style="color:hsl(5, 74%, 59%)">"fairness_attribute"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"team_id"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token property" style="color:hsl(5, 74%, 59%)">"lane_objectives"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token property" style="color:hsl(5, 74%, 59%)">"reserved-interactive"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"premium-latency"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token property" style="color:hsl(5, 74%, 59%)">"overflow-batch"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"best-effort"</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><br></div></code></pre></div></div>
<p>Now, when Beta's nightly run floods <code>beta-batch</code> with 100,000 requests: they queue durably, dequeue at most 600/minute, are classified reserved/overflow against that budget, always yield to Alpha's chat traffic at the merge step, and are shed back to the broker — never onto the GPUs — when the pool saturates. Alpha's users never notice the batch ran.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="benchmark-two-teams-one-pool-three-front-doors">Benchmark: Two Teams, One Pool, Three Front Doors<a href="https://llm-d.ai/blog/multi-tenant-multi-priority-model-serving-llm-d#benchmark-two-teams-one-pool-three-front-doors" class="hash-link" aria-label="Direct link to Benchmark: Two Teams, One Pool, Three Front Doors" title="Direct link to Benchmark: Two Teams, One Pool, Three Front Doors" translate="no">​</a></h2>
<p>We measured the two-team scenario above on a GKE cluster to see what each layer actually buys you.</p>
<p><strong>Setup.</strong> Two NVIDIA A100 40GB nodes, each running one vLLM v0.25.0 replica of Qwen3-8B (<code>--max-model-len 32768 --max-num-seqs 64</code>), behind the llm-d Router (standalone mode, built from <code>main</code> in November 2026). llm-d Async v1.0.0, Redis, and kube-prometheus-stack run on CPU nodes. Prometheus scrapes the router every 10 s. The load generators run in-cluster.</p>
<p><strong>Tenants.</strong></p>
<ul>
<li class=""><strong>Alpha (interactive chat):</strong> open-loop Poisson arrivals at 4 requests/s for 11 minutes, <code>/v1/chat/completions</code>, streaming, about 280 input and 128 output tokens per request. Alpha always calls the router directly with <code>x-llm-d-inference-objective: reserved-interactive</code> and its fairness ID. We measure time-to-first-token (TTFT).</li>
<li class=""><strong>Beta (document extraction):</strong> a batch of 4,000 <code>/v1/completions</code> requests, about 770 input and 256 output tokens each, released 2 minutes into the run. Beta's front door is the variable.</li>
</ul>
<p><strong>Pool capacity.</strong> Batch-only calibration showed throughput plateauing at 128 concurrent requests across the two replicas (about 15 requests/s, 3,600 output tokens/s; 192 and 256 connections gained nothing), so we call 128 the pool's saturation concurrency. Beta's direct client opens 128, 384, or 1,280 connections ("1x", "3x", "10x" of saturation) and retries 429s with exponential backoff, the way a real batch job does. In the async configuration Beta simply publishes all 4,000 requests to its Redis queue at once.</p>
<p><strong>Three front doors for Beta.</strong></p>
<ol>
<li class=""><strong>Direct to the router, no flow control.</strong> Default scheduling plugins. This is what most people run today.</li>
<li class=""><strong>Direct to the router with flow control.</strong> The six <code>InferenceObjective</code> priority bands from the multi-tenant guide, Beta sending <code>reserved-batch</code>, saturation detected by the guide's <code>concurrency-detector</code> with <code>maxConcurrency</code> set at the measured knee (64 per replica).</li>
<li class=""><strong>Queued through llm-d Async.</strong> The exact configuration from this post: <code>redis-quota</code> in classifying mode, the <code>tier-priority</code> merge policy, and <code>tier-priority-admission</code> over <code>prometheus-saturation</code> (threshold 0.8) on a 128-worker pool, dispatching into the same flow-control router as door 2.</li>
</ol>
<p>In every run Alpha's TTFT is the same before Beta starts (p50 44 to 47 ms, p99 about 60 ms) and returns to that level within seconds of Beta draining. The table reports the window while Beta's backlog is in flight.</p>































































































<table><thead><tr><th>Beta's front door</th><th>Beta offered concurrency</th><th>Alpha TTFT p50 (vs idle)</th><th>Alpha TTFT p99</th><th>Beta 429s</th><th>Beta drain time</th><th>Pool output tok/s</th></tr></thead><tbody><tr><td>1. Direct, no flow control</td><td>1x (128)</td><td>1,958 ms (41.7x)</td><td>5,329 ms</td><td>0</td><td>286 s</td><td>3,833</td></tr><tr><td>1. Direct, no flow control</td><td>3x (384)</td><td>22,114 ms (480.7x)</td><td>23,325 ms</td><td>0</td><td>287 s</td><td>3,994</td></tr><tr><td>1. Direct, no flow control</td><td>10x (1,280)</td><td>84,372 ms (1834.2x)</td><td>92,704 ms</td><td>0</td><td>287 s</td><td>3,909</td></tr><tr><td>2. Direct + flow control</td><td>1x (128)</td><td>250 ms (5.7x)</td><td>2,796 ms</td><td>0</td><td>285 s</td><td>3,984</td></tr><tr><td>2. Direct + flow control</td><td>3x (384)</td><td>226 ms (4.9x)</td><td>3,584 ms</td><td>0</td><td>284 s</td><td>4,023</td></tr><tr><td>2. Direct + flow control</td><td>10x (1,280)</td><td>235 ms (5.0x)</td><td>3,000 ms</td><td>18,846</td><td>272 s</td><td>3,975</td></tr><tr><td>3. llm-d Async, 128 workers (mean of 3 runs)</td><td>whole backlog at once</td><td>322 ms (6.9x)</td><td>4,303 ms</td><td>0</td><td>379 s</td><td>3,137</td></tr><tr><td>3. llm-d Async, 96 workers</td><td>whole backlog at once</td><td>65 ms (1.4x)</td><td>1,512 ms</td><td>0</td><td>528 s</td><td>2,365</td></tr><tr><td>3. llm-d Async, 64 workers</td><td>whole backlog at once</td><td>69 ms (1.5x)</td><td>298 ms</td><td>0</td><td>374 s</td><td>3,159</td></tr></tbody></table>
<p><strong>What the numbers say.</strong></p>
<ul>
<li class=""><strong>Without admission control, the interactive tenant's latency scales with the size of the batch.</strong> At 1x, with the pool merely full, Alpha's median TTFT is already 42 times its idle value. At 3x it is 22 seconds. At 10x, vLLM holds a waiting queue of about 1,500 requests and Alpha waits a minute and a half for its first token. Beta is perfectly happy throughout: the batch drains in under 5 minutes in every baseline run. That asymmetry is the noisy neighbor problem in one row.</li>
<li class=""><strong>Flow control bounds the damage, but it does not remove it, and it moves the pain to Beta.</strong> Alpha's TTFT is the same at 1x, 3x, and 10x, which is exactly what priority bands are for. But the bound sits at about 5x idle, because once the pool's in-flight count reaches the detector's cap, even priority-100 requests wait for a slot at the gateway (the router's own <code>flow_control_request_queue_duration_seconds</code> metric reports a mean of 160 to 200 ms for Alpha across these runs, against 1 to 17 s for Beta). And at 10x, Beta's 4,000 requests cost 22,684 attempts: 18,846 were rejected with 429 when the batch band filled, 162 never landed within the client's 25 retries, and Beta's client absorbed the retry storm.</li>
<li class=""><strong>Queuing the batch removes the rejections and the retry storm entirely.</strong> Through llm-d Async, all 4,000 requests complete with zero 429s, zero client retries, and zero failures, and Beta's producer disconnected the moment it published. With the same concurrency-detector router and the full 128 workers, Alpha sits at about 7x idle, close to door 2's floor, so the async tier at full width inherits the router's gating behavior rather than fixing it. It also drains about a third slower (379 s versus 284 s): 128 workers overshoot the router's cap before the 10 s Prometheus scrape reports it, so the saturation gate closes late and reopens all at once, and the pool oscillates instead of running flat out.</li>
</ul>
<p><strong>Metering the batch below saturation is the lever that isolation actually turns on.</strong> The async tier is the only place in the stack where batch admission can be shaped before it reaches the gateway. Dispatching Beta with 64 workers instead of 128 drops Alpha's median TTFT to 69 ms (1.5x idle) with a p99 of 298 ms, the best tail in the whole study. The price is drain time: the same 4,000 requests take 374 s instead of about 285 s, with the pool at roughly 80% of its peak output. That trade is explicit and tunable per pool, which is the point. Meter below the threshold, not at it: 96 workers gave Alpha a similar median (65 ms) but a 1.5 s p99 and the slowest drain in the study (528 s), because the pool brushed the saturation threshold often enough that the admission gate kept bouncing requests back to the broker, and the redelivery backoff left the pool idle for 42% of the drain.</p>
<div style="text-align:center;margin:20px 0">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/multitenant-async/ttft-chart.svg" alt="Bar chart of the interactive tenant's TTFT p50 and p99 during the batch burst for every configuration, log scale: no flow control climbs from 2 s to 84 s as the batch grows; flow control with the concurrency detector holds 226 to 250 ms; llm-d Async with 64 workers holds 69 ms with a 298 ms p99; flow control with the utilization detector holds 641 to 662 ms at every burst size while llm-d Async on the same router with 96 workers sits at 165 ms" style="width:100%;height:auto" class="img_ev3q">
</div>
<p><strong>Detector choice sets the floor; the front door decides whether you reach it.</strong> We repeated doors 2 and 3 with the router's default <code>utilization-detector</code> (vLLM queue depth and KV-cache pressure) instead of the concurrency detector.</p>



























































<table><thead><tr><th>Beta's front door</th><th>Beta offered concurrency</th><th>Alpha TTFT p50 (vs idle)</th><th>Alpha TTFT p99</th><th>Beta 429s</th><th>Beta drain time</th><th>Pool output tok/s</th></tr></thead><tbody><tr><td>2. Direct + flow control</td><td>1x (128)</td><td>662 ms (14.1x)</td><td>2,024 ms</td><td>0</td><td>288 s</td><td>3,828</td></tr><tr><td>2. Direct + flow control</td><td>3x (384)</td><td>641 ms (13.6x)</td><td>1,963 ms</td><td>0</td><td>287 s</td><td>3,895</td></tr><tr><td>2. Direct + flow control</td><td>10x (1,280)</td><td>659 ms (14.3x)</td><td>2,201 ms</td><td>21,604</td><td>281 s</td><td>3,906</td></tr><tr><td>3. llm-d Async, 128 workers</td><td>whole backlog at once</td><td>387 ms (8.2x)</td><td>3,064 ms</td><td>0</td><td>368 s</td><td>3,197</td></tr><tr><td>3. llm-d Async, 96 workers</td><td>whole backlog at once</td><td>165 ms (3.5x)</td><td>936 ms</td><td>0</td><td>322 s</td><td>3,529</td></tr></tbody></table>
<p>The utilization detector holds at every burst size, but it holds Alpha at about 14x idle where the calibrated concurrency detector holds it at 5x: it reacts to the engine's waiting queue and KV-cache pressure rather than to the in-flight count, so by the time it trips, Alpha's requests are already behind a queue. It also rejects more at 10x (21,604 429s, 25,519 attempts for 4,000 requests). On the same router, the queued path moves the floor: 128 workers lands Alpha at 8x, and 96 workers at 3.5x with a p99 under a second, because the dispatcher never presents the router with a burst in the first place. Under either detector, the lever that brings the interactive tenant close to idle sits upstream of the router. (An earlier run of this benchmark on llm-d Async v0.10.0 and vLLM v0.19.1 saw this detector fail outright at 3x and 10x, with Alpha's median at 11 to 16 s; on current versions it does not.)</p>
<p>We also pushed the utilization detector harder to find where it breaks: 10x bursts against 2,000-deep priority bands, so the router queues the backlog instead of rejecting it, with Alpha at 4 and 12 requests/s and Beta prompts of 770 and 1,800 tokens. In all four cells Alpha stayed between 10x and 21x idle at the median and under 2.3 s at p99, and the deep band removed the retry storm entirely: every Beta request landed on its first attempt. The sizing lesson is the band depth. A 500-deep band turns a 10x burst into tens of thousands of 429s; a 2,000-deep band turns it into queueing time that a batch tenant does not mind.</p>
<p><strong>Caveats.</strong> One model, one pool, one hardware configuration, one prompt mix. Alpha calls the router directly in all setups, so its TTFT reflects the gateway and the engine rather than the queue; an interactive tenant that also went through <code>alpha-chat</code> would see completion latency instead of streaming TTFT. The absolute floor for Alpha is set by vLLM itself: with the pool at its 128-sequence knee, the engine's own scheduling adds roughly 1.5x to first-token latency on this hardware, so "within a few percent of idle" is not reachable while the pool is fully utilized. The router image tracks <code>main</code> and was restarted between the two tables, so they may not be the identical build.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="reliability-is-part-of-isolation">Reliability Is Part of Isolation<a href="https://llm-d.ai/blog/multi-tenant-multi-priority-model-serving-llm-d#reliability-is-part-of-isolation" class="hash-link" aria-label="Direct link to Reliability Is Part of Isolation" title="Direct link to Reliability Is Part of Isolation" translate="no">​</a></h2>
<p>Multi-tenancy isn't only about scheduling; it's about what happens when things fail:</p>
<ul>
<li class=""><strong>Deadlines.</strong> Every request carries a mandatory deadline. Failed or shed messages retry with exponential backoff until the deadline, after which the producer gets an explicit <code>DEADLINE_EXCEEDED</code> result. A stuck tenant's backlog expires; it doesn't rot on the broker forever.</li>
<li class=""><strong>At-least-once processing.</strong> On Pub/Sub, requests ride exactly-once subscriptions with a dead-letter queue; on Redis, the sorted-set transport uses claim-based durable dequeue, so a processor crash mid-flight means redelivery, not loss.</li>
<li class=""><strong>Durable result delivery.</strong> Producers can consume results with a lease/acknowledge protocol (receive → checkpoint → ack), so a crashing consumer never drops a result it hadn't durably recorded.</li>
<li class=""><strong>Failure decoupling.</strong> A slowdown or outage in the serving tier never propagates to client microservices — producers only ever talk to the broker.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="observability">Observability<a href="https://llm-d.ai/blog/multi-tenant-multi-priority-model-serving-llm-d#observability" class="hash-link" aria-label="Direct link to Observability" title="Direct link to Observability" translate="no">​</a></h2>
<p>Every gate decision and queue is measurable, which is what makes tenant disputes tractable. The processor exports Prometheus metrics under the <code>llm_d_async_async_</code> prefix, including <code>gate_decisions_total</code> (why requests were refused, per queue), <code>dispatch_budget</code> (how open each gate currently is), <code>broker_backlog</code> and <code>queue_depth</code>, <code>deadline_proximity_millis</code> (backlog at risk of expiring), <code>inflight_requests</code>, <code>tokens_total</code>, and end-to-end latency histograms — with Grafana dashboards for backlog, in-process load, token usage, and deadline proximity available out of the box. "Show me the gate refusing Team Beta at 02:00" is a query, not an investigation.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="business-and-operational-outcomes">Business and Operational Outcomes<a href="https://llm-d.ai/blog/multi-tenant-multi-priority-model-serving-llm-d#business-and-operational-outcomes" class="hash-link" aria-label="Direct link to Business and Operational Outcomes" title="Direct link to Business and Operational Outcomes" translate="no">​</a></h2>
<p>By deploying this gated-dispatch architecture, platform engineering teams can expect the following results:</p>
<ol>
<li class=""><strong>Higher GPU utilization from a single shared pool:</strong> Running one dense, shared GPU/TPU pool rather than dedicated clusters per team removes the idle capacity that static partitioning locks up. How much you save scales with how asymmetric your teams' utilization is; in the benchmark above, a batch tenant filled the capacity an interactive tenant left unused without the interactive tenant paying for it.</li>
<li class=""><strong>Bounded interactive latency under any size of backlog:</strong> In our measurements, a batch backlog offered at 10x the pool's saturation concurrency pushed the interactive tenant's median time-to-first-token (TTFT) to a minute and a half on a plain router. Queued through llm-d Async with the batch metered at half of saturation, the same backlog completed with zero rejections while interactive TTFT stayed within 1.5x of idle at the median and under 300 ms at p99, and the bound did not depend on how large the backlog was.</li>
<li class=""><strong>Decoupled System Reliability:</strong> Slowdowns or outages on the model servers do not cascade to client microservices. Client applications simply write requests directly to their respective backlog queues and decouple immediately, remaining completely insulated from downstream inference pressure. In the benchmark, the direct batch client needed 22,684 attempts to land 3,838 of its 4,000 requests through a saturated gateway; the queued client published once, disconnected, and got all 4,000 results.</li>
</ol>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="getting-started">Getting Started<a href="https://llm-d.ai/blog/multi-tenant-multi-priority-model-serving-llm-d#getting-started" class="hash-link" aria-label="Direct link to Getting Started" title="Direct link to Getting Started" translate="no">​</a></h2>
<p>To begin building your own multi-tenant, multi-priority model serving stack, check out our complete, step-by-step <a href="https://github.com/llm-d/llm-d/tree/main/guides/batch-serving/asynchronous-processing/multitenant" target="_blank" rel="noopener noreferrer" class="">Multi-Tenant Deployment Guide</a>, which contains full Helm values, Prometheus scrape configurations, and load-test scripts to validate isolation under high batch loads.</p>]]></content:encoded>
            <category>blog posts</category>
            <category>Scheduling</category>
            <category>Inference</category>
            <category>Multi-Tenancy</category>
        </item>
        <item>
            <title><![CDATA[From agent traces to replay]]></title>
            <link>https://llm-d.ai/blog/from-agent-traces-to-replay</link>
            <guid>https://llm-d.ai/blog/from-agent-traces-to-replay</guid>
            <pubDate>Mon, 09 Nov 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[Teams are starting to ask hard questions about their agentic systems: how they'll load a serving stack, what latency users will see, whether last week's model swap changed behavior. Answering any of them takes two things: a trace dataset that recorded the right signal, and a mechanism that can replay it.]]></description>
            <content:encoded><![CDATA[<p><em>Say you run inference for an agentic product. Sooner or later you have to answer questions like: how will my serving stack hold up when thousands of agents are calling tools at once? What tail latency will a user hit across a long, multi-turn session? Would a different scheduler, a bigger KV cache, or another GPU move those numbers before I commit to buying it? Did last week's model upgrade quietly change how the agent behaves? You can answer each of these, but only with real agentic traffic. A synthetic prompt loop won't reproduce the tool calls, the multi-turn structure, or the load shape that make agents behave like agents.</em></p>
<p>That traffic comes from a trace dataset: a recording of what real agents did, which you can play back instead of inventing sessions. A dataset is only half the answer, though. A trace does nothing until something replays it, and the replay mechanism decides what you can do with what the dataset kept: turn it into live load, simulate it, or compare two runs. A rich trace that no tool can replay the way you need is a dead end. A capable mechanism can't rebuild detail the trace already threw away. So the question is which dataset to use with which mechanism, and the answer depends on what you're trying to learn.</p>
<p>Datasets differ because they were built for different goals. One built to characterize <em>inference infrastructure load</em> looks nothing like one built to study <em>human-agent interaction</em>, and neither looks like one built as a <em>replayable behavior record</em>. A dataset can "have agent traces" and still be unable to answer your question.</p>
<p>This post surveys these datasets, within a deliberate scope. It covers the trace datasets the inference-serving world actually uses: the ones a replay mechanism (<a href="https://github.com/kubernetes-sigs/inference-perf" target="_blank" rel="noopener">Inference-Perf</a>, <a href="https://docs.nvidia.com/aiperf/latest/" target="_blank" rel="noopener">AIPerf</a>, <a href="https://github.com/vllm-project/guidellm/blob/main/docs/en/guides/trace_replay.md" target="_blank" rel="noopener">GuideLLM</a>, <a href="https://docs.vllm.ai/en/latest/cli/bench/serve/" target="_blank" rel="noopener">vLLM bench serve</a>, <a href="https://github.com/sgl-project/sglang/blob/main/docs/docs/developer_guide/bench_serving.mdx" target="_blank" rel="noopener">SGLang bench_serving</a>, <a href="https://github.com/ai-dynamo/dynamo/blob/main/docs/fern/pages/cli/operations/simulation-with-dynosim/dynosim-replay.mdx" target="_blank" rel="noopener">NVIDIA DynoSim</a>) can turn back into a live or simulated workload. For each, we ask what the dataset keeps, what it throws away, and which questions that leaves answerable. Side by side, the differences are more than cosmetic: each schema follows the goal it was built for.</p>
<p>We didn't hand-pick the list. We went to each of the six replay mechanisms above and collected every agentic-trace format it can load and re-run natively. The datasets below are exactly that set.</p>
<p>Two terms first. A <strong>session</strong> is the actual run: a developer's coding session, or one attempt at a benchmark task. A <strong>trace</strong> is what a dataset captured of that session and published. The two can differ a lot. The linked WEKA release has 391 traces drawn from real sessions, but it hashes the content away, so a rich session doesn't guarantee a rich trace. Each count below uses the unit the dataset's own documentation uses. Mooncake is counted in requests, because it publishes no session or trace boundaries at all.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-datasets-side-by-side">The datasets, side by side<a href="https://llm-d.ai/blog/from-agent-traces-to-replay#the-datasets-side-by-side" class="hash-link" aria-label="Direct link to The datasets, side by side" title="Direct link to The datasets, side by side" translate="no">​</a></h2>
<table><thead><tr><th>Dataset</th><th>Scale</th><th>Origin</th><th>Built for</th><th>What's captured</th></tr></thead><tbody><tr><td><a href="https://huggingface.co/datasets/semianalysisai/cc-traces-weka-with-subagents-060826" target="_blank" rel="noopener">WEKA / AgentX</a><br><small><em>SemiAnalysis</em></small></td><td>391 traces</td><td>Human, real usage</td><td>Inference-infra workload characterization</td><td>WEKA / AgentX nested conversation records with subagent traffic patterns and request shape. Content is hashed away, since the dataset was built to study load.</td></tr><tr><td><a href="https://huggingface.co/datasets/SWE-bench/SWE-smith-trajectories" target="_blank" rel="noopener">SWE-smith</a><br><small><em>SWE-bench</em></small></td><td>5,017 traces</td><td>Benchmark-generated</td><td>Training data for SWE agents (SFT)</td><td>SWE-agent trajectory records with full multi-turn conversations plus the resulting code patch. Structured tool calls appear in the <code>tool</code> split and are flattened to prose in the others, but there are no token counts or timing. Software-engineering tasks only.</td></tr><tr><td><a href="https://github.com/uw-syfi/TraceLab" target="_blank" rel="noopener">TraceLab</a><br><small><em>University of Washington</em></small></td><td>4,265 sessions</td><td>Human, real usage</td><td>Agent-serving infra (batching, latency)</td><td>TraceLab session-and-round records for replayable requests and tool calls, built for serving-system analysis. Content is stripped out. Tool calls and cache-prefix structure are inferred heuristically after the fact.</td></tr><tr><td><a href="https://github.com/kvcache-ai/Mooncake" target="_blank" rel="noopener">Mooncake</a><br><small><em>Moonshot AI · FAST'25</em></small></td><td>23,608 requests</td><td>Recorded serving traffic</td><td>KV-cache reuse &amp; scheduling research</td><td>Timed request records sampled from one hour of a real serving system (Kimi): timing, token counts, and prefix hashes only. The requests come from conversation and tool-agent workloads, but each is published as an independent record, with no session or dependency IDs. Shared prefixes stay visible across requests, so KV-cache reuse can be studied. Session and call-graph boundaries are lost.</td></tr><tr><td><a href="https://github.com/ai-dynamo/aiperf/blob/main/docs/benchmark-modes/trace-replay.md#large-baseten-parquet-traces" target="_blank" rel="noopener">Baseten Trace</a><br><small><em>Baseten</em></small></td><td>Not publicly stated</td><td>Recorded serving traffic</td><td>Large-scale serving / infra benchmarking</td><td>Baseten Parquet request rows grouped by session ID. Strongest here on KV-cache structure (block hashes and size) and timing. Nothing tool-shaped, since they replay <code>/v1/completions</code>. It ships as an AIPerf <a href="https://github.com/ai-dynamo/aiperf/blob/main/docs/tutorials/baseten-trace.md" target="_blank" rel="noopener">loader format</a>, with no published corpus: the replay schema is documented, but the trace's provenance and scale aren't publicly stated.</td></tr><tr><td><a href="https://huggingface.co/datasets/Exgentic/agent-llm-traces-v2" target="_blank" rel="noopener">Exgentic Agent LLM Traces v2</a><br><small><em>IBM</em></small></td><td>10,057 traces</td><td>Benchmark-generated</td><td>Cross-model / cross-scaffold agent comparison</td><td>OpenTelemetry spans following the GenAI semantic conventions, with full model request and response bodies, tool definitions, and request parameters. No prefix or cache signal, and tool calls live inside message content instead of in their own span. Covers many task domains: software engineering, web, customer care, and deep research.</td></tr></tbody></table>
<p>Disclosure: we build one of the datasets compared here, Exgentic's Agent LLM Traces, introduced in <a href="https://huggingface.co/blog/michalshmu/exgentic-agent-llm-traces-v2" target="_blank" rel="noopener">What Agents Do: A Large-Scale Public Dataset of Agent Runs</a>.</p>
<p>Each of these design choices reflects the dataset's intended use. WEKA and TraceLab hash content because they study which request patterns reach the server. Mooncake retains timing and prefix structure because KV-cache reuse is a scheduling problem whose behavior does not depend on message semantics. Exgentic fixes the task set because comparing models and scaffolds requires uniform workloads more than realistic ones.</p>
<p><strong>Origin</strong> matters more than it first seems because it also determines the privacy story. Traces rarely reveal where they came from, so that information must be known in advance. WEKA/AgentX, TraceLab, and Baseten are derived from real user activity. The first two remove content by design, while Mooncake publishes production traffic without message bodies. Exgentic and SWE-smith sit at the opposite extreme: both are entirely benchmark-generated. They are replayable by construction and contain no real user data, but they also reveal little about how people actually work.</p>
<p>The datasets differ most clearly in the <strong>content</strong> they retain. Exgentic and SWE-smith preserve full request and response bodies, whereas WEKA, TraceLab, and Mooncake retain only token counts, timing, and prefix structure. That choice is irreversible: text can be discarded later, but text that was never collected cannot be reconstructed. While this is appropriate for the infrastructure questions those systems target, it eliminates analyses that require semantic context, such as diagnosing agent failures or evaluating prompt changes. Token counts can show that a session was expensive, but not why.</p>
<p>The datasets also differ in their support for <strong>controlled comparison</strong>. Because Exgentic evaluates a fixed set of tasks, it can separate the effects of the model, scaffold, and task. Real-world usage datasets cannot, since each session follows a different trajectory. This advantage is not absolute, however: failed runs left some model-task combinations underrepresented, with trace counts ranging from roughly 300 in the smallest cell to more than 2,000 in the largest. Exgentic therefore enables controlled comparisons, but not always between equally sized groups.</p>
<p>Exgentic alone records two further fields. <strong>Tool definitions</strong> enumerate every tool available to the model, not just the one it selected, while <strong>request parameters</strong> capture settings such as temperature and max_tokens for each call. Most datasets record only what happened. These fields also record what could have happened, enabling counterfactual analyses such as whether a different temperature or an unused tool would have changed the outcome.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="what-each-dataset-actually-keeps">What each dataset actually keeps<a href="https://llm-d.ai/blog/from-agent-traces-to-replay#what-each-dataset-actually-keeps" class="hash-link" aria-label="Direct link to What each dataset actually keeps" title="Direct link to What each dataset actually keeps" translate="no">​</a></h2>
<p>The table above is the summary. Underneath it, each dataset is a specific set of fields, and the fields decide whether a question can be answered at all. In the diagram below, each box is a field. Each box lists the datasets that record that field, and a faded name means partial support. Click a dataset in the legend to highlight only the fields it has.</p>
<div style="width:min(840px, calc(100vw - 2rem));margin-left:50%;transform:translateX(-50%)"><iframe src="/img/blogs/trace-formats-comparison/schema-comparison.html" title="Interactive comparison of agent trace dataset schemas" scrolling="no" style="display:block;width:100%;height:600px;border:0"></iframe></div>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="from-a-trace-file-to-a-running-workload-the-replay-mechanisms">From a trace file to a running workload: the replay mechanisms<a href="https://llm-d.ai/blog/from-agent-traces-to-replay#from-a-trace-file-to-a-running-workload-the-replay-mechanisms" class="hash-link" aria-label="Direct link to From a trace file to a running workload: the replay mechanisms" title="Direct link to From a trace file to a running workload: the replay mechanisms" translate="no">​</a></h2>
<p>A trace format is only half of the practical story. To benchmark a serving stack, something has to turn the recording back into requests. Here, <em>replay</em> does not always mean resending the original bytes. Some replay paths preserve a session's dependency graph and feed each live model response into the next turn. Others preserve only arrival times, input and output lengths, or prefix-sharing relationships, and generate substitute payloads with the same serving shape. Those are both useful experiments, but they answer different questions.</p>
<table><thead><tr><th>Mechanism</th><th>Execution model</th><th>Scheduling</th><th>Payload construction</th><th>Target</th></tr></thead><tbody><tr><td><a href="https://github.com/kubernetes-sigs/inference-perf" target="_blank" rel="noopener">Inference-Perf</a></td><td>Builds a dependency graph for each session and releases calls as their predecessors complete</td><td>Controls session concurrency or start rate; dependency-relative waits can be capped</td><td>Uses recorded or reconstructed inputs and, where supported, substitutes live predecessor outputs. OTel replay can duplicate sessions and add cache-isolating markers.</td><td>A live inference endpoint through its chat API</td></tr><tr><td><a href="https://docs.nvidia.com/aiperf/latest/" target="_blank" rel="noopener">AIPerf</a></td><td>Converts each dataset through a format-specific adapter into conversations or independent requests</td><td>Supports recorded fixed schedules or closed-loop conversations, plus delay caps and concurrency controls</td><td>Uses recorded messages when present; otherwise synthesizes prompts from token lengths and cache-prefix information. Supports filtering, model rewriting, and cache isolation.</td><td>A live OpenAI-compatible inference endpoint</td></tr><tr><td><a href="https://github.com/vllm-project/guidellm/blob/main/docs/en/guides/trace_replay.md" target="_blank" rel="noopener">GuideLLM</a></td><td>Converts trace rows into independent requests or multi-turn conversations through a format-specific loader</td><td>Uses trace timestamps and conversation dependencies; supports time scaling, wait caps, and minimum session concurrency</td><td>Generates prompts from token lengths and hash IDs. Where supported, it models subagents and tool calls with supplied or built-in schemas and placeholder results.</td><td>A live OpenAI-compatible inference endpoint</td></tr><tr><td><a href="https://docs.vllm.ai/en/latest/cli/bench/serve/" target="_blank" rel="noopener">vLLM bench serve</a></td><td>Treats each timed-trace row as an independent request</td><td>Schedules requests from their timestamps; timestamp units are configurable</td><td>Deterministically expands hash IDs into shared token blocks up to the recorded input length; field names and block size are configurable</td><td>A live online-serving endpoint, commonly vLLM</td></tr><tr><td><a href="https://github.com/sgl-project/sglang/blob/main/docs/docs/developer_guide/bench_serving.mdx" target="_blank" rel="noopener">SGLang bench_serving</a></td><td>Treats each trace row as the start of a synthetic multi-round session</td><td>Can use trace timestamps, adjusted by a slowdown factor; the configured rounds within a session are emitted as a burst</td><td>Builds prompts from hash IDs, adds synthetic user turns and placeholder assistant responses, and uses a configurable output length</td><td>A supported live serving endpoint, including SGLang and OpenAI-compatible backends</td></tr><tr><td><a href="https://github.com/ai-dynamo/dynamo/blob/main/docs/fern/pages/cli/operations/simulation-with-dynosim/dynosim-replay.mdx" target="_blank" rel="noopener">NVIDIA DynoSim</a></td><td>Runs trace events through simulated engine cores in virtual time</td><td>Uses trace timestamps with a configurable speedup and stopping horizon</td><td>Maps token lengths and prefix hashes into a configurable model of workers, scheduling, KV capacity, routing, and aggregated or disaggregated serving</td><td>Simulated Dynamo engine cores, without HTTP or live workers</td></tr></tbody></table>
<p>Inference-Perf, AIPerf, GuideLLM, vLLM bench serve, and SGLang bench_serving drive live inference endpoints, but their format-specific loaders do not necessarily preserve the same parts of a trace. DynoSim instead evaluates a simulated serving topology. Compare results only where the replay target, preserved trace properties, and reported metric align.</p>
<p>That boundary matters when reading benchmark results. Request-level throughput from two endpoint load generators can be compared if model, hardware, concurrency, timing policy, and payload construction are aligned. It is not directly comparable to end-to-end session latency from a causal graph replay, which includes dependency and branch effects. Nor is either number directly comparable to a DynoSim prediction, where no model is decoding tokens. The mechanisms can share a source trace without measuring the same system.</p>
<table class="cmp"><thead><tr><th>Trace dataset</th><th>Replay mechanism</th><th>Dataset-specific replay</th><th>Documentation</th></tr></thead><tbody><tr><td rowspan="3" class="name">WEKA / AgentX</td><td>Inference-Perf</td><td>Reconstructs WEKA's parent-child turns, subagent branches, live-output flow, and recorded think-time gaps, subject to a configurable cap.</td><td><a href="https://github.com/kubernetes-sigs/inference-perf/blob/main/docs/weka_trace_replay.md" target="_blank" rel="noopener">Weka Trace Replay</a></td></tr><tr><td>AIPerf</td><td>Reconstructs WEKA's parent/subagent graph, infers flattened branches from hash-prefix and timing evidence, synthesizes cache-equivalent prompts, and follows recorded timing.</td><td><a href="https://docs.nvidia.com/aiperf/latest/tutorials/datasets-inputs/replay-weka-agentic-coding-traces" target="_blank" rel="noopener">Replay WEKA Agentic Coding Traces</a></td></tr><tr><td>GuideLLM</td><td>Preserves WEKA conversations and subagent spawn/join topology; tool-call turns use supplied or synthetic tool definitions and placeholder results.</td><td><a href="https://github.com/vllm-project/guidellm/blob/main/docs/en/guides/trace_replay.md#weka" target="_blank" rel="noopener">Trace Replay: WEKA</a></td></tr><tr><td class="name">TraceLab</td><td>AIPerf</td><td>Groups rounds into conversations, synthesizes prompts and prefix-block IDs from token counts, and heuristically attaches subagents by timing containment.</td><td><a href="https://docs.nvidia.com/aiperf/dev/tutorials/datasets-inputs/replay-trace-lab-agentic-coding-traces" target="_blank" rel="noopener">Replay TraceLab Agentic Coding Traces</a></td></tr><tr><td rowspan="5" class="name">Mooncake</td><td>AIPerf</td><td>Replays timestamps, token lengths, and optional hash IDs; it can instead send exact preformatted messages and tool definitions when a trace provides them.</td><td><a href="https://docs.nvidia.com/aiperf/latest/benchmark-modes/trace-replay-with-mooncake-traces" target="_blank" rel="noopener">Trace Replay with Mooncake Traces</a></td></tr><tr><td>GuideLLM</td><td>Replays each Mooncake row independently, preserving timestamp offsets, token lengths, and shared hash-ID prefixes with generated prompts.</td><td><a href="https://github.com/vllm-project/guidellm/blob/main/docs/en/guides/trace_replay.md#mooncake" target="_blank" rel="noopener">Trace Replay: Mooncake</a></td></tr><tr><td>vLLM bench serve</td><td>Schedules independent rows by timestamp and deterministically expands hash IDs into shared token blocks of the recorded input length.</td><td><a href="https://docs.vllm.ai/en/latest/benchmarking/cli/#running-moonshotai-traces" target="_blank" rel="noopener">Replay Timed Traces: Running MoonshotAI traces</a></td></tr><tr><td>SGLang bench_serving</td><td>Starts each record at its trace timestamp, builds a hash-derived prompt, and emits the configured number of synthetic conversation rounds as a burst.</td><td><a href="https://github.com/sgl-project/sglang/blob/main/docs/docs/developer_guide/bench_serving.mdx#9-evaluating-large-scale-kvcache-sharing-with-mooncake-trace-sglang-only" target="_blank" rel="noopener">Bench Serving: Mooncake</a>; <a href="https://github.com/sgl-project/sglang/blob/main/python/sglang/benchmark/datasets/mooncake.py" target="_blank" rel="noopener">Mooncake loader</a></td></tr><tr><td>NVIDIA DynoSim</td><td>Runs a Mooncake-format trace's timestamps and hash-block demand through simulated Dynamo engine cores to predict routing, scheduling, latency, and prefix-cache reuse.</td><td><a href="https://github.com/ai-dynamo/dynamo/blob/main/docs/fern/pages/cli/operations/simulation-with-dynosim/dynosim-replay.mdx#replay-a-saved-trace" target="_blank" rel="noopener">Run a DynoSim Simulation</a></td></tr><tr><td class="name">SWE-smith</td><td>SGLang bench_serving</td><td>Replays pre-built multi-turn agentic traces round by round via the <code>agentic-trace</code> dataset, feeding the server's live reply back into the next round's history. SWE-smith / OpenHands trajectories are the documented example; the trace JSON is supplied by the user.</td><td><a href="https://github.com/sgl-project/sglang/blob/main/docs/docs/developer_guide/bench_serving.mdx" target="_blank" rel="noopener">Bench Serving: agentic-trace</a></td></tr><tr><td class="name">Baseten Trace</td><td>AIPerf</td><td>Streams large Baseten Parquet traces in bounded batches via the <code>baseten_trace</code> loader, projecting only the columns each replay option needs and replaying recorded prompts without regenerating them.</td><td><a href="https://github.com/ai-dynamo/aiperf/blob/main/docs/benchmark-modes/trace-replay.md#large-baseten-parquet-traces" target="_blank" rel="noopener">Trace Replay: Baseten</a>, <a href="https://github.com/ai-dynamo/aiperf/blob/main/docs/tutorials/baseten-trace.md" target="_blank" rel="noopener">Baseten trace tutorial</a></td></tr><tr><td rowspan="2" class="name">Exgentic</td><td>Inference-Perf</td><td>Reconstructs Exgentic's OTel dependency graph and, by default, substitutes each live model response into downstream requests. It preserves shared-prefix and tool-call structure, using recorded tool-result messages rather than executing tools, and can duplicate sessions with cache-isolating markers.</td><td><a href="https://github.com/kubernetes-sigs/inference-perf/tree/main/workload-catalog/agentic-trace-replay" target="_blank" rel="noopener">Exgentic workload</a>; <a href="https://github.com/kubernetes-sigs/inference-perf/blob/main/docs/otel_trace_replay.md" target="_blank" rel="noopener">OTel Trace Replay</a></td></tr><tr><td>AIPerf</td><td>Sends self-contained recorded call snapshots, preserving messages, tool definitions, output limits, request controls, and start times. Fixed-schedule mode follows recorded offsets; closed-loop mode waits between calls, but neither mode feeds live responses into later requests. Recorded tool interactions are not executed.</td><td><a href="https://docs.nvidia.com/aiperf/latest/reference/benchmark-datasets#exgentic-agent-trace-replay" target="_blank" rel="noopener">Exgentic Agent Trace Replay</a></td></tr></tbody></table>
<p>Native loaders only, generic JSON/CSV conversion paths are excluded. These entries describe dataset-specific behavior, while the mechanism table above identifies each system under test.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="so-which-combination-do-you-actually-want">So which combination do you actually want?<a href="https://llm-d.ai/blog/from-agent-traces-to-replay#so-which-combination-do-you-actually-want" class="hash-link" aria-label="Direct link to So which combination do you actually want?" title="Direct link to So which combination do you actually want?" translate="no">​</a></h2>
<p>It depends on the stage. A serving feature moves from a proof of concept on a few GPUs to sizing, a pre-production gate and production. Each stage asks a different question, so the trace and the replay mechanism change with it. The table pairs them the way we use them in llm-d and in our own disaggregated serving fleet for agent workloads.</p>
<table><thead><tr><th>Stage</th><th>Question</th><th>What the trace must keep</th><th>Trace</th><th>Replay</th></tr></thead><tbody><tr><td>Proof of concept</td><td>Does the mechanism work, and by how much?</td><td>A controlled shape: input and output lengths, prefix sharing, concurrency.</td><td>Shared-prefix synthetic shapes; Mooncake hash-ID traces.</td><td>Inference-Perf for synthetic shapes; vLLM bench serve or AIPerf for Mooncake; DynoSim before the hardware exists.</td></tr><tr><td>Sizing</td><td>How much hardware, and where does throughput stop growing?</td><td>Session shape: prompts that grow turn by turn, subagent fan-out, gaps while tools run.</td><td>WEKA / AgentX.</td><td>AIPerf or Inference-Perf, swept across concurrency.</td></tr><tr><td>Pre-production</td><td>Does the full stack behave with real agent requests?</td><td>Content: messages, tool definitions, request parameters, and the dependency between calls.</td><td>Exgentic.</td><td>Inference-Perf's dependency-graph replay; functional checks on the release images; live agents.</td></tr><tr><td>Production</td><td>Is it still right, and what changed?</td><td>Live traffic, measured at the router and at the engines.</td><td>Live traffic (no trace).</td><td>Controlled load ramps through the same gateway, read against production metrics.</td></tr></tbody></table>
<p>Each row names the pairing we reach for first at that stage.</p>
<p><strong>Proof of concept.</strong> The point is to change one thing and see what it does, so everything else stays fixed. llm-d's guides run through <a href="https://github.com/llm-d/llm-d-benchmark" target="_blank" rel="noopener">llm-d-benchmark</a>, which drives Inference-Perf, AIPerf, GuideLLM or vLLM bench serve. The <a href="https://github.com/llm-d/llm-d/tree/main/guides/precise-prefix-cache-routing" target="_blank" rel="noopener">prefix-routing guide</a> uses an Inference-Perf shared-prefix synthetic workload, because routing only cares about which prefixes repeat. We test engine and routing changes the same way on a separate GLM-5.3 test deployment (H200, disaggregated prefill and decode): every run uses the same trace and concurrency, and a fresh random seed so it never reads another run's cache. Replaying WEKA / AgentX through AIPerf at 64 concurrent sessions, switching vLLM's decode <code>cudagraph_mode</code> from <code>FULL_DECODE_ONLY</code> to <code>FULL_AND_PIECEWISE</code> raised average per-request decode speed by 28% (one 15-minute run per setting).</p>
<p><strong>Sizing.</strong> How much hardware you need depends on how prompts grow over a session, how subagents fan out and how long tools run, so the trace needs real sessions. We replay WEKA / AgentX through AIPerf at rising concurrency, as llm-d's <a href="https://github.com/llm-d/llm-d/blob/main/guides/models/glm-5-2/README.md" target="_blank" rel="noopener">agentic-serving</a> and <a href="https://github.com/llm-d/llm-d/tree/main/guides/p2p-kv-cache-sharing/benchmarking" target="_blank" rel="noopener">P2P</a> guides do. Each session waits for its own responses, so at a given concurrency a slower system finishes fewer requests per second, and raising concurrency to recover throughput costs each user speed. That is why we compare systems on throughput per GPU against speed per user. Our production agent workloads reuse 92% of prompt tokens, and <a href="https://github.com/kubernetes-sigs/inference-perf/tree/main/workload-catalog/agentic-trace-replay" target="_blank" rel="noopener">Inference-Perf's catalog</a> measures Exgentic at about 91% (92% of its calls share a prefix with an earlier one). Sizing also depends on how the deployment is set up, so report the setup with the numbers: GPU type, how prefill and decode are split, parallelism, and where KV cache can live. With reuse this high, KV cache capacity decides how much of that reuse turns into cache hits. Offloading KV cache to CPU memory adds that memory to the cache. Without offloading, the same hit rate needs more GPU memory.</p>
<p><strong>Pre-production.</strong> Now the request content matters. Tool definitions and settings like reasoning effort change how a request turns into tokens, and so whether it hits the cache. Synthetic prompts have neither. By looking at real requests we found rendering issues whose fixes raised prompt reuse from 59% to 96%. Exgentic is the only corpus here that keeps tool definitions and request parameters, and Inference-Perf replays it the way an agent runs, feeding each response into the next call and <a href="https://github.com/kubernetes-sigs/inference-perf/blob/main/docs/otel_trace_replay.md" target="_blank" rel="noopener">keeping the recorded gaps between calls</a>, capped at 15 s by default.</p>
<p>We also ran 500 of our own agents for an hour next to interactive users, to check priority and fairness. Live agents behave like the real thing, but no two runs are the same. Exgentic sits in between: real agent runs on fixed tasks that can be replayed as often as needed.</p>
<p><strong>Production.</strong> Live traffic is the benchmark here, since no trace matches it. We watch latency and throughput per tenant, compare each release with the one before, and ramp up synthetic agent sessions through the same gateway to see how much headroom is left.</p>
<p><strong>The practical check before any run:</strong> understand what the trace was designed to represent and exactly how the harness replays it. Otherwise, you can run a perfectly valid benchmark that does not measure the behavior you actually care about.</p>
<p>Put together, benchmarking moves from cheap, controlled shapes early on to real agent content close to release, and what production shows feeds the next round. Synthetic and hash-based traces keep the early stages fast and repeatable, and agent traces with full content, like Exgentic replayed through Inference-Perf, cover the last check before a change reaches users.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="where-to-get-them">Where to get them<a href="https://llm-d.ai/blog/from-agent-traces-to-replay#where-to-get-them" class="hash-link" aria-label="Direct link to Where to get them" title="Direct link to Where to get them" translate="no">​</a></h2>
<p>Most are public today: <a href="https://huggingface.co/datasets/Exgentic/agent-llm-traces-v2" target="_blank" rel="noopener">Exgentic Agent LLM Traces v2</a>, <a href="https://huggingface.co/datasets/semianalysisai/cc-traces-weka-with-subagents-060826" target="_blank" rel="noopener">WEKA / AgentX</a>, and <a href="https://huggingface.co/datasets/SWE-bench/SWE-smith-trajectories" target="_blank" rel="noopener">SWE-smith</a> on HuggingFace, and <a href="https://github.com/uw-syfi/TraceLab" target="_blank" rel="noopener">TraceLab</a> and <a href="https://github.com/kvcache-ai/Mooncake" target="_blank" rel="noopener">Mooncake</a> on GitHub. Baseten Trace ships as an <a href="https://github.com/ai-dynamo/aiperf/blob/main/docs/benchmark-modes/trace-replay.md#large-baseten-parquet-traces" target="_blank" rel="noopener">AIPerf loader format</a> rather than a published corpus.</p>
<p>This post covered what each dataset lets you learn: which questions it can and can't answer, given what it keeps. A separate question is <em>how</em> the underlying sessions came to exist: generated from a benchmark, like Exgentic and SWE-smith, or recorded from real usage, like WEKA/AgentX, TraceLab, and Mooncake. That changes what a dataset can honestly claim about the behavior in its traces, however much each trace captures. It deserves its own post, coming next.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Serving Moonshot AI's Kimi K3.1 Pro with llm-d across TPUs and GPUs]]></title>
            <link>https://llm-d.ai/blog/deploy-kimi-k3-1-pro-with-llm-d</link>
            <guid>https://llm-d.ai/blog/deploy-kimi-k3-1-pro-with-llm-d</guid>
            <pubDate>Wed, 04 Nov 2026 09:00:00 GMT</pubDate>
            <description><![CDATA[Day-0 distributed serving recipes for Moonshot AI's 2.8T-parameter Kimi K3.1 Pro at 1M context using llm-d across Ironwood TPU v7x (SGLang) and NVIDIA GB300 GPUs (vLLM), on Google Cloud.]]></description>
            <content:encoded><![CDATA[<p>Running multi-trillion-parameter Mixture-of-Experts (MoE) models in production shifts the primary engineering bottleneck from model weights to distributed systems orchestration. With <strong>Moonshot AI's Kimi K3.1 Pro</strong> (<code>moonshotai/Kimi-K3.1-Pro</code>), infrastructure engineers must accommodate a <strong>~2.8-trillion-parameter footprint</strong> (~104B active parameters per token across 896 routed experts), a <strong>1M-token context window</strong>, and a hybrid 93-layer attention stack (69 Kimi Delta Attention layers paired with 24 Gated Multi-head Latent Attention layers).</p>
<p>At this footprint, the model weights alone surpass the High-Bandwidth Memory (HBM) capacity of any single machine, requiring multi-node Tensor and Expert Parallelism across high-bandwidth interconnects. Compounding the hardware footprint, long-horizon agentic sessions expose the limits of stateless Kubernetes load balancing: 1M-token KV caches rapidly exhaust accelerator HBM, uncoordinated routing forces replicas to recompute identical multi-turn prefixes, and compute-heavy prefill bursts stall ongoing token generation.</p>
<p>To eliminate these bottlenecks at launch, we worked with <strong>Inferact</strong> (vLLM) and <strong>RadixArk</strong> (SGLang) to deliver Day-0 distributed serving recipes on <strong>llm-d</strong>. Running <strong>llm-d</strong> as a unified, Kubernetes-native inference control plane, the same stack serves Kimi K3.1 Pro across both <strong>TPUs</strong> (<strong>Ironwood TPU v7x</strong>) and <strong>NVIDIA GPUs</strong> (<strong>GB300 NVL72</strong>), here on Google Cloud (<strong>A4X-Max</strong>). Because the control plane is accelerator- and cloud-independent, platform teams gain a portable serving stack that handles state-aware KV routing, hierarchical memory offloading, and prefill/decode disaggregation out of the box.</p>
<div class="theme-admonition theme-admonition-note admonition_xJq3 alert alert--secondary"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>note</div><div class="admonitionContent_BuS1"><p>These recipes run here on Google Cloud (GKE), but llm-d's routing, scheduling, and disaggregation layer is accelerator- and cloud-independent. The same configuration pattern applies on other accelerators and clouds; only the device-allocation and KV-transfer connectors change.</p></div></div>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="architectural-blueprint-how-llm-d-serves-kimi-k31-pro">Architectural Blueprint: How <code>llm-d</code> Serves Kimi K3.1 Pro<a href="https://llm-d.ai/blog/deploy-kimi-k3-1-pro-with-llm-d#architectural-blueprint-how-llm-d-serves-kimi-k31-pro" class="hash-link" aria-label="Direct link to architectural-blueprint-how-llm-d-serves-kimi-k31-pro" title="Direct link to architectural-blueprint-how-llm-d-serves-kimi-k31-pro" translate="no">​</a></h2>
<p>To sustain high concurrency across Kimi K3.1 Pro's ~2.8T total parameters and 1M context length (<code>max_position_embeddings=1048576</code>) without restarting servers or reloading weights as traffic fluctuates, our Day-0 recipes combine <strong>vLLM</strong> and <strong>SGLang</strong> base engines with four core capabilities in <strong>llm-d</strong> (<code>v0.10.0+</code> agentic-serving):</p>
<ul>
<li class=""><strong>State-Aware KV Routing (<code>llm-d-router</code>):</strong> Each multi-node worker replica streams real-time ZMQ KV cache events (<code>kv-events-config</code>) to the <code>llm-d</code> Endpoint Picker (<code>epp</code>). Using a weighted composite of <code>prefix-cache-affinity-filter</code> with <code>token-load-scorer</code>, the scheduler pins multi-turn agentic trajectories to the exact replicas holding their warm KV blocks while making sure there is no hotspotting by following a sticky until saturated policy for routing.</li>
<li class=""><strong>Hierarchical KV Cache Tiering (HBM -&gt; Host DRAM):</strong> To reserve scarce HBM for model weights and active attention states, evicted KV blocks spill over into host CPU memory (Grace LPDDR5X DRAM on GB300 or host DRAM on Ironwood TPU v7x) using <code>CPUOffloadingSpec</code>, vLLM's native KV offloading connector, or SGLang's HiCache.</li>
<li class=""><strong>Prefill/Decode (P/D) Disaggregation:</strong> When long-context prompt bursts threaten to degrade token generation interactivity, <code>llm-d</code> supports splitting prefill and decode pools into dedicated topologies (such as <code>3P1D</code>) so heavy prefill compute is isolated from decode memory bandwidth, combined with tensor parallelism (TP=16) and expert parallelism (EP=8) to sustain interactivity under long-context bursts across GPUs and TPUs.</li>
<li class=""><strong>Speculative Decoding:</strong> Native configuration support for Multi-Token Prediction (MTP) and speculative drafter checkpoints (such as <code>NEXTN</code> / <code>DFlash2</code>) to accelerate multi-token decoding.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="deploying-kimi-k31-pro-with-llm-d-on-gke">Deploying Kimi K3.1 Pro with llm-d on GKE<a href="https://llm-d.ai/blog/deploy-kimi-k3-1-pro-with-llm-d#deploying-kimi-k31-pro-with-llm-d-on-gke" class="hash-link" aria-label="Direct link to Deploying Kimi K3.1 Pro with llm-d on GKE" title="Direct link to Deploying Kimi K3.1 Pro with llm-d on GKE" translate="no">​</a></h2>
<p>Both the GPU (<code>vLLM</code>) and TPU (<code>SGLang</code>) configurations live in the unified <a href="https://llm-d.ai/docs/dev/well-lit-paths/models/kimi-k3-1" target="_blank" rel="noopener noreferrer" class=""><code>kimi-k3-1</code> Well-Lit Path</a> model recipe (<code>guides/models/kimi-k3-1</code>). Rather than maintaining standalone YAML manifests, clone the <a href="https://github.com/llm-d/llm-d" target="_blank" rel="noopener noreferrer" class=""><code>llm-d</code> repository</a>, initialize <code>GUIDE_NAME=kimi-k3-1</code> with <code>source guides/env.sh</code>, and deploy using composable Helm router values and Kustomize overlays.</p>
<blockquote>
<p><strong>License Note:</strong> Before downloading or deploying <code>moonshotai/Kimi-K3.1-Pro</code>, review the <a href="https://huggingface.co/moonshotai/Kimi-K3.1-Pro/blob/main/LICENSE" target="_blank" rel="noopener noreferrer" class="">official model license</a> on Hugging Face to ensure your usage complies with all applicable conditions.</p>
</blockquote>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="1-prepare-gke-prerequisites--stage-the-156-tb-checkpoint">1. Prepare GKE Prerequisites &amp; Stage the 1.56 TB Checkpoint<a href="https://llm-d.ai/blog/deploy-kimi-k3-1-pro-with-llm-d#1-prepare-gke-prerequisites--stage-the-156-tb-checkpoint" class="hash-link" aria-label="Direct link to 1. Prepare GKE Prerequisites &amp; Stage the 1.56 TB Checkpoint" title="Direct link to 1. Prepare GKE Prerequisites &amp; Stage the 1.56 TB Checkpoint" translate="no">​</a></h3>
<ul>
<li class=""><strong>Cluster, Networking &amp; CRDs:</strong> Follow the <a href="https://llm-d.ai/docs/dev/well-lit-paths/models/kimi-k3-1#prerequisites" target="_blank" rel="noopener noreferrer" class=""><code>kimi-k3-1</code> Prerequisites</a> and <a href="https://llm-d.ai/docs/dev/infrastructure/providers/gke" target="_blank" rel="noopener noreferrer" class="">GKE Provider Guide</a> to provision either multi-node GPU pools (A4X-Max GB300 NVL72 with NVIDIA DRA <code>ComputeDomain</code> and DRANet RDMA) or two Ironwood TPU v7x (<code>tpu7x</code> <code>2x2x4</code>, 4 hosts × 4 chips each, ~800 GiB host RAM/node, Workload Identity) node pools. Install the Gateway API Inference Extension (<code>v1</code>) CRDs, the <a href="https://llm-d.ai/docs/dev/infrastructure/model-server-orchestration" target="_blank" rel="noopener noreferrer" class="">LeaderWorkerSet controller</a> (<code>v0.11.1+</code>, passing <code>--set enableDisaggregatedSet=true</code> for GPU P/D), and the <a href="https://github.com/llm-d/llm-d/blob/main/helpers/hf-token.md" target="_blank" rel="noopener noreferrer" class=""><code>llm-d-hf-token</code> secret</a>.</li>
<li class=""><strong>One-Time Checkpoint Staging:</strong> At 1.56 TB (MXFP4 experts), Kimi K3.1 Pro exceeds standard node boot disks. Follow <a href="https://llm-d.ai/docs/dev/well-lit-paths/models/kimi-k3-1#stage-the-weights" target="_blank" rel="noopener noreferrer" class="">Stage the Weights</a> to copy the checkpoint once into a regional GCS bucket and hydrate a <code>ReadOnlyMany</code> <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/hyperdisk-ml" target="_blank" rel="noopener noreferrer" class="">Hyperdisk ML</a> PVC (<code>kimi-k3-1-models</code>, mounted at <code>/models</code>) via the GKE Volume Populator.</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="2-deploy-the-llm-d-router">2. Deploy the llm-d Router<a href="https://llm-d.ai/blog/deploy-kimi-k3-1-pro-with-llm-d#2-deploy-the-llm-d-router" class="hash-link" aria-label="Direct link to 2. Deploy the llm-d Router" title="Direct link to 2. Deploy the llm-d Router" translate="no">​</a></h3>
<ul>
<li class=""><strong>Helm Installation:</strong> Follow <a href="https://llm-d.ai/docs/dev/well-lit-paths/models/kimi-k3-1#1-deploy-the-llm-d-router" target="_blank" rel="noopener noreferrer" class="">1. Deploy the llm-d Router</a> and the shared <a href="https://github.com/llm-d/llm-d/blob/main/guides/recipes/router/README.md" target="_blank" rel="noopener noreferrer" class="">Router Recipes</a> to install <code>ROUTER_STANDALONE_CHART</code> (or <code>ROUTER_GATEWAY_CHART</code> with <code>--set provider.name=gke</code>), layering <code>guides/recipes/router/base.values.yaml</code>, optional <a href="https://github.com/llm-d/llm-d/blob/main/guides/recipes/router/features/monitoring-gke.values.yaml" target="_blank" rel="noopener noreferrer" class="">GKE Managed Prometheus monitoring</a>, and your track's override file from <a href="https://github.com/llm-d/llm-d/tree/main/guides/models/kimi-k3-1/router" target="_blank" rel="noopener noreferrer" class=""><code>guides/models/kimi-k3-1/router/</code></a>.</li>
<li class=""><strong>Session- &amp; Load-Aware Scheduling:</strong> Both tracks use <code>approx-prefix-cache-producer</code> (with <code>autoTune: false</code> and <code>lruCapacityPerServer</code> sized across both HBM and host-DRAM offload pools), <code>prefix-cache-affinity-filter</code> (gated by <code>peakPrefillThroughput</code> from the <a href="https://github.com/llm-d/llm-d/blob/main/guides/recipes/router/calibration/README.md" target="_blank" rel="noopener noreferrer" class="">router calibration tool</a>), and <code>token-load-scorer</code> on a single EPP replica for exact in-flight token accounting.</li>
<li class=""><strong>TPU Unified vs. GPU P/D Profiles:</strong> On TPU, <a href="https://github.com/llm-d/llm-d/blob/main/guides/models/kimi-k3-1/router/kimi-k3-1.values.yaml" target="_blank" rel="noopener noreferrer" class=""><code>router/kimi-k3-1.values.yaml</code></a> sets <code>modelServers.type: sglang</code> (<code>blockSizeTokens: 128</code>) and routes directly to rank-0 leader pods. On GPU, the P/D router values in the same <a href="https://github.com/llm-d/llm-d/tree/main/guides/models/kimi-k3-1/router" target="_blank" rel="noopener noreferrer" class=""><code>router/</code></a> directory pair that same HBM+CPU prefix-affinity and token-load profile on <code>prefill</code> with <code>always-disagg-pd-decider</code> and <code>active-request-scorer</code> on <code>decode</code>.</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="3-deploy-the-gpu-vllm-pd-or-tpu-sglang-model-server">3. Deploy the GPU (vLLM P/D) or TPU (SGLang) Model Server<a href="https://llm-d.ai/blog/deploy-kimi-k3-1-pro-with-llm-d#3-deploy-the-gpu-vllm-pd-or-tpu-sglang-model-server" class="hash-link" aria-label="Direct link to 3. Deploy the GPU (vLLM P/D) or TPU (SGLang) Model Server" title="Direct link to 3. Deploy the GPU (vLLM P/D) or TPU (SGLang) Model Server" translate="no">​</a></h3>
<p>Follow <a href="https://llm-d.ai/docs/dev/well-lit-paths/models/kimi-k3-1#2-deploy-the-model-server" target="_blank" rel="noopener noreferrer" class="">2. Deploy the Model Server</a> and apply the Kustomize overlay for your accelerator track under <a href="https://github.com/llm-d/llm-d/tree/main/guides/models/kimi-k3-1/modelserver" target="_blank" rel="noopener noreferrer" class=""><code>guides/models/kimi-k3-1/modelserver/</code></a> (<code>kubectl apply -n ${NAMESPACE} -k guides/models/kimi-k3-1/modelserver/${ACCELERATOR_TYPE}/${MODEL_SERVER}/</code>):</p>
<ul>
<li class=""><strong>GPU Track — vLLM 3P1D + Tiered KV Offloading (<code>gpu/vllm</code>):</strong> Composes the <a href="https://llm-d.ai/docs/dev/well-lit-paths/foundations/wide-expert-parallelism" target="_blank" rel="noopener noreferrer" class="">Wide-EP</a>, <a href="https://llm-d.ai/docs/dev/well-lit-paths/foundations/pd-disaggregation" target="_blank" rel="noopener noreferrer" class="">P/D Disaggregation</a>, and <a href="https://llm-d.ai/docs/dev/well-lit-paths/foundations/tiered-prefix-cache" target="_blank" rel="noopener noreferrer" class="">Tiered Prefix Cache</a> foundations into a <code>3P1D</code> <code>DisaggregatedSet</code> (3 multi-node prefill <code>LeaderWorkerSet</code> groups + 1 decode group over Multi-Node NVLink and GKE DRANet RDMA). <code>MultiConnector</code> pairs <code>NixlConnector</code> for P/D KV transfer with native HMA-aware <code>OffloadingConnector</code> across Grace LPDDR5X DRAM.</li>
<li class=""><strong>TPU Track — SGLang 2 × (TP=32, EP=8) on 32 TPU v7x Chips (<code>tpu/sglang</code>):</strong> Deploys <a href="https://github.com/llm-d/llm-d/tree/main/guides/models/kimi-k3-1/modelserver/tpu/sglang" target="_blank" rel="noopener noreferrer" class=""><code>modelserver/tpu/sglang</code></a> as 2 <code>LeaderWorkerSet</code> replicas (4 pods each across two <code>tpu7x</code> <code>2x2x4</code> slices = 32 chips / 64 TensorCores total) running SGLang on Torch TPU at <code>TP=32 × EP=8</code> with sparse-MLA (<code>pallas_tpu_mla_sparse</code>), FP8 KV cache (480K context), <code>kimi_k3</code> reasoning parsing, and <strong>HiCache host-DRAM offloading</strong> (<code>--hicache-io-backend=raiden --hicache-ratio=2</code>, 2× HBM capacity) over TPU Sync for both sparse-MLA/DSA pages and KDA recurrent states.</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="4-verify--load-test">4. Verify &amp; Load-Test<a href="https://llm-d.ai/blog/deploy-kimi-k3-1-pro-with-llm-d#4-verify--load-test" class="hash-link" aria-label="Direct link to 4. Verify &amp; Load-Test" title="Direct link to 4. Verify &amp; Load-Test" translate="no">​</a></h3>
<p>Once the <code>DisaggregatedSet</code> or <code>LeaderWorkerSet</code> reports <code>Available</code>, run the smoke check in <a href="https://llm-d.ai/docs/dev/well-lit-paths/models/kimi-k3-1#verification" target="_blank" rel="noopener noreferrer" class="">Verification</a> against the <code>kimi-k3-1-epp</code> service (or GKE Gateway IP) to confirm end-to-end generation, HBM + host-DRAM prefix-cache hits, and P/D KV transfer. To replay multi-turn long-context sessions, apply the guide's <a href="https://github.com/llm-d/llm-d/blob/main/guides/models/kimi-k3-1/inference-perf.yaml" target="_blank" rel="noopener noreferrer" class=""><code>inference-perf.yaml</code></a> job preset as documented in <a href="https://llm-d.ai/docs/dev/well-lit-paths/models/kimi-k3-1#benchmarking" target="_blank" rel="noopener noreferrer" class="">Benchmarking</a>.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="access-the-day-0-recipes">Access the Day-0 recipes<a href="https://llm-d.ai/blog/deploy-kimi-k3-1-pro-with-llm-d#access-the-day-0-recipes" class="hash-link" aria-label="Direct link to Access the Day-0 recipes" title="Direct link to Access the Day-0 recipes" translate="no">​</a></h2>
<p>Explore the complete configuration guides and deployment manifests in our open-source repositories:</p>
<ul>
<li class=""><strong>llm-d Agentic Serving &amp; Multi-Tier KV Guides:</strong> <a href="https://llm-d.ai/docs/dev/well-lit-paths/models/kimi-k3-1" target="_blank" rel="noopener noreferrer" class="">https://llm-d.ai/docs/dev/well-lit-paths/models/kimi-k3-1</a></li>
<li class=""><strong>vLLM &amp; SGLang Kimi K3.1 Pro Recipes:</strong>
<ul>
<li class=""><strong>vLLM:</strong> <a href="https://github.com/vllm-project/vllm-torchtpu/tree/kimi-k31pro" target="_blank" rel="noopener noreferrer" class="">https://github.com/vllm-project/vllm-torchtpu/tree/kimi-k31pro</a></li>
<li class=""><strong>SGLang:</strong> <a href="https://docs.sglang.io/cookbook/autoregressive/Moonshotai/Kimi-K3.1-Pro" target="_blank" rel="noopener noreferrer" class="">https://docs.sglang.io/cookbook/autoregressive/Moonshotai/Kimi-K3.1-Pro</a></li>
</ul>
</li>
<li class=""><strong>Google Cloud TPU Recipes (Ironwood TPU v7x):</strong> <a href="https://github.com/AI-Hypercomputer/tpu-recipes" target="_blank" rel="noopener noreferrer" class="">https://github.com/AI-Hypercomputer/tpu-recipes</a></li>
<li class=""><strong>Google Cloud GPU Recipes (A4X-Max GB300):</strong> <a href="https://github.com/AI-Hypercomputer/gpu-recipes" target="_blank" rel="noopener noreferrer" class="">https://github.com/AI-Hypercomputer/gpu-recipes</a></li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="whats-next">What's next<a href="https://llm-d.ai/blog/deploy-kimi-k3-1-pro-with-llm-d#whats-next" class="hash-link" aria-label="Direct link to What's next" title="Direct link to What's next" translate="no">​</a></h2>
<p>We are expanding the library of model-centric well-lit paths and broadening accelerator and cloud coverage for multi-trillion-parameter MoE serving. Expect more Day-0 recipes, tighter P/D and wide-EP integration, and additional KV-offload backends.</p>
<p>If you are serving frontier models in production, come build with us:</p>
<ul>
<li class=""><strong>Slack:</strong> <a href="https://llm-d.ai/slack" target="_blank" rel="noopener noreferrer" class="">llm-d.ai/slack</a></li>
<li class=""><strong>GitHub:</strong> <a href="https://github.com/llm-d" target="_blank" rel="noopener noreferrer" class="">github.com/llm-d</a></li>
<li class=""><strong>Community call:</strong> <a href="https://red.ht/llm-d-public-calendar" target="_blank" rel="noopener noreferrer" class="">every Wednesday at 12:30pm ET</a></li>
<li class=""><strong>Follow along:</strong> on <a href="https://x.com/_llm_d_" target="_blank" rel="noopener noreferrer" class="">X</a>, <a href="https://bsky.app/profile/llm-d.ai" target="_blank" rel="noopener noreferrer" class="">Bluesky</a>, <a href="https://www.linkedin.com/company/llm-d" target="_blank" rel="noopener noreferrer" class="">LinkedIn</a>, and <a href="https://www.youtube.com/@llm-d-project" target="_blank" rel="noopener noreferrer" class="">YouTube</a></li>
</ul>
<p>Come build with us.</p>]]></content:encoded>
            <category>blog posts</category>
            <category>Inference</category>
            <category>Agentic Inference</category>
            <category>KV Cache</category>
            <category>Disaggregation</category>
            <category>Heterogeneous</category>
            <category>vLLM</category>
            <category>SGLang</category>
        </item>
        <item>
            <title><![CDATA[Code Assistant Skills for Accelerated llm-d Development, Evaluation and Configuration]]></title>
            <link>https://llm-d.ai/blog/skills-for-accelerated-llm-d-development-evaluation-and-configuration</link>
            <guid>https://llm-d.ai/blog/skills-for-accelerated-llm-d-development-evaluation-and-configuration</guid>
            <pubDate>Sun, 01 Nov 2026 09:00:00 GMT</pubDate>
            <description><![CDATA[Reusable skills help coding assistants configure, deploy, and benchmark llm-d using existing tools and operational guidance.]]></description>
            <content:encoded><![CDATA[<p>Inference serving stacks such as llm-d are responsible for a wide range of sophisticated tasks, including request scheduling and batching, KV cache and memory management, multi-GPU execution, prefill/decode optimization, fault tolerance, autoscaling, and many others. Together, these responsibilities expose a vast configuration space that governs the behavior and performance of the serving system. At the same time, inference stacks are deployed under highly diverse operating conditions, varying in the models being served, the available hardware resources, and the characteristics of incoming workloads. As a result, practitioners must navigate a complex configuration process, where identifying effective parameter settings for a particular deployment often requires substantial expertise and iterative experimentation. This combination of extensive configurability and heterogeneous deployment environments creates a significant evaluation challenge: developers must reason about the interactions between numerous configuration parameters while ensuring that experimental results remain meaningful and comparable.</p>
<p>The challenge extends well beyond configuration alone. Modern inference serving stacks evolve rapidly, with frequent code changes driven by active development and increasingly accelerated by AI-assisted programming workflows. As the software evolves, configuration options become deprecated, new features are introduced, interfaces and deployment mechanisms change, and entire implementation technologies may be replaced. Under these conditions, designing reliable and reproducible performance evaluations becomes exceptionally difficult. Evaluating a continuously evolving serving stack is akin to trying to hit a moving target: the system under study is constantly changing, requiring evaluation methodologies that are both robust to software evolution and adaptable to emerging capabilities.</p>
<h1>llm-d skills for reliable and accelerated configuration and evaluation</h1>
<p>To address these challenges, we leverage code assistant skills to automate llm-d configuration and evaluation. Rather than relying on rigid automation scripts, we use skills as the primary abstraction for orchestrating existing llm-d tooling, code, and documentation. This allows the evaluation workflow to remain both structured and adaptable as the serving stack evolves. Considering that code assistants are themselves evolving into “super harnesses” capable of orchestrating increasingly sophisticated benchmarking and evaluation workflows, these skills can serve as modular building blocks that super harnesses can compose and invoke as needed.</p>
<p>We provide a collection of reusable skills that automate common operational tasks and support different stages of the llm-d lifecycle. These skills can be broadly divided into those intended for users deploying and evaluating llm-d, and those intended for developers extending or optimizing the serving stack.</p>
<p>User-supporting skills include:</p>
<ul>
<li class=""><a href="https://github.com/llm-d-incubation/llm-d-skills/tree/main/skills/deploy-llm-d" target="_blank" rel="noopener noreferrer" class="">deploy-llm-d</a>: Deploys an llm-d stack on an existing Kubernetes or OpenShift cluster using the Well-Lit Path guides and deployment variants.</li>
<li class=""><a href="https://github.com/llm-d-incubation/llm-d-skills/tree/main/skills/teardown-llm-d" target="_blank" rel="noopener noreferrer" class="">teardown-llm-d</a>: Removes an llm-d deployment and cleans up the associated Helm/Kustomize resources.</li>
<li class=""><a href="https://github.com/llm-d-incubation/llm-d-skills/tree/main/skills/create-gke-infra-llm-d" target="_blank" rel="noopener noreferrer" class="">create-gke-infra-llm-d</a>: Provisions a Google Kubernetes Engine cluster with the GPU networking, node pools, and Gateway API prerequisites required for llm-d.</li>
<li class=""><a href="https://github.com/llm-d-incubation/llm-d-skills/tree/main/skills/configure-wva-autoscaling-llm-d" target="_blank" rel="noopener noreferrer" class="">configure-wva-autoscaling-llm-d</a>: Configures the Workload Variant Autoscaler (WVA) and generates reusable deployment scripts.</li>
<li class=""><a href="https://github.com/llm-d-incubation/llm-d-skills/tree/main/autoconfig" target="_blank" rel="noopener noreferrer" class="">llm-d-autoconfig</a>: Collects workload requirements and SLA constraints to generate deployment recommendations and, optionally, deploy and benchmark the recommended configuration.</li>
</ul>
<p>Developer-supporting skills include:</p>
<ul>
<li class=""><a href="https://github.com/llm-d-incubation/llm-d-skills/tree/main/skills/run-llm-d-benchmark" target="_blank" rel="noopener noreferrer" class="">run-llm-d-benchmark</a>: Executes benchmark workloads against a deployed llm-d stack to collect performance metrics.</li>
<li class=""><a href="https://github.com/llm-d-incubation/llm-d-skills/tree/main/skills/compare-llm-d-configurations" target="_blank" rel="noopener noreferrer" class="">compare-llm-d-configurations</a>: Automates A/B evaluation by deploying, benchmarking, tearing down, and comparing multiple llm-d configurations.</li>
<li class=""><a href="https://github.com/llm-d-incubation/llm-d-skills/tree/main/skills/clear-kv-cache-tiers-in-llm-d-deployment" target="_blank" rel="noopener noreferrer" class="">clear-kv-cache-tiers-in-llm-d-deployment</a>: Clears KV cache state across GPU, CPU, and filesystem offload tiers without disrupting API availability, enabling repeatable experiments.</li>
</ul>
<p>The complete collection of available skills is maintained in the <a href="https://github.com/llm-d-incubation/llm-d-skills" target="_blank" rel="noopener noreferrer" class="">llm-d Skills repository</a>.</p>
<p><img decoding="async" loading="lazy" alt="Single-purpose skills flow diagram" src="https://llm-d.ai/assets/images/skills-single-purpose-flow-dc6bc5c81e26e9a9cf5a2f46037957dc.webp" width="1720" height="1100" class="img_ev3q">
<em>Single-purpose skills are dedicated to a single task, drawing on the llm-d guides and benchmark tooling, falling back to a troubleshooting KB when a step fails, and applying the result to your cluster.</em></p>
<p><img decoding="async" loading="lazy" alt="llm-d-autoconfig flow diagram" src="https://llm-d.ai/assets/images/skills-autoconfig-flow-be65915e0f9731d5b7c17a28ad48bd63.webp" width="1800" height="1650" class="img_ev3q">
<em>llm-d-autoconfig helps choose the configuration itself. It probes your cluster and works through a discovery questionnaire, then fetches and cites the same llm-d guides live to ground a recommendation before rendering it into a deploy bundle, which it can optionally deploy and benchmark for you.</em></p>
<h1>Skills in practice</h1>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="diverse-llm-d-benchmarking-at-scale">Diverse llm-d benchmarking at scale<a href="https://llm-d.ai/blog/skills-for-accelerated-llm-d-development-evaluation-and-configuration#diverse-llm-d-benchmarking-at-scale" class="hash-link" aria-label="Direct link to Diverse llm-d benchmarking at scale" title="Direct link to Diverse llm-d benchmarking at scale" translate="no">​</a></h2>
<p>Over the course of three months, from May through July 2026, llm-d Skills powered a large-scale benchmarking campaign in which human intervention was mostly limited to approving deployments and interpreting results. During this period, we executed approximately 170 two-way and three-way comparison experiments, comprising more than 350 individual benchmark runs across different models, hardware, and software stack configurations.</p>
<p>The evaluation covered a broad spectrum of llm-d capabilities, including routing scorer heuristics, precise prefix cache-aware routing, multi-tier KV cache offloading with different eviction policies, and prefill/decode disaggregation using both vLLM and SGLang. The experiments also exercised a wide variety of workloads, ranging from synthetic benchmarks to traces from the <a href="https://github.com/kubernetes-sigs/inference-perf/tree/main/workload-catalog" target="_blank" rel="noopener noreferrer" class="">inference-perf workload catalog</a>, as well as agentic trace replay.</p>
<p>Beyond automating benchmark execution and enabling efficient exploration of the large configuration space, the skill-empowered code assistants proved remarkably resilient to the rapid evolution of the llm-d ecosystem that occurred during the benchmarking period. They seamlessly navigated non-backward-compatible changes across multiple vLLM releases, and accommodated major architectural transitions—including the migration from Helm-based deployments to Kustomize and the substantial refactoring of the llm-d-benchmark CLI. Crucially, <em><strong>this benchmarking campaign would not have been feasible at this scale or pace without the skills capturing operational knowledge and best practices as they emerged.</strong></em> By encoding deployment procedures, troubleshooting guidance, and lessons learned from previous experiments, the skills enabled the automation to continuously adapt to a rapidly evolving software ecosystem while shielding users from much of its underlying complexity. This accumulation of knowledge made it possible to sustain hundreds of benchmark runs despite the constant evolution of the llm-d stack.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="from-workload-requirements-to-a-deployable-configuration-with-llm-d-autoconfig">From workload requirements to a deployable configuration with llm-d-autoconfig<a href="https://llm-d.ai/blog/skills-for-accelerated-llm-d-development-evaluation-and-configuration#from-workload-requirements-to-a-deployable-configuration-with-llm-d-autoconfig" class="hash-link" aria-label="Direct link to From workload requirements to a deployable configuration with llm-d-autoconfig" title="Direct link to From workload requirements to a deployable configuration with llm-d-autoconfig" translate="no">​</a></h2>
<p>While the benchmarking demonstrates the value of skills for evaluating configurations, the llm-d-autoconfig skill addresses the question that comes first: which configuration should be deployed in the first place? Choosing an Endpoint Picker (EPP) scheduler configuration for llm-d-router means selecting from a catalog of roughly 30 plugins, assigning weights, and wiring the result into chart values, a process that normally requires reading through several guides to even begin iterating on the right config for you.</p>
<p>Autoconfig turns this into a guided workflow, starting with a cluster discovery scan and then walking the user through a questionnaire covering the model, topology, SLAs, and workload shape. It builds its recommendation by fetching the current upstream llm-d documentation and cites what it fetched, so the config is backed by the latest guides and docs rather than the model's own opinion. Benchmarks then test whether the configuration meets the workload's performance targets.</p>
<p>In our experience, autoconfig has reduced the time it takes to spin up and test new llm-d-router features, and makes it straightforward to create custom deployments.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="an-example-flow-from-workload-requirements-to-a-validated-deployment">An example flow: from workload requirements to a validated deployment<a href="https://llm-d.ai/blog/skills-for-accelerated-llm-d-development-evaluation-and-configuration#an-example-flow-from-workload-requirements-to-a-validated-deployment" class="hash-link" aria-label="Direct link to An example flow: from workload requirements to a validated deployment" title="Direct link to An example flow: from workload requirements to a validated deployment" translate="no">​</a></h3>
<p>In this example, a GKE cluster already runs Qwen3-8B on NVIDIA L4 GPUs using vLLM. Autoconfig configures and deploys the routing layer. The p95 latency targets are 1000ms for the first token and 100ms per output token.</p>
<ol>
<li class=""><strong>Cluster discovery.</strong> The assistant scans the cluster with kubectl calls: GPUs, installed CRDs, gateway classes, and any existing model servers. The defaults for the questions that follow are based off what it finds.</li>
</ol>
<p><img decoding="async" loading="lazy" alt="The assistant reports the discovered GPUs, CRDs, and gateway state as a bulleted summary." src="https://llm-d.ai/assets/images/autoconfig-example-discovery-3de9ef25e946f1de57dd8f6362c309ee.png" width="1738" height="694" class="img_ev3q"></p>
<ol start="2">
<li class=""><strong>Discovery questionnaire.</strong> The assistant walks through a questionnaire using its native interactive prompts: model, aggregated or prefill/decode topology, SLA targets, request shape (prompt and output lengths, how much prompt content is shared between requests), and optional features such as autoscaling, latency prediction, etc. The assistant asks follow-up questions when needed.</li>
</ol>
<p><img decoding="async" loading="lazy" alt="The questionnaire runs as interactive prompts in the assistant, with discovered values as defaults." src="https://llm-d.ai/assets/images/autoconfig-example-questionnaire-64212c555645e8327780352f919e68b6.png" width="1738" height="570" class="img_ev3q"></p>
<ol start="3">
<li class="">
<p><strong>Doc-grounded recommendation.</strong> The assistant fetches the current llm-d guides to justify each choice. In this run, it recommended the optimized-baseline plugin set, quoting the guide's values file, and even flagged that one default was calibrated for different hardware and should be re-measured with the guide's calibration recipe.</p>
</li>
<li class="">
<p><strong>Recap and confirmation.</strong> Before anything is rendered, the assistant presents a recap, including an audit checking that the requested replicas and tensor parallelism actually fit the GPUs found in step 1.</p>
</li>
</ol>
<p><img decoding="async" loading="lazy" alt="The recap lists the confirmed input and the schedulability audit before asking for a go/no-go." src="https://llm-d.ai/assets/images/autoconfig-example-recap-dae156e803d7dc7ab223d17fd9cbad49.png" width="2108" height="932" class="img_ev3q"></p>
<ol start="5">
<li class="">
<p><strong>Rendering.</strong> The deterministic renderer produces the EPP configuration, a benchmark definition, and the deployment bundle: a directory of Kubernetes YAML files, one per resource, with every parameter tagged with the evidence backing it.</p>
</li>
<li class="">
<p><strong>Deploy.</strong> On approval, the assistant applies the bundle a step at a time with confirmations, and finishes with a smoke test against the gateway using the model name from the questionnaire.</p>
</li>
<li class="">
<p><strong>Benchmark against the SLAs.</strong> Optionally, the assistant applies the generated benchmark job and compares the latency and throughput against the SLA targets from step 2, verifying the desired behavior.</p>
</li>
</ol>
<p><img decoding="async" loading="lazy" alt="The benchmark results are summarized against the SLA targets from the questionnaire." src="https://llm-d.ai/assets/images/autoconfig-example-benchmark-9a0caf0a13903bf03b2c63b05efd3e80.png" width="1584" height="584" class="img_ev3q"></p>
<p>The interactive part of this flow only takes a few minutes, with the only real time sinks being waiting for the gateway to configure or waiting for the benchmark to run. The bundle directory is a versionable deployment record that others can replay with a single kubectl command. No Helm or repository clone required.</p>
<h1>The role of the human in the loop</h1>
<p>While the skills automate much of the deployment and benchmarking workflow, the human remains an essential part of the evaluation loop. The skills are designed around explicit checkpoints rather than unattended automation, as the walkthrough above shows. Beyond those approvals, meaningful performance evaluation requires more than simply collecting metrics. It requires interpreting the results to determine whether an experiment actually exercised the feature under investigation and whether the observed behavior supports valid conclusions. When experiments fail to provide meaningful insights, practitioners refine the deployment configuration, workload characteristics, or evaluation methodology and repeat the process.</p>
<h1>Observations, limitations and lessons learned</h1>
<p>Building and maintaining reusable skills taught us that success depends not only on the quality of the implementation, but also on how knowledge is captured, maintained, and presented. Throughout our experience developing and working with skills, several recurring patterns and challenges emerged.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="finding-the-right-level-of-abstraction">Finding the right level of abstraction<a href="https://llm-d.ai/blog/skills-for-accelerated-llm-d-development-evaluation-and-configuration#finding-the-right-level-of-abstraction" class="hash-link" aria-label="Direct link to Finding the right level of abstraction" title="Direct link to Finding the right level of abstraction" translate="no">​</a></h2>
<p>One of the most important design decisions is choosing the appropriate level of abstraction. Skills that are too detailed tend to become outdated quickly and consume unnecessary context, making them expensive to use. On the other hand, skills that are too generic provide insufficient guidance, forcing the code assistant to rely on trial and error. The most effective skills strike a balance: they capture the essential workflow and decision points without prescribing every implementation detail.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="skills-require-continuous-maintenance">Skills require continuous maintenance<a href="https://llm-d.ai/blog/skills-for-accelerated-llm-d-development-evaluation-and-configuration#skills-require-continuous-maintenance" class="hash-link" aria-label="Direct link to Skills require continuous maintenance" title="Direct link to Skills require continuous maintenance" translate="no">​</a></h2>
<p>Skills should be treated like any other software artifact, and evolve alongside the systems they describe. As projects change, assumptions become outdated and best practices shift. Without regular maintenance, skills gradually lose their effectiveness.</p>
<p>The evaluation loop itself drives much of this maintenance. Common pitfalls encountered during benchmarking, recurring code assistant mistakes, and repetitive manual tasks are continuously distilled into new or improved skills. For example, we introduced capabilities such as provisioning an llm-d-ready GKE cluster and clearing KV cache state between benchmark runs after they were repeatedly identified as missing pieces during real benchmarking campaigns. As a result, the skills become progressively more capable over time, capturing operational knowledge and allowing future evaluations to benefit from the experience accumulated in previous ones.</p>
<p>We found that periodically refreshing skills with the help of skill-generation tools works well. In this workflow, a human specifies the desired changes and reviews the generated updates, ensuring that the skill remains both accurate and aligned with current development practices.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="explicit-guidance-matters">Explicit guidance matters<a href="https://llm-d.ai/blog/skills-for-accelerated-llm-d-development-evaluation-and-configuration#explicit-guidance-matters" class="hash-link" aria-label="Direct link to Explicit guidance matters" title="Direct link to Explicit guidance matters" translate="no">​</a></h2>
<p>Not all best practices are equally easy for a code assistant to infer. Some behaviors that seem obvious to experienced developers can be surprisingly difficult for an assistant to identify consistently.</p>
<p>For example, we observed that the assistant occasionally struggled to determine when KV cache eviction was required. In some cases, it failed to evict the cache after a failed benchmark start, while in others it performed an unnecessary eviction after deploying a new stack. These scenario-specific operational rules should be documented as explicitly as possible. When appropriate, they should also be stored as persistent memory or reusable guidance to ensure consistent behavior across tasks.</p>
<h1>Try the skills yourself</h1>
<p>All of the skills described in this post are available in the <a href="https://github.com/llm-d-incubation/llm-d-skills" target="_blank" rel="noopener noreferrer" class="">llm-d Skills repository</a>. They follow the agentskills.io format, so they work with any code assistant that loads SKILL.md-based skills, including Gemini CLI and Claude Code. Simply copy a skill folder into the respective skills directory, describe your task (e.g. "Help me configure llm-d for my workload."), and the skill should walk you through the rest. You can also automatically install the skills or a subset of them via Claude Code plugin marketplace. See the <a href="https://github.com/llm-d-incubation/llm-d-skills#installation" target="_blank" rel="noopener noreferrer" class="">Installation Section</a> for more details.</p>
<p>Each skill's README documents its current capabilities, prerequisites, and scope. If you find a gap, we would love to hear about it: issues and contributions to the skills repo are welcome, and as described above, real-world pain points are exactly what drive the next round of skills.</p>]]></content:encoded>
            <author>yangligt@google.com (Yang Li)</author>
            <category>blog posts</category>
            <category>Inference</category>
            <category>Evaluation</category>
            <category>Benchmarking</category>
            <category>Configuration</category>
            <category>Skills</category>
            <category>Code Assistants</category>
        </item>
        <item>
            <title><![CDATA[Topology as an End-to-End Contract: P/D Disaggregated Inference in llm-d on GKE]]></title>
            <link>https://llm-d.ai/blog/topology-as-an-end-to-end-contract</link>
            <guid>https://llm-d.ai/blog/topology-as-an-end-to-end-contract</guid>
            <pubDate>Thu, 29 Oct 2026 09:00:00 GMT</pubDate>
            <description><![CDATA[How llm-d on GKE keeps GPU/NIC topology intact across DRA allocation, UCX/RDMA transport verification, and routing for P/D inference, from H200 through GB300.]]></description>
            <content:encoded><![CDATA[<p><em>Lessons from bringing up RDMA-backed Prefill/Decode serving across H200, B200, GB200, and GB300 on GKE</em></p>
<p>Prefill/Decode (P/D) disaggregation splits LLM serving into two pools of workers: prefill workers process the prompt, and decode workers generate the output tokens. Between the two, every request hands its KV cache over the network. The path those bytes take (which NIC, which switches, how many hops) is set by three layers that don't coordinate by default: the platform decides which network paths exist at all, the resource allocator picks each worker's GPU and NIC, and the router picks which prefill worker pairs with which decode worker.</p>
<p>We learned how much that matters while bringing up llm-d's P/D path on four GCP GPU platforms: A3 Ultra (H200), A4 (B200), A4X (GB200 NVL72), and A4X Max (GB300 NVL72). The bring-up itself was a first: llm-d's P/D guide had no high-performance GKE RDMA recipe before this work built one on A3 Ultra, then carried the same allocation-and-transport contract through A4, A4X, and A4X Max (<a class="" href="https://llm-d.ai/blog/topology-as-an-end-to-end-contract#allocation">allocation</a>). The problems we hit shared one shape: one layer lost what another knew, and the symptom appeared far from the cause.</p>
<p>The lesson is that topology is not only a transport optimization; it is an end-to-end contract spanning allocator, kernel, NIC, transport, engine, and router. Keeping RDMA fast depends on every layer holding its part: a mismatched GPU and NIC, a missing route, a silent fallback to TCP, or a topology-blind pairing anywhere along the way degrades the whole path. Concretely, the platform must <strong>discover</strong> topology, publishing each device's PCIe root, NIC, and rail as attributes Kubernetes can see. <a class="" href="https://llm-d.ai/blog/topology-as-an-end-to-end-contract#allocation">Allocation</a> must <strong>preserve</strong> it, giving each worker a GPU and a NIC that belong together. The <a class="" href="https://llm-d.ai/blog/topology-as-an-end-to-end-contract#verify-the-transport">runtime</a> must <strong>verify</strong> it, confirming that KV really moves over RDMA. And the <a class="" href="https://llm-d.ai/blog/topology-as-an-end-to-end-contract#topology-must-reach-the-router">router</a> must <strong>consume</strong> it, pairing prefill and decode workers that are close on the network. Two results from our clusters show what that is worth:</p>
<ul>
<li class="">A silent fallback from RDMA to TCP is not a slowdown but an outage. Forcing one on purpose under benchmark load made 436 of 5,400 requests time out; eliminating one on A4X cut mean KV-transfer time by more than 93%.</li>
<li class="">Mean time-to-first-token (TTFT) fell from 2.15 s to 1.157 s once each worker had a matched GPU and NIC and a verified RDMA channel, and then to 0.33 s, a further 3.5× reduction, once the router also paired workers by topology (<a class="" href="https://llm-d.ai/blog/topology-as-an-end-to-end-contract#evaluation">evaluation</a>).</li>
</ul>
<p>An earlier post, <a class="" href="https://llm-d.ai/blog/networking-for-distributed-inference-llm-d">Networking for Distributed Inference in llm-d</a>, covered the transport stack itself: NIXL (the KV-transfer library), UCX (the communication library underneath it), and backend performance. This post follows topology from the platform through allocation and transport into routing.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-problem">The Problem: Every KV Handoff Is a Network Path<a href="https://llm-d.ai/blog/topology-as-an-end-to-end-contract#the-problem" class="hash-link" aria-label="Direct link to The Problem: Every KV Handoff Is a Network Path" title="Direct link to The Problem: Every KV Handoff Is a Network Path" translate="no">​</a></h2>
<p>In aggregated serving, where one engine runs both prefill and decode, the KV cache never leaves the GPUs that built it. Disaggregation changes that. Prefill and decode run as separate pods that scale and fail independently, so each request's KV cache has to move from a prefill GPU to a decode GPU. On the machines in this post it moves by RDMA (Remote Direct Memory Access) over a dedicated RoCE (RDMA over Converged Ethernet) network.</p>
<p>One piece of network vocabulary matters throughout: the <strong>rail</strong>. Each GPU on these machines has its own RoCE NIC, and the NICs are wired into independent switching planes called rails (eight on A3 Ultra, four on A4 and A4X; A4X Max presents each of its four NICs as two logical NICs), with NICs in the same position on every node sharing a rail. A same-rail transfer stays on one plane; a cross-rail transfer climbs through the switching fabric to change planes. Figure 1 shows the three paths a KV transfer can take.</p>
<p><img decoding="async" loading="lazy" alt="End-to-end P/D topology: three KV-transfer paths" src="https://llm-d.ai/assets/images/fig1-topology-paths-985ca35772cf18eac2b2052153ffc1ce.svg" width="800" height="936" class="img_ev3q"></p>
<p><em>Figure 1: Three KV-transfer paths on the same hardware (illustrative layout, not a production node shape). Orange P marks prefill workers and green D marks decode workers; each GPU has its own NIC, and each NIC sits on a rail. Each panel shows one GPU-to-GPU transfer; in this post's benchmark, where one-GPU prefill workers feed four-GPU decode workers, each request makes several, one per decode GPU. How far up the switch tiers a path climbs also depends on placement, such as node distance and rack boundaries.</em></p>
<p><strong>Why pods on the same node still use the network.</strong> Inside a single-process engine, GPUs share NVLink directly; separate pods don't by default. Crossing the pod boundary takes either host IPC with access to the peer pod's GPU, which weakens pod isolation, or, on the NVL72 platforms, a ComputeDomain, NVIDIA's DRA-managed way to share NVLink memory across pods through its IMEX (Internode Memory Exchange) service (<a href="https://developer.nvidia.com/blog/enabling-multi-node-nvlink-on-kubernetes-for-gb200-and-beyond/" target="_blank" rel="noopener noreferrer" class="">NVIDIA's guide</a>). We tried ComputeDomains on GB200 and transfers worked, but our recipes keep KV on RDMA, the path we have verified end to end on all four platforms, even when pods share a node.</p>
<p><strong>The hairpin.</strong> Over RDMA, a same-node transfer takes the long way: GPU, PCIe, NIC, up to the rail's top-of-rack (ToR) switch (and further, if the destination NIC is on another rail), then back down to the other GPU's NIC. Whether that path works at all, and what it costs, depends on facts a topology-blind scheduler never sees: rail identity, PCIe roots, and whether the platform supports hairpin traffic.</p>
<p><strong>Where this applies.</strong> Hairpins arise only when prefill and decode pods share a node, as in this post's partial-node deployment (one-GPU prefill and four-GPU decode workers on eight-GPU nodes). Everything else here applies to any deployment shape, because rail alignment, transport verification, and topology-aware routing govern every cross-node transfer too.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-platforms">The Platforms<a href="https://llm-d.ai/blog/topology-as-an-end-to-end-contract#the-platforms" class="hash-link" aria-label="Direct link to The Platforms" title="Direct link to The Platforms" translate="no">​</a></h2>
<p>The four platforms are GCP machine shapes, described in Google's <a href="https://docs.cloud.google.com/compute/docs/accelerator-optimized-machines" target="_blank" rel="noopener noreferrer" class="">accelerator-optimized machine</a> and <a href="https://docs.cloud.google.com/compute/docs/gpus/gpu-network-bandwidth" target="_blank" rel="noopener noreferrer" class="">GPU networking</a> documentation. For this post they differ in four ways: NVLink domain size, how RoCE NICs map onto rails, how much GPU/NIC pairing Kubernetes can express, and whether same-node hairpin RDMA is available. DRA (Dynamic Resource Allocation) is the Kubernetes API for requesting devices by their attributes.</p>
<table><thead><tr><th>Platform (GPU)</th><th>NVLink domain</th><th>RoCE NICs and rails</th><th>GPU/NIC allocation today</th><th>Same-node hairpin</th></tr></thead><tbody><tr><td>A3 Ultra (8× H200, VM)</td><td>8 GPUs, one node</td><td>8× ConnectX-7 (CX-7) @ 400 Gbps, one per GPU; 8 rails</td><td>GPU and NIC in one DRA claim, same PCIe root</td><td>Supported</td></tr><tr><td>A4 (8× B200, VM)</td><td>8 GPUs, one node</td><td>8× CX-7 @ 400 Gbps, one per GPU; 4-way rail-aligned</td><td>Same as A3 Ultra</td><td>Supported</td></tr><tr><td>A4X (GB200 NVL72, VM)</td><td>72 GPUs per rack, 4 per node</td><td>4× CX-7 @ 400 Gbps, exposed as 4 VFs; 4-way rail-aligned</td><td>NICs through DRA; GPUs through the device plugin</td><td>Supported</td></tr><tr><td>A4X Max (GB300 NVL72, bare metal)</td><td>72 GPUs per rack, 4 per node</td><td>4× CX-8 @ 800 Gbps, exposed as 8 logical NICs (PFs), two per card</td><td>As on A4X, plus each CX-8's two PFs bound as a pair</td><td>Not available when tested</td></tr></tbody></table>
<p>NICs are exposed as virtual functions (VFs) on the VM-based platforms and as physical functions (PFs) on bare-metal A4X Max, where pods reach them through ipvlan interfaces. Placement matters too: rail-aligned traffic between GPUs in the same sub-block is one network hop, within a block at most two, and crossing blocks adds one more (<a href="https://docs.cloud.google.com/ai-hypercomputer/docs/networking-overview" target="_blank" rel="noopener noreferrer" class="">networking overview</a>). On A4X and A4X Max, a sub-block is one NVL72 domain of 18 nodes; NVLink carries tensor-parallel traffic inside it, while our recipes send KV between workers over the RoCE rails, inside a rack and across racks.</p>
<p><strong>A link is not a route.</strong> In early bring-up, pods whose DRA claims didn't constrain rails often couldn't open RDMA connections: UCX connection timeouts, and <code>RDMA_CM_EVENT_ADDR_ERROR</code> during address resolution. The hardware was fine (on A3 Ultra, A4, and A4X, both cross-rail and same-node RDMA work), but a packet is only as routable as every layer beneath it. What was missing, in the pods' network setup, were the per-NIC routes and neighbor entries that UCX consults to decide whether a peer is reachable. Today the recipes handle this at the transport layer: our shared GKE base sets <code>UCX_IB_ROCE_REACHABILITY_MODE=all</code>, so UCX treats every RoCE address as reachable instead of consulting the host routing table, and workers no longer have to be restricted to same-rail pairs just to connect. That is a workaround, not a repair: it skips a check rather than restoring the missing state, and it helps only UCX. The durable fix belongs to the platform, injecting those routes and neighbor entries into the pods' network setup so that every RDMA consumer sees correct reachability. We traced the gap and raised it with the GKE networking team, which owns that platform-side injection.</p>
<p><strong>One constraint up close: the hairpin.</strong> Bare-metal A4X Max did not offer same-node hairpin RDMA when tested, while the VM-based platforms do. Internal GKE analysis traced the difference below Kubernetes: on the tested bare-metal path, local RDMA address resolution produced frames with identical source and destination MAC addresses, which the physical ToR dropped. Constraints like this depend on how a platform is layered and can change between releases. Our part is the same on every platform: treat them as topology data rather than assumed defaults, and align the deployment within them so the physical link delivers what it was built for. Where hairpin is unavailable, anti-affinity keeps prefill and decode on separate nodes; where it is available, they can share a node, as in the <a href="https://llm-d.ai/blog/topology-as-an-end-to-end-contract#evaluation" class="">evaluation</a> deployment.</p>
<p><strong>Why alignment is worth it.</strong> Rail alignment pays off in three ways. Bandwidth: within a sub-block, a rail-local transfer crosses a single rail switch and never touches the uplinks above it, so concurrent flows cannot collide in the fabric's multipath load balancing (ECMP), a risk even non-blocking fabrics carry. Latency: we measured about 2–3 µs per additional switch layer, small next to a request but large next to a single RDMA operation. On A4X, a 48 MB transfer took 6.6 ms, about 15% of one 400 Gbps link's capacity over that time, so transfer time is set more by per-operation overhead than by bandwidth, and each request's handoff spans more than a thousand memory descriptors. NIXL overlaps them, but limits on in-flight operations and completion boundaries keep path latency from being fully hidden, and transfer time lands directly in TTFT. Predictability: within a sub-block, a rail-local path has no multipath choice to make, so its latency is reproducible from run to run.</p>
<p><strong>Alignment continues inside the transport layer,</strong> where NIXL and UCX manage NIC allocation. By default, UCX attempts to maximize performance by spreading each GPU's transfers across up to two of its highest-bandwidth NICs. While this strategy generally works well, specific hardware architectures require more deliberate alignment to prevent severe bottlenecks. On A3 Ultra and A4 platforms, each pair of GPUs shares two ConnectX-7 NICs through a single PCIe Gen5 switch. Because the default configuration routes traffic through both NICs, simultaneous large-message transfers from both GPUs collide and contend for the same switch resources, degrading overall bandwidth. Forcing a strict 1:1 mapping between GPUs and NICs, by setting <code>UCX_SINGLE_NET_DEVICE=y</code> alongside NIXL's default <code>UCX_MAX_RMA_RAILS=2</code>, eliminates this interference and boosts large-message bandwidth on A3U/A4 by 62% (Figure 2). This optimization depends on fixes in the next UCX and NIXL releases (1.22.1 and 1.4.1, including <a href="https://github.com/openucx/ucx/pull/11650" target="_blank" rel="noopener noreferrer" class="">openucx/ucx#11650</a>); on current releases, leave <code>UCX_SINGLE_NET_DEVICE</code> unset to prevent performance regressions. The A4X platform presents a different routing trap: because all NICs report equal bandwidth, current UCX releases bottleneck the system by funneling all traffic through the first listed interfaces, an issue resolved by another patch in the same upcoming UCX release (<a href="https://github.com/openucx/ucx/pull/11547" target="_blank" rel="noopener noreferrer" class="">openucx/ucx#11547</a>) that properly distributes the load. Finally, across all VM-based platforms (A3 Ultra, A4, and A4X), guest-to-host address translation adds PCIe transactions that make strict ordering highly inefficient. Enabling PCIe relaxed ordering (<code>UCX_IB_PCI_RELAXED_ORDERING=y</code> and <code>IBV_ACCESS_RELAXED_ORDERING=1</code>) bypasses this overhead and significantly improves throughput.</p>
<p><img decoding="async" loading="lazy" alt="A4 NIXL bandwidth: GPU-pair shared NICs versus 1:1 GPU-to-NIC mapping" src="https://llm-d.ai/assets/images/a4-gpu-nic-mapping-e6e985af857f4de1f80924f7eaa6412f.png" width="1650" height="975" class="img_ev3q"></p>
<p><em>Figure 2: NIXL bandwidth on A4 by transfer block size, with each GPU pair using both NICs (the default) versus a 1:1 GPU-to-NIC mapping. Beyond 256 KB, the shared configuration drops to about 235 GB/s at the largest sizes, while the 1:1 mapping holds near 380 GB/s: the 62% gap cited above. Measured by the GKE networking team with the upcoming UCX and NIXL fixes.</em></p>
<p>None of this is unique to GKE: every fabric has paths that exist, paths that need routing behind them, and paths a security policy forbids, and no real cluster gives every GPU pair the same reachability and cost. A deployment has to be built within its fabric's constraints, not against them, which is why topology awareness pays off.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="allocation">Allocation: Keep Each GPU Next to Its NIC<a href="https://llm-d.ai/blog/topology-as-an-end-to-end-contract#allocation" class="hash-link" aria-label="Direct link to Allocation: Keep Each GPU Next to Its NIC" title="Direct link to Allocation: Keep Each GPU Next to Its NIC" translate="no">​</a></h2>
<p>The allocation rule is the same on every platform: each worker's GPU and NIC should sit under the same PCIe root. With GPUDirect RDMA the NIC reads KV straight from GPU memory, and a shared PCIe root keeps those bytes from crossing root complexes or CPU sockets. Platforms differ in how much of the rule they can express. Two Kubernetes features do the work: DRA claims, which request devices and can require them to share an attribute such as a PCIe root, and CEL (<a href="https://kubernetes.io/docs/reference/using-api/cel/" target="_blank" rel="noopener noreferrer" class="">Common Expression Language</a>) selectors, which filter devices inside a claim.</p>
<p><strong>A3 Ultra and A4.</strong> Both the GPU and the NIC come from DRA, so a single ResourceClaimTemplate asks for the pair and constrains it with <code>matchAttribute: "resource.kubernetes.io/pcieRoot"</code>: both devices land under the same physical PCIe root. We introduced this pattern in <a href="https://github.com/llm-d/llm-d/pull/1821" target="_blank" rel="noopener noreferrer" class="">llm-d#1821</a>, the guide's first GKE P/D recipe. It was later refactored into the shared <code>gke/base</code> that all GKE overlays build on (<a href="https://github.com/llm-d/llm-d/pull/2062" target="_blank" rel="noopener noreferrer" class="">llm-d#2062</a>), and llm-d's SGLang P/D guide adopted the same shape (<a href="https://github.com/llm-d/llm-d/pull/2059" target="_blank" rel="noopener noreferrer" class="">llm-d#2059</a>). The evaluation's channel-verified and topology-scored rungs ran on A3 Ultra, where this claim enforces alignment.</p>
<p><strong>A4X.</strong> In the tested recipe, only the NIC side lives in DRA. Each worker's claim requests a dedicated NIC through the <code>mrdma.google.com</code> DeviceClass (<a href="https://github.com/llm-d/llm-d/pull/2043" target="_blank" rel="noopener noreferrer" class="">llm-d#2043</a>), while GPUs come from <code>resources.limits</code> through the device plugin. The two are allocated independently, so nothing ties a worker's GPU to the NIC under its PCIe root: a one-GPU prefill worker can get a GPU and a NIC under different roots. On these Grace-based platforms such a pair still works over GPUDirect RDMA, with a smaller penalty than on x86 hosts. A same-root constraint needs both devices in one claim, so it applies only when GPUs are also allocated through DRA, in which case the A3 Ultra claim carries over unchanged. GKE's managed DRANet, the DRA driver behind these NIC claims, already places them by network connectivity; a GPU claim adds the tie to a specific GPU's PCIe root.</p>
<p><strong>A4X Max.</strong> Same split as A4X, plus a platform rule. Each CX-8 exposes two logical NICs (PFs), which appear in the pod as two interfaces on the same card (for example <code>gpu0ipvlan0</code> and <code>gpu0ipvlan1</code>), and the pair must be bound together for the RDMA link to come up. Our dedicated overlay (<a href="https://github.com/llm-d/llm-d/pull/2068" target="_blank" rel="noopener noreferrer" class="">llm-d#2068</a>) uses DRA's <code>firstAvailable</code> to list four alternatives, one per card (<code>nic-group-0</code> through <code>nic-group-3</code>), each a CEL prefix match that takes both PFs of that card, so whichever card the scheduler picks, both PFs come from it. As on A4X, this binds the NIC side only; GPU-to-NIC PCIe-root matching also needs GPUs under DRA and a PCIe-root attribute on the ipvlan interfaces themselves (<a href="https://github.com/kubernetes-sigs/dranet/issues/261" target="_blank" rel="noopener noreferrer" class="">dranet#261</a>).</p>
<p><img decoding="async" loading="lazy" alt="One allocation rule, four platforms" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4MDAiIGhlaWdodD0iMzEyIiB2aWV3Qm94PSIwIDAgODAwIDMxMiIgZm9udC1mYW1pbHk9IkhlbHZldGljYSwgQXJpYWwsIHNhbnMtc2VyaWYiPgo8cmVjdCB3aWR0aD0iODAwIiBoZWlnaHQ9IjMxMiIgZmlsbD0iI2ZmZmZmZiIvPgo8dGV4dCB4PSIxNDAiIHk9IjM2IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjMjYyNTFmIiBmb250LXNpemU9IjEyLjUiIGZvbnQtd2VpZ2h0PSI3MDAiPkEzIFVsdHJhIC8gQTQ8L3RleHQ+Cjx0ZXh0IHg9IjE0MCIgeT0iNTQiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiM4Yjg5ODQiIGZvbnQtc2l6ZT0iOS41Ij5HUFUgKyBOSUMgYm90aCB1bmRlciBEUkE8L3RleHQ+CjxyZWN0IHg9IjI4IiB5PSI4MCIgd2lkdGg9IjIyNCIgaGVpZ2h0PSI5OCIgcng9IjEwIiBmaWxsPSJub25lIiBzdHJva2U9IiMxNmEzNGEiIHN0cm9rZS13aWR0aD0iMS42IiBzdHJva2UtZGFzaGFycmF5PSI1IDQiLz4KPHRleHQgeD0iMzYiIHk9IjkyIiBmaWxsPSIjMTZhMzRhIiBmb250LXNpemU9IjkiIGZvbnQtd2VpZ2h0PSI3MDAiPkRSQTwvdGV4dD4KPHRleHQgeD0iMTQwIiB5PSIxNzAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiM5ODk2OGUiIGZvbnQtc2l6ZT0iOC41Ij5vbmUgUmVzb3VyY2VDbGFpbVRlbXBsYXRlPC90ZXh0Pgo8cmVjdCB4PSIzNiIgeT0iOTYiIHdpZHRoPSI5MiIgaGVpZ2h0PSI1NiIgcng9IjciIGZpbGw9IiNmZmZmZmYiIHN0cm9rZT0iI2EwOWU5NiIgc3Ryb2tlLXdpZHRoPSIxLjIiLz4KPHRleHQgeD0iODIuMCIgeT0iMTI4LjAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiMyNjI1MWYiIGZvbnQtc2l6ZT0iMTEiIGZvbnQtd2VpZ2h0PSI3MDAiPkdQVTwvdGV4dD4KPHJlY3QgeD0iMTUyIiB5PSI5NiIgd2lkdGg9IjkyIiBoZWlnaHQ9IjU2IiByeD0iNyIgZmlsbD0iI2ZmZmZmZiIgc3Ryb2tlPSIjYTA5ZTk2IiBzdHJva2Utd2lkdGg9IjEuMiIvPgo8dGV4dCB4PSIxOTguMCIgeT0iMTI4LjAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiMyNjI1MWYiIGZvbnQtc2l6ZT0iMTEiIGZvbnQtd2VpZ2h0PSI3MDAiPk5JQzwvdGV4dD4KPGxpbmUgeDE9IjgyIiB5MT0iMTUyIiB4Mj0iODIiIHkyPSIxOTYiIHN0cm9rZT0iIzE2YTM0YSIgc3Ryb2tlLXdpZHRoPSIyLjUiLz4KPGxpbmUgeDE9IjE5OCIgeTE9IjE1MiIgeDI9IjE5OCIgeTI9IjE5NiIgc3Ryb2tlPSIjMTZhMzRhIiBzdHJva2Utd2lkdGg9IjIuNSIvPgo8cmVjdCB4PSIzNiIgeT0iMTk2IiB3aWR0aD0iMjA4IiBoZWlnaHQ9IjIwIiByeD0iNiIgZmlsbD0iI2UyZThmMCIgc3Ryb2tlPSIjY2JkNWUxIiBzdHJva2Utd2lkdGg9IjEiLz4KPHRleHQgeD0iMTQwIiB5PSIyMTAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiM0NzU1NjkiIGZvbnQtc2l6ZT0iOS41IiBmb250LXdlaWdodD0iNjAwIj5QQ0llIHJvb3Q8L3RleHQ+Cjx0ZXh0IHg9IjE0MCIgeT0iMjQyIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjMTY2NTM0IiBmb250LXNpemU9IjEwIiBmb250LXdlaWdodD0iNjAwIj5ydWxlIHN0YXRlZCBpbiBvbmUgY2xhaW08L3RleHQ+Cjx0ZXh0IHg9IjE0MCIgeT0iMjU4IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjOGI4OTg0IiBmb250LXNpemU9IjkiPm1hdGNoQXR0cmlidXRlOiBwY2llUm9vdCAmIzE4MzsgbGxtLWQjMTgyMTwvdGV4dD4KPHRleHQgeD0iNDAwIiB5PSIzNiIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzI2MjUxZiIgZm9udC1zaXplPSIxMi41IiBmb250LXdlaWdodD0iNzAwIj5BNFggKEdCMjAwKTwvdGV4dD4KPHRleHQgeD0iNDAwIiB5PSI1NCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzhiODk4NCIgZm9udC1zaXplPSI5LjUiPk5JQ3MgdW5kZXIgRFJBIGluIHRoZSB0ZXN0ZWQgcmVjaXBlPC90ZXh0Pgo8cmVjdCB4PSI0MDQiIHk9IjgwIiB3aWR0aD0iMTA4IiBoZWlnaHQ9Ijg0IiByeD0iMTAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzE2YTM0YSIgc3Ryb2tlLXdpZHRoPSIxLjYiIHN0cm9rZS1kYXNoYXJyYXk9IjUgNCIvPgo8dGV4dCB4PSI0MTEiIHk9IjkyIiBmaWxsPSIjMTZhMzRhIiBmb250LXNpemU9IjkiIGZvbnQtd2VpZ2h0PSI3MDAiPkRSQTwvdGV4dD4KPHJlY3QgeD0iMjk2IiB5PSI5NiIgd2lkdGg9IjkyIiBoZWlnaHQ9IjU2IiByeD0iNyIgZmlsbD0iI2ZmZmZmZiIgc3Ryb2tlPSIjYTA5ZTk2IiBzdHJva2Utd2lkdGg9IjEuMiIvPgo8dGV4dCB4PSIzNDIuMCIgeT0iMTIwIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjMjYyNTFmIiBmb250LXNpemU9IjExIiBmb250LXdlaWdodD0iNzAwIj5HUFU8L3RleHQ+Cjx0ZXh0IHg9IjM0Mi4wIiB5PSIxMzYiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiM5ODk2OGUiIGZvbnQtc2l6ZT0iOC41Ij5kZXZpY2UgcGx1Z2luPC90ZXh0Pgo8cmVjdCB4PSI0MTIiIHk9Ijk2IiB3aWR0aD0iOTIiIGhlaWdodD0iNTYiIHJ4PSI3IiBmaWxsPSIjZmZmZmZmIiBzdHJva2U9IiNhMDllOTYiIHN0cm9rZS13aWR0aD0iMS4yIi8+Cjx0ZXh0IHg9IjQ1OC4wIiB5PSIxMjAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiMyNjI1MWYiIGZvbnQtc2l6ZT0iMTEiIGZvbnQtd2VpZ2h0PSI3MDAiPk5JQzwvdGV4dD4KPHRleHQgeD0iNDU4LjAiIHk9IjEzNiIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzk4OTY4ZSIgZm9udC1zaXplPSI4LjUiPm1yZG1hIERldmljZUNsYXNzPC90ZXh0Pgo8bGluZSB4MT0iMzQyIiB5MT0iMTUyIiB4Mj0iMzQyIiB5Mj0iMTk2IiBzdHJva2U9IiNiNmI0YWUiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWRhc2hhcnJheT0iNCAzIi8+CjxsaW5lIHgxPSI0NTgiIHkxPSIxNTIiIHgyPSI0NTgiIHkyPSIxOTYiIHN0cm9rZT0iI2I2YjRhZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtZGFzaGFycmF5PSI0IDMiLz4KPHJlY3QgeD0iMjk2IiB5PSIxOTYiIHdpZHRoPSIyMDgiIGhlaWdodD0iMjAiIHJ4PSI2IiBmaWxsPSIjZTJlOGYwIiBzdHJva2U9IiNjYmQ1ZTEiIHN0cm9rZS13aWR0aD0iMSIvPgo8dGV4dCB4PSI0MDAiIHk9IjIxMCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzQ3NTU2OSIgZm9udC1zaXplPSI5LjUiIGZvbnQtd2VpZ2h0PSI2MDAiPlBDSWUgcm9vdDwvdGV4dD4KPHRleHQgeD0iNDAwIiB5PSIyNDIiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiMxNjY1MzQiIGZvbnQtc2l6ZT0iMTAiIGZvbnQtd2VpZ2h0PSI2MDAiPk5JQ3MgZXhwbGljaXRseSBEUkEtYWxsb2NhdGVkIHRvZGF5PC90ZXh0Pgo8dGV4dCB4PSI0MDAiIHk9IjI1OCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzhiODk4NCIgZm9udC1zaXplPSI5Ij5wY2llUm9vdCBtYXRjaGluZyByZXF1aXJlcyBHUFUgYW5kIE5JQyB1bmRlciBEUkEgJiMxODM7IGxsbS1kIzIwNDM8L3RleHQ+Cjx0ZXh0IHg9IjY2MCIgeT0iMzYiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiMyNjI1MWYiIGZvbnQtc2l6ZT0iMTIuNSIgZm9udC13ZWlnaHQ9IjcwMCI+QTRYIE1heCAoR0IzMDApPC90ZXh0Pgo8dGV4dCB4PSI2NjAiIHk9IjU0IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjOGI4OTg0IiBmb250LXNpemU9IjkuNSI+c2FtZSBzcGxpdCBhcyBBNFggKyBhIGNvbm5lY3Rpdml0eSBydWxlPC90ZXh0Pgo8cmVjdCB4PSI2NjQiIHk9IjgwIiB3aWR0aD0iMTA4IiBoZWlnaHQ9Ijg0IiByeD0iMTAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzE2YTM0YSIgc3Ryb2tlLXdpZHRoPSIxLjYiIHN0cm9rZS1kYXNoYXJyYXk9IjUgNCIvPgo8dGV4dCB4PSI2NzEiIHk9IjkyIiBmaWxsPSIjMTZhMzRhIiBmb250LXNpemU9IjkiIGZvbnQtd2VpZ2h0PSI3MDAiPkRSQTwvdGV4dD4KPHJlY3QgeD0iNTU2IiB5PSI5NiIgd2lkdGg9IjkyIiBoZWlnaHQ9IjU2IiByeD0iNyIgZmlsbD0iI2ZmZmZmZiIgc3Ryb2tlPSIjYTA5ZTk2IiBzdHJva2Utd2lkdGg9IjEuMiIvPgo8dGV4dCB4PSI2MDIuMCIgeT0iMTIwIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjMjYyNTFmIiBmb250LXNpemU9IjExIiBmb250LXdlaWdodD0iNzAwIj5HUFU8L3RleHQ+Cjx0ZXh0IHg9IjYwMi4wIiB5PSIxMzYiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiM5ODk2OGUiIGZvbnQtc2l6ZT0iOC41Ij5kZXZpY2UgcGx1Z2luPC90ZXh0Pgo8cmVjdCB4PSI2NzIiIHk9Ijk2IiB3aWR0aD0iOTIiIGhlaWdodD0iNTYiIHJ4PSI3IiBmaWxsPSIjZmZmZmZmIiBzdHJva2U9IiNhMDllOTYiIHN0cm9rZS13aWR0aD0iMS4yIi8+Cjx0ZXh0IHg9IjcxOCIgeT0iMTA3IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjOTg5NjhlIiBmb250LXNpemU9IjguNSI+Q1gtOCAmIzgyMTI7IENFTCBjaGFpbjwvdGV4dD4KPHJlY3QgeD0iNjc3IiB5PSIxMTIiIHdpZHRoPSI0MCIgaGVpZ2h0PSIxNiIgcng9IjQiIGZpbGw9IiNmZmZmZmYiIHN0cm9rZT0iI2EwOWU5NiIgc3Ryb2tlLXdpZHRoPSIxIi8+Cjx0ZXh0IHg9IjY5NyIgeT0iMTIzIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjMjYyNTFmIiBmb250LXNpemU9IjcuNSIgZm9udC13ZWlnaHQ9IjYwMCI+aXB2bGFuMDwvdGV4dD4KPHJlY3QgeD0iNzIxIiB5PSIxMTIiIHdpZHRoPSI0MCIgaGVpZ2h0PSIxNiIgcng9IjQiIGZpbGw9IiNmZmZmZmYiIHN0cm9rZT0iI2EwOWU5NiIgc3Ryb2tlLXdpZHRoPSIxIi8+Cjx0ZXh0IHg9Ijc0MSIgeT0iMTIzIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjMjYyNTFmIiBmb250LXNpemU9IjcuNSIgZm9udC13ZWlnaHQ9IjYwMCI+aXB2bGFuMTwvdGV4dD4KPHJlY3QgeD0iNjc3IiB5PSIxMzMiIHdpZHRoPSI4NCIgaGVpZ2h0PSIzIiByeD0iMS41IiBmaWxsPSIjMTZhMzRhIi8+CjxsaW5lIHgxPSI2MDIiIHkxPSIxNTIiIHgyPSI2MDIiIHkyPSIxOTYiIHN0cm9rZT0iI2I2YjRhZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtZGFzaGFycmF5PSI0IDMiLz4KPGxpbmUgeDE9IjcxOCIgeTE9IjE1MiIgeDI9IjcxOCIgeTI9IjE5NiIgc3Ryb2tlPSIjYjZiNGFlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1kYXNoYXJyYXk9IjQgMyIvPgo8cmVjdCB4PSI1NTYiIHk9IjE5NiIgd2lkdGg9IjIwOCIgaGVpZ2h0PSIyMCIgcng9IjYiIGZpbGw9IiNlMmU4ZjAiIHN0cm9rZT0iI2NiZDVlMSIgc3Ryb2tlLXdpZHRoPSIxIi8+Cjx0ZXh0IHg9IjY2MCIgeT0iMjEwIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjNDc1NTY5IiBmb250LXNpemU9IjkuNSIgZm9udC13ZWlnaHQ9IjYwMCI+UENJZSByb290PC90ZXh0Pgo8dGV4dCB4PSI2NjAiIHk9IjI0MiIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzE2NjUzNCIgZm9udC1zaXplPSIxMCIgZm9udC13ZWlnaHQ9IjYwMCI+cGFpciBib3VuZCAmIzgyMTI7IGVsc2Ugbm8gbGluayBhdCBhbGw8L3RleHQ+Cjx0ZXh0IHg9IjY2MCIgeT0iMjU4IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjOGI4OTg0IiBmb250LXNpemU9IjkiPmZpcnN0QXZhaWxhYmxlICsgQ0VMIHByZWZpeCAmIzE4MzsgbGxtLWQjMjA2ODwvdGV4dD4KPHRleHQgeD0iNDAwIiB5PSIyOTIiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiM4Yjg5ODQiIGZvbnQtc2l6ZT0iMTAuNSI+T25lIHJ1bGUgJiM4MjEyOyBHUFUgYW5kIE5JQyBvbiB0aGUgc2FtZSBQQ0llIHJvb3Q7IGVhY2ggcmVjaXBlIHN0YXRlcyBhcyBtdWNoIG9mIGl0IGFzIGl0cyBwbGF0Zm9ybSBjYW4gZXhwcmVzcy48L3RleHQ+Cjwvc3ZnPg==" width="800" height="312" class="img_ev3q"></p>
<p><em>Figure 3: One allocation rule, four platforms. The gray bar is the rule itself: GPU and NIC under the same PCIe root. Solid anchors are enforced by the recipe; dashed anchors apply only when GPUs are also DRA-allocated (on A4X Max, also when its ipvlan interfaces carry their parent NIC's PCIe root). The green bar inside the CX-8 box is the PF pair binding, a connectivity requirement rather than PCIe-root alignment. A3 Ultra and A4 share the first column.</em></p>
<p>Topology preservation has to be a contract the platform upholds, not a patch reapplied per platform; the <a href="https://llm-d.ai/blog/topology-as-an-end-to-end-contract#takeaways" class="">takeaways</a> return to what that takes upstream.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="verify-the-transport">Verify the Transport You Actually Have<a href="https://llm-d.ai/blog/topology-as-an-end-to-end-contract#verify-the-transport" class="hash-link" aria-label="Direct link to Verify the Transport You Actually Have" title="Direct link to Verify the Transport You Actually Have" translate="no">​</a></h2>
<p>UCX, the communication library underneath NIXL, chooses a transport when it first connects to each peer, from whatever is usable at that moment. If the RDMA devices cannot be opened or cannot reach the peer, whether from a misconfiguration or a link that is down, it selects the next usable transport, TCP included, without an error. On general-purpose infrastructure that is the right default, because reachability comes first. On a fabric built for GPUDirect RDMA it works against you: nothing fails at the serving layer, and only UCX's own logs record the choice.</p>
<p>That silence is what makes a fallback expensive under P/D load. Transfers get slow but don't break, so connections hold, health checks pass, and requests keep arriving, while memory held by in-flight transfers piles up until the decode side runs out: latency first, then out-of-memory errors, two subsystems away from the cause. We hit this on two platforms. On A3 Ultra, early bring-up fell back to the datacenter network before the RDMA routing environment was complete. On A4X, KV transfers fell back to TCP and consistently took more than 100 ms, with peaks of several seconds, while nothing at the serving layer reported a failure. The cause, found only by inspecting the running process, was the serving process loading the RDMA userspace (verbs) library bundled in its container image instead of the host's. Binding it to the host's verbs stack, through <code>LD_PRELOAD</code> and host-driver mounts added in <a href="https://github.com/llm-d/llm-d/pull/2043" target="_blank" rel="noopener noreferrer" class="">llm-d#2043</a>, restored the RDMA path. Later gIB releases (GKE's host networking stack) stopped injecting their own verbs libraries into pods, so the process now sees a single verbs stack and current overlays drop the workaround (<a href="https://github.com/llm-d/llm-d/pull/2058" target="_blank" rel="noopener noreferrer" class="">llm-d#2058</a>); on any image, it is still worth checking which verbs library the serving process actually loads (check 3 below).</p>
<p><strong>Make failure loud.</strong> Fixing one cause doesn't prevent the next, so we also pin UCX's transports with an explicit <code>UCX_TLS</code> allowlist, <code>rc_mlx5,rc,cuda_copy,cuda_ipc,sm,shm,self</code>, contributed in the same PR. It removes TCP and limits wire transports to the reliable-connection (RC) family, plus CUDA and shared-memory transports for local copies; the <a href="https://openucx.readthedocs.io/en/master/faq.html" target="_blank" rel="noopener noreferrer" class=""><code>rc</code> alias</a> also admits UD (unreliable datagram) for connection setup only. The allowlist doesn't make a working RDMA path faster. It changes what happens when RDMA breaks: the first connection to each peer fails with an explicit "unreachable" error instead of quietly serving over TCP. It selects the transport type (UCX logs showed <code>rc_mlx5</code>), not the NIC or rail, which still come from allocation, and it ships in the A4X and A4X Max overlays; our A3 Ultra benchmark deployments set the same value. Because NIXL connects lazily, on the first request a prefill/decode pair serves, that error would otherwise surface under traffic; llm-d's <a class="" href="https://llm-d.ai/blog/networking-for-distributed-inference-llm-d#pre-flight-checks">preflight checks</a> narrow the gap by testing the pod's network path before vLLM starts.</p>
<p><strong>Result.</strong> With the host library binding and the allowlist in place on A4X, UCX logs confirmed KV traffic on RDMA for the whole run. Transfers averaging about 48 MB completed in about 6.6 ms (P90 about 8 ms), down from more than 100 ms during the fallback: a reduction of more than 93%. These are per-transfer times reported by the engine, not wire-level measurements. The multi-second peaks disappeared, because the path that caused them no longer exists.</p>
<p><strong>Checks for development.</strong> When you need a closer look, the transport's own logs and counters are more reliable than a dashboard, and each check takes minutes on a live pod:</p>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token comment" style="color:hsl(230, 4%, 64%)"># 1. Which transport was selected: run workers with</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token comment" style="color:hsl(230, 4%, 64%)">#      UCX_LOG_LEVEL=info UCX_PROTO_INFO=y</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token comment" style="color:hsl(230, 4%, 64%)">#    UCX then prints the transport it chose for each connection</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token comment" style="color:hsl(230, 4%, 64%)">#    (you want rc_mlx5).</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token comment" style="color:hsl(230, 4%, 64%)"># 2. Where the bytes go: during a transfer, RDMA port counters climb</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token comment" style="color:hsl(230, 4%, 64%)">#    while eth0 carries only light pod control-plane traffic.</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token comment" style="color:hsl(230, 4%, 64%)">#    KV-scale volume on eth0 means a fallback path is live.</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token comment" style="color:hsl(230, 4%, 64%)">#    (port_xmit_data counts 4-byte words.)</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token function" style="color:hsl(221, 87%, 60%)">watch</span><span class="token plain"> </span><span class="token parameter variable" style="color:hsl(221, 87%, 60%)">-n1</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">'cat /sys/class/infiniband/*/ports/*/counters/port_xmit_data; \</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token string" style="color:hsl(119, 34%, 47%)">           cat /sys/class/net/eth0/statistics/tx_bytes'</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token comment" style="color:hsl(230, 4%, 64%)"># 3. Which verbs library the serving process actually loaded:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token function" style="color:hsl(221, 87%, 60%)">grep</span><span class="token plain"> libibverbs /proc/</span><span class="token operator" style="color:hsl(221, 87%, 60%)">&lt;</span><span class="token plain">pid</span><span class="token operator" style="color:hsl(221, 87%, 60%)">&gt;</span><span class="token plain">/maps</span><br></div></code></pre></div></div>
<p>Together, the checks read the chain both upstream and downstream of a transfer.</p>
<p><strong>Metrics for production.</strong> Bring-up checks catch problems once; production needs standing telemetry, because drivers, kernels, and fabric neighbors keep changing. Three properties made RDMA NIC telemetry useful for us:</p>
<ul>
<li class=""><strong>Per-NIC granularity</strong>, keyed to the NIC's PCI address or interface name (<code>mlx5_N</code> numbering can differ between nodes), to confirm traffic rides the intended rail and spot imbalance.</li>
<li class=""><strong>Congestion and error counters</strong> alongside throughput: Congestion Notification Packets (CNPs), out-of-sequence packets, ACK timeouts, and discards are often the clearest sign of contention on shared rails.</li>
<li class=""><strong>Resolution of seconds, not minutes</strong>, at least on a node-local endpoint, because minute-level averages flatten P/D's millisecond-scale transfer bursts.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="topology-must-reach-the-router">Topology Must Reach the Router<a href="https://llm-d.ai/blog/topology-as-an-end-to-end-contract#topology-must-reach-the-router" class="hash-link" aria-label="Direct link to Topology Must Reach the Router" title="Direct link to Topology Must Reach the Router" translate="no">​</a></h2>
<p>Allocation and verification make the candidate paths usable; the router decides which one each request takes: pairing a prefill worker with a decode worker fixes the route of that request's KV. <a class="" href="https://llm-d.ai/blog/llm-d-v0.9-hardened-for-scale">llm-d v0.9</a> ships the router side of this contract. A <code>topology-extractor</code> plugin reads each endpoint's host, rack, zone, and region from configurable pod labels (<a href="https://github.com/llm-d/llm-d-router/pull/1678" target="_blank" rel="noopener noreferrer" class="">llm-d-router#1678</a>). A topology-affinity filter and scorer (<a href="https://github.com/llm-d/llm-d-router/pull/2299" target="_blank" rel="noopener noreferrer" class="">llm-d-router#2299</a>) then compare each candidate with the endpoint the router picked in the first stage: the filter keeps candidates within a minimum affinity of it (host by default), and the scorer ranks them by proximity, host first. The order we recommend is prefill first: with <code>stageOrder: prefill-first</code> on the <code>disagg-profile-handler</code> (<a href="https://github.com/llm-d/llm-d-router/pull/2342" target="_blank" rel="noopener noreferrer" class="">llm-d-router#2342</a>), the router picks the prefill worker on KV-cache reuse, then picks the decode worker by topology, with the filter and scorer in the decode profile. The filter fails open when topology data is missing or no candidate qualifies, so locality never makes a request unroutable. The labels themselves come from outside the router, the separation our prototype design argued for: the router never talks to cloud-provider hardware APIs, and a DRA plugin, webhook, or operator discovers the physical layout and labels each pod, because rail fabrics, NVLink domains, and TPU ICI slices each encode topology differently. On GKE, nodes carry <code>cloud.google.com/gce-topology-block</code>, <code>-subblock</code>, and <code>-host</code> labels (<a href="https://docs.cloud.google.com/ai-hypercomputer/docs/workloads/schedule-gke-workloads-tas" target="_blank" rel="noopener noreferrer" class="">Topology Aware Scheduling</a>); propagated to pods, they can fill those levels, for example sub-block as rack.</p>
<p>Two rules define the policy we recommend:</p>
<ul>
<li class=""><strong>Feasibility is a hard constraint, enforced below the router.</strong> Paths the platform does not offer, such as same-node hairpin on a platform without it, are ruled out by allocation, placement, or network policy, never left to a fail-open router filter.</li>
<li class=""><strong>Cost is a soft score.</strong> Among feasible paths, prefer the pairing with the lowest expected transfer cost. Locality is the leading signal but not the only one. When the preferred domain is saturated, spill over to a more distant worker rather than queue behind a "perfect" path.</li>
</ul>
<p><strong>What we measured.</strong> Before the upstream plugins landed, we measured what topology-aware pairing is worth with a prototype: a hand-populated hierarchical locality label on each pod, ordered from widest to narrowest scope (for example <code>datacenterA.leaf4.rail1.host2</code>), and a longest-prefix-match scorer patched into the router. The prototype ran in the opposite order, decode first: the router picked the decode worker, then scored each prefill candidate against it. Either order scores proximity between the same pair; prefill first also lets KV-cache reuse choose the prefill worker. For the benchmark, the topology score had a dominant, effectively hard weight: while capacity remained, each decode worker was paired with rail-matched prefill workers on the other node, and at this load those pools had headroom throughout.</p>
<p>The router controls less than it might seem. Picking a one-GPU prefill worker fixes the sending NIC and rail, but each request's KV then fans out to all four decode GPUs, each pulling its own shard; the engine's tensor-parallel layout and UCX's device choice decide those legs, not the router (see <a href="https://llm-d.ai/blog/topology-as-an-end-to-end-contract#the-platforms" class="">Alignment continues inside the transport layer</a>). Some legs of every request cross rails whatever the pairing, so the <a href="https://llm-d.ai/blog/topology-as-an-end-to-end-contract#evaluation" class="">evaluation</a>'s gain came from pod-level pairing alone, with no per-GPU control.</p>
<p><strong>Hard in the benchmark, soft in production.</strong> Dominant weighting was the right tool to isolate the effect, and it worked. In production, locality belongs in a soft score: pools saturate, workloads share clusters, and a hard constraint turns every capacity dip into queueing. As a soft score, topology composes with the router's load- and cache-aware signals, which is the shape the v0.9 scorer takes; its companion filter adds a minimum-affinity floor that fails open. The v0.9 levels run from host to region; our prototype's labels went down to the rail. The prototype is not shipping. When locality should dominate or yield within the shipped scheduling profiles is still an open question.</p>
<p><img decoding="async" loading="lazy" alt="Topology-blind vs topology-scored pairing" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5ODAgNDEyIiBmb250LWZhbWlseT0ic3lzdGVtLXVpLCAtYXBwbGUtc3lzdGVtLCAnU2Vnb2UgVUknLCBzYW5zLXNlcmlmIj4KICA8cmVjdCB3aWR0aD0iOTgwIiBoZWlnaHQ9IjQxMiIgZmlsbD0iI2ZmZmZmZiIvPgogIDxkZWZzPgogICAgPG1hcmtlciBpZD0iYXJyR3JheSIgbWFya2VyVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBtYXJrZXJXaWR0aD0iMTIiIG1hcmtlckhlaWdodD0iMTIiIHJlZlg9IjgiIHJlZlk9IjQiIG9yaWVudD0iYXV0byI+CiAgICAgIDxwYXRoIGQ9Ik0wLDAgTDgsNCBMMCw4IHoiIGZpbGw9IiM4OTg3ODEiLz4KICAgIDwvbWFya2VyPgogICAgPG1hcmtlciBpZD0iYXJyQmx1ZTIiIG1hcmtlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgbWFya2VyV2lkdGg9IjE0IiBtYXJrZXJIZWlnaHQ9IjE0IiByZWZYPSIxMCIgcmVmWT0iNSIgb3JpZW50PSJhdXRvIj4KICAgICAgPHBhdGggZD0iTTAsMCBMMTAsNSBMMCwxMCB6IiBmaWxsPSIjMmE3OGQ2Ii8+CiAgICA8L21hcmtlcj4KICAgIDxtYXJrZXIgaWQ9ImFyck9yYW5nZSIgbWFya2VyVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBtYXJrZXJXaWR0aD0iMTIiIG1hcmtlckhlaWdodD0iMTIiIHJlZlg9IjgiIHJlZlk9IjQiIG9yaWVudD0iYXV0byI+CiAgICAgIDxwYXRoIGQ9Ik0wLDAgTDgsNCBMMCw4IHoiIGZpbGw9IiNlYjY4MzQiLz4KICAgIDwvbWFya2VyPgogIDwvZGVmcz4KCiAgPCEtLSA9PT09PT09PT09PT0gTEVGVCBQQU5FTCA9PT09PT09PT09PT0gLS0+CiAgPHRleHQgeD0iMjQ1IiB5PSIzNiIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzBiMGIwYiIgZm9udC1zaXplPSIxNiIgZm9udC13ZWlnaHQ9IjcwMCI+QmVmb3JlICYjODIxMjsgdG9wb2xvZ3ktYmxpbmQgcGFpcmluZzwvdGV4dD4KCiAgPHJlY3QgeD0iNDAiIHk9IjY2IiB3aWR0aD0iMTkwIiBoZWlnaHQ9IjI2IiByeD0iNSIgZmlsbD0iIzUyNTE0ZSIvPgogIDx0ZXh0IHg9IjEzNSIgeT0iODQiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiNmZmZmZmYiIGZvbnQtc2l6ZT0iMTIuNSI+bGVhZiA0PC90ZXh0PgogIDxyZWN0IHg9IjI2MCIgeT0iNjYiIHdpZHRoPSIxOTAiIGhlaWdodD0iMjYiIHJ4PSI1IiBmaWxsPSIjNTI1MTRlIi8+CiAgPHRleHQgeD0iMzU1IiB5PSI4NCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iI2ZmZmZmZiIgZm9udC1zaXplPSIxMi41Ij5sZWFmIDc8L3RleHQ+CgogIDxyZWN0IHg9IjQwIiB5PSIxNDAiIHdpZHRoPSIxOTAiIGhlaWdodD0iMTYwIiByeD0iMTAiIGZpbGw9IiNjZGUyZmIiIHN0cm9rZT0iIzJhNzhkNiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgPHRleHQgeD0iNTQiIHk9IjE2MyIgZmlsbD0iIzBiMGIwYiIgZm9udC1zaXplPSIxMi41IiBmb250LXdlaWdodD0iNjAwIj5ob3N0IDEyPC90ZXh0PgogIDxyZWN0IHg9IjU4IiB5PSIxODAiIHdpZHRoPSI2NCIgaGVpZ2h0PSI1MiIgcng9IjYiIGZpbGw9IiNlYjY4MzQiLz4KICA8dGV4dCB4PSI5MCIgeT0iMjEyIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjMGIwYjBiIiBmb250LXNpemU9IjE1IiBmb250LXdlaWdodD0iNzAwIj5QPC90ZXh0PgogIDxyZWN0IHg9IjE0OCIgeT0iMTgwIiB3aWR0aD0iNjQiIGhlaWdodD0iNTIiIHJ4PSI2IiBmaWxsPSIjMWJhZjdhIi8+CiAgPHRleHQgeD0iMTgwIiB5PSIyMTIiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiMwYjBiMGIiIGZvbnQtc2l6ZT0iMTUiIGZvbnQtd2VpZ2h0PSI3MDAiPkQ8L3RleHQ+CiAgPHRleHQgeD0iMTM1IiB5PSIyODIiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiM1MjUxNGUiIGZvbnQtc2l6ZT0iMTIuNSI+c2FtZSBob3N0IGFzIFA8L3RleHQ+CgogIDxyZWN0IHg9IjI2MCIgeT0iMTQwIiB3aWR0aD0iMTkwIiBoZWlnaHQ9IjE2MCIgcng9IjEwIiBmaWxsPSIjY2RlMmZiIiBzdHJva2U9IiMyYTc4ZDYiIHN0cm9rZS13aWR0aD0iMiIvPgogIDx0ZXh0IHg9IjI3NCIgeT0iMTYzIiBmaWxsPSIjMGIwYjBiIiBmb250LXNpemU9IjEyLjUiIGZvbnQtd2VpZ2h0PSI2MDAiPmhvc3QgMjwvdGV4dD4KICA8cmVjdCB4PSIzMjMiIHk9IjE4MCIgd2lkdGg9IjY0IiBoZWlnaHQ9IjUyIiByeD0iNiIgZmlsbD0iIzFiYWY3YSIvPgogIDx0ZXh0IHg9IjM1NSIgeT0iMjEyIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjMGIwYjBiIiBmb250LXNpemU9IjE1IiBmb250LXdlaWdodD0iNzAwIj5EPC90ZXh0PgogIDx0ZXh0IHg9IjM1NSIgeT0iMjgyIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjNTI1MTRlIiBmb250LXNpemU9IjEyLjUiPmNyb3NzLWxlYWY8L3RleHQ+CgogIDwhLS0gZXF1YWwtd2VpZ2h0IGdyYXkgYXJyb3dzOiBsb2NhbCBkaXJlY3QsIGZhciB2aWEgZmFicmljIC0tPgogIDxsaW5lIHgxPSIxMjIiIHkxPSIyMDYiIHgyPSIxNDIiIHkyPSIyMDYiIHN0cm9rZT0iIzg5ODc4MSIgc3Ryb2tlLXdpZHRoPSIyLjUiIG1hcmtlci1lbmQ9InVybCgjYXJyR3JheSkiLz4KICA8cG9seWxpbmUgcG9pbnRzPSIxMTAsMTgwIDExMCwxMTYgMzU1LDExNiAzNTUsMTc0IiBmaWxsPSJub25lIiBzdHJva2U9IiM4OTg3ODEiIHN0cm9rZS13aWR0aD0iMi41IiBtYXJrZXItZW5kPSJ1cmwoI2FyckdyYXkpIi8+CgogIDx0ZXh0IHg9IjI0NSIgeT0iMzMwIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjNTI1MTRlIiBmb250LXNpemU9IjEyLjUiPnRyZWF0cyBldmVyeSBkZWNvZGUgY2FuZGlkYXRlIGFzIGVxdWFsPC90ZXh0PgoKICA8IS0tID09PT09PT09PT09PSBSSUdIVCBQQU5FTCA9PT09PT09PT09PT0gLS0+CiAgPHRleHQgeD0iNzM1IiB5PSIzNiIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzBiMGIwYiIgZm9udC1zaXplPSIxNiIgZm9udC13ZWlnaHQ9IjcwMCI+QWZ0ZXIgJiM4MjEyOyB0b3BvbG9neS1zY29yZWQgcGFpcmluZzwvdGV4dD4KICA8dGV4dCB4PSI3MzUiIHk9IjU0IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjODk4NzgxIiBmb250LXNpemU9IjExLjUiPnBvbGljeTogbGxtLWQtcm91dGVyICMyMjk5LCBwcmVmaWxsLWZpcnN0IChsbG0tZCB2MC45KTwvdGV4dD4KCiAgPHJlY3QgeD0iNTMwIiB5PSI2NiIgd2lkdGg9IjE5MCIgaGVpZ2h0PSIyNiIgcng9IjUiIGZpbGw9IiM1MjUxNGUiLz4KICA8dGV4dCB4PSI2MjUiIHk9Ijg0IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjZmZmZmZmIiBmb250LXNpemU9IjEyLjUiPmxlYWYgNDwvdGV4dD4KICA8cmVjdCB4PSI3NTAiIHk9IjY2IiB3aWR0aD0iMTkwIiBoZWlnaHQ9IjI2IiByeD0iNSIgZmlsbD0iIzUyNTE0ZSIvPgogIDx0ZXh0IHg9Ijg0NSIgeT0iODQiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiNmZmZmZmYiIGZvbnQtc2l6ZT0iMTIuNSI+bGVhZiA3PC90ZXh0PgoKICA8cmVjdCB4PSI1MzAiIHk9IjE0MCIgd2lkdGg9IjE5MCIgaGVpZ2h0PSIxNjAiIHJ4PSIxMCIgZmlsbD0iI2NkZTJmYiIgc3Ryb2tlPSIjMmE3OGQ2IiBzdHJva2Utd2lkdGg9IjIiLz4KICA8dGV4dCB4PSI1NDQiIHk9IjE2MyIgZmlsbD0iIzBiMGIwYiIgZm9udC1zaXplPSIxMi41IiBmb250LXdlaWdodD0iNjAwIj5ob3N0IDEyPC90ZXh0PgogIDxyZWN0IHg9IjU0OCIgeT0iMTgwIiB3aWR0aD0iNjQiIGhlaWdodD0iNTIiIHJ4PSI2IiBmaWxsPSIjZWI2ODM0Ii8+CiAgPHRleHQgeD0iNTgwIiB5PSIyMTIiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiMwYjBiMGIiIGZvbnQtc2l6ZT0iMTUiIGZvbnQtd2VpZ2h0PSI3MDAiPlA8L3RleHQ+CiAgPHJlY3QgeD0iNjM4IiB5PSIxODAiIHdpZHRoPSI2NCIgaGVpZ2h0PSI1MiIgcng9IjYiIGZpbGw9IiMxYmFmN2EiLz4KICA8dGV4dCB4PSI2NzAiIHk9IjIxMiIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzBiMGIwYiIgZm9udC1zaXplPSIxNSIgZm9udC13ZWlnaHQ9IjcwMCI+RDwvdGV4dD4KICA8cmVjdCB4PSI2MzgiIHk9IjI0NCIgd2lkdGg9IjY0IiBoZWlnaHQ9IjkiIHJ4PSIzIiBmaWxsPSIjZmNmY2ZiIiBzdHJva2U9IiNjM2MyYjciLz4KICA8cmVjdCB4PSI2MzgiIHk9IjI0NCIgd2lkdGg9IjQ3IiBoZWlnaHQ9IjkiIHJ4PSIzIiBmaWxsPSIjZWRhMTAwIi8+CiAgPHRleHQgeD0iNjcwIiB5PSIyNzIiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiM1MjUxNGUiIGZvbnQtc2l6ZT0iMTIuNSI+cXVldWUgZGVwdGg8L3RleHQ+CgogIDxyZWN0IHg9Ijc1MCIgeT0iMTQwIiB3aWR0aD0iMTkwIiBoZWlnaHQ9IjE2MCIgcng9IjEwIiBmaWxsPSIjY2RlMmZiIiBzdHJva2U9IiMyYTc4ZDYiIHN0cm9rZS13aWR0aD0iMiIvPgogIDx0ZXh0IHg9Ijc2NCIgeT0iMTYzIiBmaWxsPSIjMGIwYjBiIiBmb250LXNpemU9IjEyLjUiIGZvbnQtd2VpZ2h0PSI2MDAiPmhvc3QgMjwvdGV4dD4KICA8cmVjdCB4PSI4MTMiIHk9IjE4MCIgd2lkdGg9IjY0IiBoZWlnaHQ9IjUyIiByeD0iNiIgZmlsbD0iIzFiYWY3YSIvPgogIDx0ZXh0IHg9Ijg0NSIgeT0iMjEyIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjMGIwYjBiIiBmb250LXNpemU9IjE1IiBmb250LXdlaWdodD0iNzAwIj5EPC90ZXh0PgogIDxyZWN0IHg9IjgxMyIgeT0iMjQ0IiB3aWR0aD0iNjQiIGhlaWdodD0iOSIgcng9IjMiIGZpbGw9IiNmY2ZjZmIiIHN0cm9rZT0iI2MzYzJiNyIvPgogIDxyZWN0IHg9IjgxMyIgeT0iMjQ0IiB3aWR0aD0iMTQiIGhlaWdodD0iOSIgcng9IjMiIGZpbGw9IiMxYmFmN2EiLz4KICA8dGV4dCB4PSI4NDUiIHk9IjI3MiIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzUyNTE0ZSIgZm9udC1zaXplPSIxMi41Ij5oZWFkcm9vbTwvdGV4dD4KCiAgPCEtLSBjaG9zZW4gbG9jYWwgcGF0aDogdGhpY2sgYmx1ZTsgc3BpbGxvdmVyOiBkYXNoZWQgb3JhbmdlIHZpYSBmYWJyaWMgLS0+CiAgPGxpbmUgeDE9IjYxMiIgeTE9IjIwNiIgeDI9IjYzMiIgeTI9IjIwNiIgc3Ryb2tlPSIjMmE3OGQ2IiBzdHJva2Utd2lkdGg9IjUiIG1hcmtlci1lbmQ9InVybCgjYXJyQmx1ZTIpIi8+CiAgPHBvbHlsaW5lIHBvaW50cz0iNjAwLDE4MCA2MDAsMTE2IDg0NSwxMTYgODQ1LDE3NCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZWI2ODM0IiBzdHJva2Utd2lkdGg9IjIuNSIgc3Ryb2tlLWRhc2hhcnJheT0iNyA1IiBtYXJrZXItZW5kPSJ1cmwoI2Fyck9yYW5nZSkiLz4KCiAgPHRleHQgeD0iNzM1IiB5PSIzMzAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiM1MjUxNGUiIGZvbnQtc2l6ZT0iMTIuNSI+cHJlZmVyIGxvY2FsaXR5IChibHVlKTsgc3BpbGwgb3ZlciB3aGVuIHNhdHVyYXRlZCAoZGFzaGVkKTwvdGV4dD4KCiAgPCEtLSBkaXZpZGVyICsgZm9vdGVyIC0tPgogIDxsaW5lIHgxPSI0OTAiIHkxPSIzMCIgeDI9IjQ5MCIgeTI9IjM0OCIgc3Ryb2tlPSIjZTFlMGQ5IiBzdHJva2Utd2lkdGg9IjEuNSIvPgogIDx0ZXh0IHg9IjQ5MCIgeT0iMzc4IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjNTI1MTRlIiBmb250LXNpemU9IjEyLjUiPlByZWZpbGwgaXMgY2hvc2VuIGZpcnN0LCBvbiBLVi1jYWNoZSByZXVzZTsgZWFjaCBkZWNvZGUgY2FuZGlkYXRlIGlzIHRoZW4gc2NvcmVkIGJ5IGl0cyBwcm94aW1pdHkgdG8gdGhhdCBwcmVmaWxsIHdvcmtlci48L3RleHQ+CiAgPHRleHQgeD0iNDkwIiB5PSIzOTgiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiM4Yjg5ODQiIGZvbnQtc2l6ZT0iMTEuNSI+U29mdCBzY29yZSB3aXRoIHNwaWxsb3ZlciBzaG93bjsgdGhlIG1lYXN1cmVkIHJ1bnMgdXNlZCBhIHByb3RvdHlwZSBzY29yZXIsIGRlY29kZSBmaXJzdCwgd2l0aCBkb21pbmFudCB3ZWlnaHRpbmcuPC90ZXh0Pgo8L3N2Zz4K" width="980" height="412" class="img_ev3q"></p>
<p><em>Figure 4: Topology-blind versus topology-scored pairing, in the recommended prefill-first order: the router picks the prefill worker on KV-cache reuse, then scores decode candidates by proximity to it. The policy shown (prefer locality, spill over when saturated) is what the scorer in <a href="https://github.com/llm-d/llm-d-router/pull/2299" target="_blank" rel="noopener noreferrer" class="">#2299</a> enables alongside load-aware scorers. Our measured runs used the prototype scorer, decode first with dominant weighting, pairing across nodes on matching rails (results in Figure 5). Arrows show pairing choice, not wire paths.</em></p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="evaluation">Evaluation<a href="https://llm-d.ai/blog/topology-as-an-end-to-end-contract#evaluation" class="hash-link" aria-label="Direct link to Evaluation" title="Direct link to Evaluation" translate="no">​</a></h2>
<p>We ran two experiments on a two-node H200 cluster: TCP versus verified RDMA, and a three-rung TTFT ladder that adds one part of the contract at a time. We then repeated the top rung 25 times on other hosts and regions.</p>
<p><strong>Setup.</strong> The benchmark served gpt-oss-120b on 16× H200 GPUs across two GKE A3 Ultra (a3-ultragpu-8g) nodes, with eight one-GPU prefill replicas and two four-GPU decode replicas (tensor parallelism TP=1 and TP=4). In the ladder deployment, each node hosted four prefill workers and one decode worker. Load came from inference-perf through the llm-d-benchmark harness, running the guide's benchmark unmodified: 45 QPS for 120 seconds (5,400 requests with fixed 5,000-token inputs and 250-token outputs), followed by a drain with a 300-second client timeout. Every configuration used the same <code>vllm/vllm-openai:v0.23.0</code> serving image. Each ladder rung is one 120-second run, and the top two rungs ran on the same deployment. The public guide reproduces everything except the prototype scorer.</p>
<p><strong>What a silent fallback costs.</strong> We ran the same workload with KV forced onto UCX's TCP path over the datacenter network (DCN), where a silent fallback lands. That RDMA outperforms TCP is expected; the point is what a fallback means in production. It is not a graceful degradation but an unacceptable failure: of 5,400 requests, 436 timed out, and completed requests averaged 223 s of latency, finishing long after the 120-second load window. The system was queuing, not serving. (This is UCX's TCP path at this load, not TCP in general.) With verified RDMA, all 5,400 requests completed, and port counters showed an instantaneous peak of 359 Gbps on one link, about 90% of the ConnectX-7's 400 Gbps line rate. The same verified transport configuration underlies the ladder's upper two rungs.</p>
<p><strong>The TTFT ladder.</strong></p>
<ul>
<li class=""><strong>Unconstrained control:</strong> 2.15 s mean TTFT, P90 3.92 s.</li>
<li class=""><strong>Channel-verified</strong> (deterministic DRA allocation and verified RDMA on the router's default scheduling, no topology-aware routing): 1.157 s mean, P90 1.587 s.</li>
<li class=""><strong>Topology-scored pairing:</strong> 0.33 s mean, P90 0.41 s.</li>
</ul>
<p><strong>Reading the ladder.</strong> The first step, 2.15 s to 1.157 s, comes from allocation and transport together: both rungs ran the router's default scheduling, with no topology-aware routing. With unconstrained allocation, GPU/NIC pairings and paths changed from one deployment to the next: all worked, but many were longer and less predictable than the rail-aligned paths the fabric is built around. The public numbers tell the same story once their order is clear. The guide's earlier P/D reference was measured on another platform; our DRA-based GKE recipes landed next, without a published score; the current GKE baseline, in the same range as this rung, was measured after them, alongside router scheduling updates. In our GKE deployments the P/D path did not run over RDMA without DRA-based allocation, so there is no without-DRA point to compare against, and our default-scheduling runs had already reached this level. The step belongs to allocation and transport. The second step, 1.157 s to 0.33 s, comes from topology-scored pairing on the same deployment, workload, and verified channel: another 3.5× in mean TTFT, with P90 falling from 1.587 s to 0.41 s. Topology-scored pairing puts the transfers the router controls on shorter, less contended paths, and at a load where transfers overlap, those per-transfer savings (see <a href="https://llm-d.ai/blog/topology-as-an-end-to-end-contract#the-platforms" class="">Why alignment is worth it</a>) accumulate instead of hiding. With everything else held fixed, we attribute the 3.5× to topology-scored pairing at the system level. Throughput was the same in the control and topology-scored runs (43.8 and 43.9 requests/s against the offered 45 QPS), so the gain did not come from serving less load.</p>
<p><strong>Repetition.</strong> We re-ran the topology-scored configuration 25 times with the same deployment configuration (same manifests, same scripts, same topology shape), spread across hosts and regions so the result would not hinge on one host or regional fabric. It held steady: mean TTFT averaged 0.33 s across runs (range 0.22–0.39 s, standard deviation 0.04 s), and per-run P90 averaged 0.45 s (standard deviation 0.05 s). The ladder's run is typical: its mean also rounds to 0.33 s.</p>
<p><img decoding="async" loading="lazy" alt="Same-cluster transport and topology-stack results" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5NjAgNTAwIiBmb250LWZhbWlseT0ic3lzdGVtLXVpLCAtYXBwbGUtc3lzdGVtLCAnU2Vnb2UgVUknLCBzYW5zLXNlcmlmIj4KICA8cmVjdCB3aWR0aD0iOTYwIiBoZWlnaHQ9IjUwMCIgZmlsbD0iI2ZmZmZmZiIvPgogIDwhLS0gUGFuZWwgQSAtLT4KICA8dGV4dCB4PSIyNDAiIHk9IjQwIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjMGIwYjBiIiBmb250LXNpemU9IjE2IiBmb250LXdlaWdodD0iNzAwIj5UcmFuc3BvcnQgJiM4MjEyOyBzYW1lIGNsdXN0ZXIsIHNhbWUgd29ya2xvYWQ8L3RleHQ+CiAgPHRleHQgeD0iMjQwIiB5PSI2MiIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzUyNTE0ZSIgZm9udC1zaXplPSIxMi41Ij5VQ1gmIzgyMTc7cyBUQ1AgcGF0aCBjb3VsZCBub3Qgc3VzdGFpbiB0aGUgb2ZmZXJlZCA0NSBRUFM8L3RleHQ+CiAgPHJlY3QgeD0iODAiIHk9IjEyMCIgd2lkdGg9IjMyMCIgaGVpZ2h0PSI5NCIgcng9IjgiIGZpbGw9IiNmY2ZjZmIiIHN0cm9rZT0iI2QwM2IzYiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgPHRleHQgeD0iMjQwIiB5PSIxNTAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiMwYjBiMGIiIGZvbnQtc2l6ZT0iMTMuNSIgZm9udC13ZWlnaHQ9IjYwMCI+JiMyMTU7ICBEQ04gLyBUQ1AgYmFzZWxpbmU8L3RleHQ+CiAgPHRleHQgeD0iMjQwIiB5PSIxNzQiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiNkMDNiM2IiIGZvbnQtc2l6ZT0iMTMiPjQzNiBvZiA1LDQwMCByZXF1ZXN0cyB0aW1lZCBvdXQ8L3RleHQ+CiAgPHRleHQgeD0iMjQwIiB5PSIxOTYiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiM1MjUxNGUiIGZvbnQtc2l6ZT0iMTIuNSI+dGhlIHN5c3RlbSB3YXMgcXVldWluZywgbm90IHNlcnZpbmc8L3RleHQ+CiAgPHJlY3QgeD0iODAiIHk9IjI0MCIgd2lkdGg9IjMyMCIgaGVpZ2h0PSI5NCIgcng9IjgiIGZpbGw9IiNmY2ZjZmIiIHN0cm9rZT0iIzBjYTMwYyIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgPHRleHQgeD0iMjQwIiB5PSIyNzAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiMwYjBiMGIiIGZvbnQtc2l6ZT0iMTMuNSIgZm9udC13ZWlnaHQ9IjYwMCI+JiMxMDAwMzsgIFZlcmlmaWVkIFJETUE8L3RleHQ+CiAgPHRleHQgeD0iMjQwIiB5PSIyOTQiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiMwMDYzMDAiIGZvbnQtc2l6ZT0iMTMiPjUsNDAwIC8gNSw0MDAgc2VydmVkLCB6ZXJvIHRpbWVvdXRzPC90ZXh0PgogIDx0ZXh0IHg9IjI0MCIgeT0iMzE2IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjNTI1MTRlIiBmb250LXNpemU9IjEyLjUiPnNhbWUgY2hhbm5lbCBhcyB0aGUgdG9wIHR3byBydW5ncyAocmlnaHQpPC90ZXh0PgoKICA8IS0tIFBhbmVsIEIgLS0+CiAgPHRleHQgeD0iNzIwIiB5PSI0MCIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzBiMGIwYiIgZm9udC1zaXplPSIxNiIgZm9udC13ZWlnaHQ9IjcwMCI+RW5kLXRvLWVuZCBzdGFjayAmIzgyMTI7IHRoZSBUVEZUIGxhZGRlciwgb25lIGNsdXN0ZXI8L3RleHQ+CiAgPHRleHQgeD0iNzIwIiB5PSI2MiIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzUyNTE0ZSIgZm9udC1zaXplPSIxMi41Ij5tZWFuIFRURlQgKHMpOyBwZXJjZW50aWxlcyBhbmQgcHJvdmVuYW5jZSBpbiB0aGUgdGV4dDwvdGV4dD4KICA8bGluZSB4MT0iNTQwIiB5MT0iMzMwIiB4Mj0iOTEwIiB5Mj0iMzMwIiBzdHJva2U9IiNjM2MyYjciIHN0cm9rZS13aWR0aD0iMS41Ii8+CiAgPHJlY3QgeD0iNTgwIiB5PSIxMTUiIHdpZHRoPSI3MCIgaGVpZ2h0PSIyMTUiIHJ4PSI0IiBmaWxsPSIjODk4NzgxIiBvcGFjaXR5PSIwLjgiLz4KICA8dGV4dCB4PSI2MTUiIHk9IjEwNSIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzBiMGIwYiIgZm9udC1zaXplPSIxNCIgZm9udC13ZWlnaHQ9IjYwMCI+Mi4xNSBzPC90ZXh0PgogIDx0ZXh0IHg9IjYxNSIgeT0iMzUyIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjNTI1MTRlIiBmb250LXNpemU9IjEyLjUiPnVuY29uc3RyYWluZWQ8L3RleHQ+CiAgPHRleHQgeD0iNjE1IiB5PSIzNzAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiM1MjUxNGUiIGZvbnQtc2l6ZT0iMTIuNSI+Y29udHJvbDwvdGV4dD4KICA8cmVjdCB4PSI3MTAiIHk9IjIxNCIgd2lkdGg9IjcwIiBoZWlnaHQ9IjExNiIgcng9IjQiIGZpbGw9IiM4NmI2ZWYiIG9wYWNpdHk9IjAuOSIvPgogIDx0ZXh0IHg9Ijc0NSIgeT0iMjA0IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjMGIwYjBiIiBmb250LXNpemU9IjE0IiBmb250LXdlaWdodD0iNjAwIj4xLjE1NyBzPC90ZXh0PgogIDx0ZXh0IHg9Ijc0NSIgeT0iMzUyIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjNTI1MTRlIiBmb250LXNpemU9IjEyLjUiPmNoYW5uZWwtdmVyaWZpZWQ8L3RleHQ+CiAgPHRleHQgeD0iNzQ1IiB5PSIzNzAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiM1MjUxNGUiIGZvbnQtc2l6ZT0iMTIuNSI+KERSQSArIFJETUEpPC90ZXh0PgogIDxyZWN0IHg9IjgyMCIgeT0iMjk3IiB3aWR0aD0iNzAiIGhlaWdodD0iMzMiIHJ4PSI0IiBmaWxsPSIjMmE3OGQ2Ii8+CiAgPHRleHQgeD0iODU1IiB5PSIyODciIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiMwYjBiMGIiIGZvbnQtc2l6ZT0iMTQiIGZvbnQtd2VpZ2h0PSI2MDAiPjAuMzMgczwvdGV4dD4KICA8dGV4dCB4PSI4NTUiIHk9IjM1MiIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZmlsbD0iIzUyNTE0ZSIgZm9udC1zaXplPSIxMi41Ij50b3BvbG9neS1zY29yZWQ8L3RleHQ+CiAgPHRleHQgeD0iODU1IiB5PSIzNzAiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiM1MjUxNGUiIGZvbnQtc2l6ZT0iMTIuNSI+cGFpcmluZyAocHJvdG90eXBlKTwvdGV4dD4KICA8bGluZSB4MT0iNDcwIiB5MT0iNTAiIHgyPSI0NzAiIHkyPSIzOTAiIHN0cm9rZT0iI2UxZTBkOSIgc3Ryb2tlLXdpZHRoPSIxLjUiLz4KCiAgPHRleHQgeD0iNDgwIiB5PSI0MjQiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZpbGw9IiM1MjUxNGUiIGZvbnQtc2l6ZT0iMTIiPkFsbCBiYXJzOiB0aGlzIGNsdXN0ZXIgJiM4MjEyOyBncHQtb3NzLTEyMGIgb24gdHdvIEdLRSBBMyBVbHRyYSBub2RlcywgNDUgUVBTICYjMjE1OyAxMjAgcy4gQWxsIHZhbHVlcyBhcmUgbWVhbnMuPC90ZXh0PgogIDx0ZXh0IHg9IjQ4MCIgeT0iNDQ0IiB0ZXh0LWFuY2hvcj0ibWlkZGxlIiBmaWxsPSIjNTI1MTRlIiBmb250LXNpemU9IjEyIj5SZWZlcmVuY2U6IGxsbS1kJiM4MjE3O3MgY3VycmVudCBwdWJsaXNoZWQgUC9EIGd1aWRlIHJlcG9ydHMgMS4xNTcgcyBvbiB0aGUgc2FtZSAxNiYjMjE1OyBIMjAwIGNsYXNzIGFuZCA0NS1RUFMgaGFybmVzcy48L3RleHQ+Cjwvc3ZnPgo=" width="960" height="500" class="img_ev3q"></p>
<p><em>Figure 5: Left: the DCN/TCP configuration could not sustain the offered load; verified RDMA could. Right: the TTFT ladder, from unconstrained control to channel-verified to topology-scored. All TTFT values are means; percentiles are in the text.</em></p>
<p><strong>Limitations.</strong> The testbed is two nodes, so the topology decision space is small: these numbers demonstrate the mechanism, not its ceiling. Whether disaggregation itself beats aggregated serving for a given workload is out of scope; this post takes P/D as given and optimizes the network path underneath it.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="takeaways">Takeaways and Open Questions<a href="https://llm-d.ai/blog/topology-as-an-end-to-end-contract#takeaways" class="hash-link" aria-label="Direct link to Takeaways and Open Questions" title="Direct link to Takeaways and Open Questions" translate="no">​</a></h2>
<p>The layer where a failure appears is rarely the layer where it starts. A silent transport fallback surfaced as latency and then as decode-side memory errors; missing per-NIC routes surfaced as connection timeouts; topology-blind pairing surfaced as tail TTFT. Each component looked fine on its own; the composed path was what went wrong. SemiAnalysis's <a href="https://newsletter.semianalysis.com/p/clustermax-30-the-industry-standard" target="_blank" rel="noopener noreferrer" class="">ClusterMAX 3.0</a> review of managed GPU clusters reports the same pattern from the provider side: outside the NVL72 rack, "providers pick the topology, the cabling, and how Kubernetes or Slurm hands the fabric to a job. We found problems at every layer." That is why the lessons form a contract between layers rather than a checklist inside any one of them:</p>
<ul>
<li class=""><strong>Discover.</strong> The platform publishes physical topology (PCIe root, NUMA node, rail and NIC identity) as device attributes, not just device counts.</li>
<li class=""><strong>Preserve.</strong> Allocation carries those attributes through. The test for any allocation API: can the scheduler co-constrain two devices on a shared physical attribute?</li>
<li class=""><strong>Verify.</strong> Runtime evidence, not configuration intent, is the source of truth for the transport path.</li>
<li class=""><strong>Consume.</strong> The router acts on topology. Path feasibility (enforced below the router) and capacity are hard constraints; among feasible paths, locality is a soft preference.</li>
</ul>
<p>Topology is one axis among several; the same decision also weighs capacity, KV-cache reuse, node pressure, and network load. The contract keeps topology in one consistent form, so a placement policy can weigh it against the others instead of rediscovering it.</p>
<p>Upstream Kubernetes is standardizing the attributes discovery needs. <a href="https://github.com/kubernetes/enhancements/issues/4381" target="_blank" rel="noopener noreferrer" class="">KEP-4381</a> defines <code>resource.kubernetes.io/pcieRoot</code>, the cross-driver attribute our A3 Ultra claims match on, and it already travels beyond GKE: llm-d's <a href="https://github.com/llm-d/llm-d/tree/main/guides/pd-disaggregation/modelserver/xpu/vllm-rdma" target="_blank" rel="noopener noreferrer" class="">Intel XPU RDMA recipe</a> uses the same constraint, and Amazon EKS's <a href="https://docs.aws.amazon.com/eks/latest/userguide/device-management-efa.html" target="_blank" rel="noopener noreferrer" class="">EFA DRA driver</a> documents it for aligning EFA interfaces with NVIDIA GPUs. Two gaps remain. On the NIC side, <a href="https://github.com/kubernetes-sigs/dranet/issues/261" target="_blank" rel="noopener noreferrer" class="">kubernetes-sigs/dranet#261</a> asks for virtual interfaces, such as A4X Max's ipvlan interfaces, to inherit their parent NIC's PCIe root; on the GPU side, GPUs must be DRA-allocated for a claim to match on it. When both hold, the A4X NIC-only claim and the A4X Max CEL chain can collapse into the one generic claim A3 Ultra and A4 use today.</p>
<p>The contract also reaches past P/D. With ModelExpress P2P, a pod loads model weights by pulling them from a peer pod's GPU memory over RDMA; our A3 Ultra overlay for it (<a href="https://github.com/llm-d/llm-d/pull/2423" target="_blank" rel="noopener noreferrer" class="">llm-d#2423</a>) reuses the same claims and UCX settings and moves 33.51 GB per TP rank in 0.70 s, roughly 380 Gbps.</p>
<p><strong>Open question: larger fabrics.</strong> The router plugins already select prefill and decode workers by topology, from host to region. What multi-leaf clusters add is calibration and congestion: how strongly topology should weigh against KV-cache reuse and load when nearby workers saturate, how to account for live uplink load and RoCE congestion that static labels do not capture, and whether sub-node workers need labels down to the rail, as our prototype used.</p>
<p>The deepest lesson of the four-platform bring-up is that per-platform assumptions rot as hardware evolves, so topology should be discovered and consumed as data rather than baked into deployment logic. A stack that treats topology as data absorbs the next platform by learning new attributes; one that bakes it in starts over. From H200 to GB300, the per-platform details changed every time; the contract carried over. The recipes behind the allocation and transport results, including DRA templates, transport configuration, and overlays for A3 Ultra/A4, A4X, and A4X Max, live in the <a href="https://github.com/llm-d/llm-d/blob/main/guides/pd-disaggregation/README.md" target="_blank" rel="noopener noreferrer" class="">llm-d P/D disaggregation guide</a> and ship with llm-d v0.9. Try them with the v0.9 topology-affinity plugins enabled, measure what topology is worth on your own clusters, and <a class="" href="https://llm-d.ai/community">join the discussion in the llm-d community</a>.</p>]]></content:encoded>
            <category>blog posts</category>
            <category>Networking</category>
            <category>Disaggregation</category>
            <category>Inference</category>
            <category>NIXL</category>
            <category>UCX</category>
        </item>
        <item>
            <title><![CDATA[llm-d v1.0: State-of-the-art inference, ready for Day 2]]></title>
            <link>https://llm-d.ai/blog/llm-d-v1.0-state-of-the-art-inference-ready-for-day-2</link>
            <guid>https://llm-d.ai/blog/llm-d-v1.0-state-of-the-art-inference-ready-for-day-2</guid>
            <pubDate>Tue, 20 Oct 2026 09:00:00 GMT</pubDate>
            <description><![CDATA[llm-d v1.0 graduates the configuration API to v1 and adds multi-tenant quality of service, zero-downtime operations, and agent-aware serving, taking state-of-the-art distributed inference from a stack that performs to one you can run as a Day 2 operation.]]></description>
            <content:encoded><![CDATA[<p>llm-d v1.0 is here, and it is the project's most important release so far. In under a year and a half, llm-d has gone from a shared idea among a handful of contributors to the open standard for distributed inference, built by more than 500 contributors from over 25 organizations: proven in production across every major accelerator, running on public clouds and sovereign on-prem fleets alike, and serving open models through both vLLM and SGLang. The founding vision, any model, any accelerator, any cloud, is now something you can deploy.</p>
<p>v1.0 is the release where that stack reaches maturity. llm-d already delivered hardware heterogeneity and advanced inference capabilities out of the box: prefix-aware routing, KV cache offloading, prefill/decode disaggregation, and wide expert parallelism. v1.0 brings that performance to the realities of Day 2 operations: serving multiple tenants, balancing competing priorities, upgrading without downtime, and supporting emerging agentic workloads, all within one suite of co-designed components that compose into your platform. Serving a frontier model fast is no longer the hard part. Running it reliably, for many tenants, through upgrades, under real load, is. That is what v1.0 is built for.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="delivering-state-of-the-art-performance">Delivering state-of-the-art performance<a href="https://llm-d.ai/blog/llm-d-v1.0-state-of-the-art-inference-ready-for-day-2#delivering-state-of-the-art-performance" class="hash-link" aria-label="Direct link to Delivering state-of-the-art performance" title="Direct link to Delivering state-of-the-art performance" translate="no">​</a></h2>
<p>The defining goal of the 0.x series was reach: inference infrastructure that is not locked to one vendor, one cloud, or one engine. llm-d got there. It runs state-of-the-art inference across NVIDIA, AMD, and Intel GPUs and Google TPUs, on managed clouds and sovereign on-prem clusters, and across open-source model servers including vLLM and SGLang, all behind the same routing and scheduling layer: prefix-cache and load-aware routing, KV cache offloading, prefill/decode disaggregation, wide expert parallelism, and batch and async inference. The founding promise of any model, any accelerator, any cloud stopped being a slogan and became a deployment target.</p>
<p>The proof came from running it in production across clouds, accelerator vendors, and enterprises.</p>
<ul>
<li class=""><strong>Google Cloud</strong> builds the GKE Inference Gateway on the llm-d Endpoint Picker, <a href="https://cloud.google.com/blog/products/ai-machine-learning/enhancing-vllm-for-distributed-inference-with-llm-d" target="_blank" rel="noopener noreferrer" class="">cutting time-to-first-token by more than 35%</a> in Vertex AI production while doubling its prefix-cache hit rate from 35% to 70%, and is integrating llm-d 1.0 into GKE across its TPU and NVIDIA portfolio.</li>
<li class=""><strong>AWS</strong> runs disaggregated inference on <a href="https://aws.amazon.com/blogs/machine-learning/introducing-amazon-sagemaker-hyperpod-inference-gateway/" target="_blank" rel="noopener noreferrer" class="">Amazon SageMaker HyperPod</a> with llm-d, pairing prefix-cache-aware routing with prefill/decode disaggregation and NIXL over Elastic Fabric Adapter to report <a href="https://aws.amazon.com/blogs/machine-learning/introducing-disaggregated-inference-on-aws-powered-by-llm-d/" target="_blank" rel="noopener noreferrer" class="">up to a 70% increase in tokens per second</a> versus standard vLLM.</li>
<li class=""><strong>DigitalOcean</strong> builds its distributed inference stack on llm-d for native GPU-type heterogeneity, serving the trillion-parameter <a href="https://www.digitalocean.com/blog/serving-kimi-k3-inference-engine" target="_blank" rel="noopener noreferrer" class="">Kimi K3 model</a> across both AMD and NVIDIA hardware.</li>
<li class=""><strong>Oracle Cloud Infrastructure</strong> runs llm-d on OCI bare-metal AMD MI300X with RDMA networking, and developed and validated the upstream <a href="https://blogs.oracle.com/ai-and-datascience/llm-inference-at-scale-with-llm-d-on-oci" target="_blank" rel="noopener noreferrer" class="">AMD deployment guide</a> on OCI.</li>
<li class=""><strong>Tesla and Red Hat</strong> run Llama 3.1 70B on llm-d across AMD MI300X GPUs and, in a coauthored <a href="https://github.com/kserve/website/blob/main/blog/2026-04-21-production-grade-llm-inference-kserve-llm-d-vllm.md" target="_blank" rel="noopener noreferrer" class="">KServe case study</a>, report a 3x increase in output tokens per second and a 2x reduction in time to first token from prefix-cache-aware routing.</li>
<li class=""><strong>Prime Intellect</strong> integrates llm-d into its <a href="https://github.com/PrimeIntellect-ai/prime-rl" target="_blank" rel="noopener noreferrer" class="">large-scale reinforcement learning stack</a>, pairing the router with prefill/decode disaggregation and KV cache offload for multi-node rollouts.</li>
<li class=""><strong>IBM Research</strong> self-hosts frontier open models on llm-d for <a href="https://research.ibm.com/blog/running-open-models-on-h100-gpus-with-llmd" target="_blank" rel="noopener noreferrer" class="">coding agents</a> and <a href="https://research.ibm.com/blog/open-agent-factories-and-distributed-inference-for-chip-design" target="_blank" rel="noopener noreferrer" class="">chip-design agents</a>, serving up to 3,000 concurrent coding agents on 544 NVIDIA H100 GPUs and reaching a roughly 98% prefix-cache hit rate at about $0.11 per million tokens, around 11.5x lower cost than a proprietary stack.</li>
<li class=""><strong>Mistral AI</strong> serves open models in production on llm-d as part of its <a href="https://mistral.ai/news/regional-inference-open-models-new-compute/" target="_blank" rel="noopener noreferrer" class="">regional inference offering</a>.</li>
<li class=""><strong>JetBrains</strong> runs llm-d behind Junie, its AI coding agent, using the scheduler's predicted-latency routing to keep responses fast under heavy agent load.</li>
<li class=""><strong>Red Hat</strong> ships llm-d as the distributed inference stack in <a href="https://www.redhat.com/en/blog/red-hat-ai-3-delivers-speed-accelerated-delivery-and-scale" target="_blank" rel="noopener noreferrer" class="">Red Hat AI</a>, generally available on OpenShift and on managed Kubernetes including Microsoft Azure and CoreWeave.</li>
</ul>
<p>Different clouds, different accelerators, different engines, one stack. These highlights come from a growing roster of <a href="https://github.com/llm-d/llm-d/blob/main/ADOPTERS.md" target="_blank" rel="noopener noreferrer" class="">more than 25 organizations</a> adopting llm-d, and that breadth, proven in production, is the foundation v1.0 is built on.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="why-day-2-is-hard">Why Day 2 is hard<a href="https://llm-d.ai/blog/llm-d-v1.0-state-of-the-art-inference-ready-for-day-2#why-day-2-is-hard" class="hash-link" aria-label="Direct link to Why Day 2 is hard" title="Direct link to Why Day 2 is hard" translate="no">​</a></h2>
<p>Getting a model to serve fast is Day 1. Keeping it serving, for many tenants, through upgrades, under unpredictable load, is Day 2, and it is where most inference stacks show their seams.</p>
<p>A production fleet carries mixed traffic: latency-sensitive interactive requests next to bursty agent workloads that reuse enormous amounts of context and spawn parallel work without warning. Priorities compete, and under load something has to give, so a premium tier has to stay protected while best-effort traffic absorbs the pressure. Upgrades and maintenance cannot mean downtime: you need to replace or fail over any component with no dropped requests and a cache that stays warm. Disaggregated deployments, which split prefill and decode across pools for efficiency, multiply the number of moving parts that have to roll forward together. Agentic traffic spends most of its compute on context rather than final tokens, so a stack that does not understand sessions and turns pays to recompute the same work again and again. And underneath all of it, inference has to be run like a service, with the observability to see what is happening and an owner who gets paged when it is not.</p>
<p>We know this because we run it. These are the requirements that showed up when the community, ourselves included, took llm-d from benchmarks to a standing production service. v1.0 addresses each of them directly.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="multi-tenant-quality-of-service">Multi-Tenant Quality of Service<a href="https://llm-d.ai/blog/llm-d-v1.0-state-of-the-art-inference-ready-for-day-2#multi-tenant-quality-of-service" class="hash-link" aria-label="Direct link to Multi-Tenant Quality of Service" title="Direct link to Multi-Tenant Quality of Service" translate="no">​</a></h2>
<p>A shared inference fleet has to keep latency-sensitive traffic responsive while absorbing bursty, unpredictable agent workloads. v1.0 makes that a first-class property of the router through centralized flow control.</p>
<p><strong>Priority- and fairness-aware flow control</strong> classifies every request by a flow key that combines a fairness ID (the tenant or workload) and a priority band, maintains a separate queue per flow, and dispatches by priority first, then cycles fairly across tenants within a band. Under saturation it does no-regret scheduling: it holds requests in the router rather than committing them to already-overloaded backend queues, so a burst from one tenant does not blow up latency for everyone else. <strong>Program-aware fairness</strong> lets operators express those policies per workload, and a <strong>probabilistic admission controller</strong> sheds load gracefully when demand exceeds capacity instead of failing hard. All of it now lives under a single <code>flowControl</code> configuration surface, and the defaults still mimic first-come-first-served, so existing deployments see no change until operators opt into multi-tenant policy. The result is that behind a single endpoint, a premium tier stays protected under load, measurably and not just by policy, while best-effort and batch traffic absorb the bursts.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="zero-downtime-operations">Zero-Downtime Operations<a href="https://llm-d.ai/blog/llm-d-v1.0-state-of-the-art-inference-ready-for-day-2#zero-downtime-operations" class="hash-link" aria-label="Direct link to Zero-Downtime Operations" title="Direct link to Zero-Downtime Operations" translate="no">​</a></h2>
<p>Day 2 is where most serving stacks show their seams, and disaggregated serving multiplies the risk. v1.0 is built so upgrades and maintenance do not interrupt traffic.</p>
<p><strong>Router high availability</strong> runs the Endpoint Picker with a hot standby that takes over scheduling if the active instance is replaced or fails, so routing never goes dark during a rollout. For disaggregated serving, <strong>DisaggregatedSet</strong> manages prefill and decode replicas as one logical unit: it gates readiness on a snapshot of the underlying pods and does revision-aware routing, so requests reach a prefill/decode pair only once both sides are fully rolled out and compatible. That makes <strong>coordinated, lockstep upgrades</strong> of a split prefill/decode deployment safe to run in place, instead of requiring a parallel fleet and a manual cutover. On the request path, a <strong>coordination layer in the router</strong>, consolidated into llm-d-router in this release, drives each request through its disaggregated encode, prefill, and decode stages, so a multi-phase pipeline is orchestrated as one flow rather than stitched together by the caller. Disaggregation is no longer only a performance technique; it is now something you can operate.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="a-stable-foundation-to-build-on">A Stable Foundation to Build On<a href="https://llm-d.ai/blog/llm-d-v1.0-state-of-the-art-inference-ready-for-day-2#a-stable-foundation-to-build-on" class="hash-link" aria-label="Direct link to A Stable Foundation to Build On" title="Direct link to A Stable Foundation to Build On" translate="no">​</a></h2>
<p><strong>The configuration API graduates to v1</strong>, a stable, versioned surface you can standardize a platform on and build against without chasing breaking changes between releases. Underneath it, the Endpoint Picker request path has been hardened across reliability, performance, and scalability and validated across clouds and accelerators, so the scheduler behaves the same whether it fronts a handful of replicas or a large fleet. <strong>Topology-aware accelerator scheduling</strong>, through a Dynamic Resource Allocation (DRA) and DRANET well-lit path, places work with awareness of device and network locality, so wide expert parallelism and disaggregated serving land on accelerators that are actually close together. The result is a foundation that behaves consistently from a single node to a large heterogeneous cluster.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="agent-aware-serving">Agent-Aware Serving<a href="https://llm-d.ai/blog/llm-d-v1.0-state-of-the-art-inference-ready-for-day-2#agent-aware-serving" class="hash-link" aria-label="Direct link to Agent-Aware Serving" title="Direct link to Agent-Aware Serving" translate="no">​</a></h2>
<p>Agentic workloads reuse enormous amounts of context across turns, and most of the compute goes to handling that context rather than producing the final tokens. v1.0 serves this traffic natively.</p>
<p><strong>Session-aware routing</strong> keeps a multi-turn conversation pinned to the replica that already holds its KV cache: a session-state-producer plugin tags requests with session state, and the router sends follow-ups back to the same backend. Affinity is sticky until saturated, so a session stays put until its replica fills up and then rebalances, trading a little cache locality for headroom instead of dropping requests. <strong>Turn-priority scheduling</strong> lets the router reason about where a request sits in an ongoing exchange, keeping an active agent loop responsive rather than treating every turn as an isolated request. And <strong>native Responses API state</strong>, including <code>previous_response_id</code>, lets the server carry context across turns so an agent does not resend its full history and the stack does not recompute it. For agent builders, that is less latency and lower cost without changing how they write their application.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="any-hardware-any-engine-any-cloud">Any hardware, any engine, any cloud<a href="https://llm-d.ai/blog/llm-d-v1.0-state-of-the-art-inference-ready-for-day-2#any-hardware-any-engine-any-cloud" class="hash-link" aria-label="Direct link to Any hardware, any engine, any cloud" title="Direct link to Any hardware, any engine, any cloud" translate="no">​</a></h2>
<p>The founding promise, any model on any accelerator in any cloud, only holds if the same stack genuinely runs everywhere, and that is not something any single vendor could deliver alone. llm-d keeps the routing, scheduling, and disaggregation layers the same across accelerators, and each platform has a well-lit path that uses its native capabilities without forking the stack. Getting there took deep collaboration: AMD, Google, Intel, NVIDIA, and the wider community contributed the data-movement libraries, communication primitives, and serving-engine integrations that make a hardware-independent control plane real. The platforms below are listed alphabetically.</p>
<p><strong>AMD.</strong> With v1.0, llm-d brings inference to AMD Instinct MI355X with AINIC across vLLM, SGLang, and AMD ATOM, with validated deployment guides. Wide expert parallelism spans several MI355X nodes, with MoRI-EP handling expert communication, and prefix-cache and predicted-latency routing direct requests across them. For long, context-heavy agent sessions, tiered prefix caching over vLLM native offload and LMCache extends effective KV cache capacity, and flow control and KEDA-based autoscaling handle multi-tenant QoS and scaling. To power disaggregated serving, llm-d integrates directly with MoRI-IO and NIXL on ROCm, scaling prefill and decode independently and moving KV blocks between the two phases.</p>
<p><strong>Google TPU.</strong> With v1.0, llm-d brings native PyTorch model serving to Google Cloud TPUs inside upstream vLLM and SGLang via TorchTPU, alongside validated GKE deployment guides. On an agentic coding workload on TPU 7x, llm-d's prefix-aware routing plus host memory KV cache offload cut median time-to-first-token (TTFT) by more than 85% and raised total throughput 2.4x versus a plain Kubernetes Service. To power disaggregated serving and tiered KV cache offloading, llm-d integrates directly with TPU Sync, the open-source data movement library for TPUs, to move KV blocks between TPU HBM, host memory, and disaggregated prefill/decode pools while inference keeps running and across rolling updates.</p>
<p><strong>Intel.</strong> Intel Xeon processors and GPU platforms deliver comprehensive support for core llm-d capabilities—including Intelligent Routing, Advanced KV-Cache Management, PD Disaggregation, and Traffic Control—backed by deep integration and validation across vLLM, SGLang, LMCache, and NIXL. To accelerate enterprise adoption, Intel collaborated with the llm-d community to contribute llm-d-lens, streamlining production deployments and observability. Looking ahead, this momentum will extend to Intel’s next-generation D-series GPUs (codenamed Crescent Island), which will deliver out-of-the-box support for llm-d to further advance the ecosystem.</p>
<p><strong>NVIDIA.</strong> llm-d brings inference to NVIDIA GPUs with CUDA-based images and validated deployment guides, with well-lit paths exercised on Hopper (H100 and H200), Blackwell (B200), and Grace Blackwell (GB200 NVL72 and GB300). Wide expert parallelism uses DeepEP for expert communication, and topology-aware scheduling places tightly coupled parallelism within the same NVLink domain, including a GB200 NVL72 rack's cross-node NVLink (MNNVL) fabric via the NVIDIA DRA ComputeDomain. To power disaggregated serving and tiered KV cache offloading, llm-d integrates directly with NIXL, contributed through NVIDIA Dynamo, to move KV blocks between GPU HBM, host memory, and prefill/decode pools, while ModelExpress speeds cold starts with peer-to-peer weight transfer. Support for the upcoming NVIDIA Vera Rubin platform is in progress.</p>
<p><strong>And more.</strong> Because llm-d's control plane is accelerator-independent and each platform needs only a thin native path, the supported set keeps widening. Community-contributed well-lit paths already run on Rebellions NPUs, Iluvatar BI-V150, and MetaX C500X GPUs, each with its own device allocation and KV-transfer connector but the same routing, scheduling, and disaggregation layer underneath. More backends are in progress, and the well-lit paths grow to meet new devices as they arrive.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="what-this-means-for-you">What This Means for You<a href="https://llm-d.ai/blog/llm-d-v1.0-state-of-the-art-inference-ready-for-day-2#what-this-means-for-you" class="hash-link" aria-label="Direct link to What This Means for You" title="Direct link to What This Means for You" translate="no">​</a></h2>
<p><strong>Platform teams</strong> get a release they can standardize on: a v1 configuration API, high-availability routing, and rolling upgrades that do not interrupt traffic, validated across clouds and accelerators, with the observability to run inference like a service rather than a science project.</p>
<p><strong>ML infrastructure teams</strong> get multi-tenant serving that stays predictable under load, and disaggregated deployments that are finally practical to operate, so a single fleet can carry mixed priorities without over-provisioning.</p>
<p><strong>Application and agent architects</strong> get serving that understands sessions and turns, reuses context instead of recomputing it, and keeps interactive traffic responsive even while heavy agent workloads run alongside it.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="what-is-next">What Is Next?<a href="https://llm-d.ai/blog/llm-d-v1.0-state-of-the-art-inference-ready-for-day-2#what-is-next" class="hash-link" aria-label="Direct link to What Is Next?" title="Direct link to What Is Next?" translate="no">​</a></h2>
<p>v1.0 is a foundation, not a finish line. The community is already working toward active-active router configurations, inference request fail-over and migration, wider upstream vLLM wide-expert-parallelism coverage on managed Kubernetes, and expanded multimodal and audio serving. The library of model-centric guides, tuned recipes for serving a specific frontier model on a specific accelerator, will keep growing, and deeper integration with GitOps control planes (e.g. ArgoCD) will make llm-d deployments first-class citizens in the platform pipelines teams already run. As new hardware and models arrive, the well-lit paths will grow to meet them, and the stack will keep evolving for peak performance across new architectures.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="community-and-contribution">Community and Contribution<a href="https://llm-d.ai/blog/llm-d-v1.0-state-of-the-art-inference-ready-for-day-2#community-and-contribution" class="hash-link" aria-label="Direct link to Community and Contribution" title="Direct link to Community and Contribution" translate="no">​</a></h2>
<p>llm-d is built in the open as a Cloud Native Computing Foundation (CNCF) sandbox project, with more than 500 contributors across 25-plus organizations spanning model labs, clouds, accelerator vendors, and enterprises.</p>
<ul>
<li class=""><strong>Docs and well-lit paths:</strong> <a href="https://llm-d.ai/" target="_blank" rel="noopener noreferrer" class="">llm-d.ai</a> walk you from a single node to a production fleet.</li>
<li class=""><strong>Code and release notes:</strong> <a href="https://github.com/llm-d" target="_blank" rel="noopener noreferrer" class="">github.com/llm-d</a>.</li>
<li class=""><strong>Join us:</strong> the <a href="https://llm-d.ai/slack" target="_blank" rel="noopener noreferrer" class="">Slack community</a>, the weekly community call, and across X, Bluesky, LinkedIn, and YouTube.</li>
</ul>
<p>If you are at PyTorch Conference this week, come find us and join our keynote, <a href="https://events.linuxfoundation.org/pytorch-conference-north-america/program/schedule/?id=1302854" target="_blank" rel="noopener noreferrer" class="">Open Source Inference at Production Scale</a>. We would love to show you what v1.0 can do.</p>
<p>Come build the future of distributed inference with us.</p>]]></content:encoded>
            <category>Releases</category>
            <category>Announcements</category>
            <category>llm-d release news</category>
        </item>
        <item>
            <title><![CDATA[Run 40% more post-training experiments on the same GPUs with llm-d time-slicing]]></title>
            <link>https://llm-d.ai/blog/increase-researcher-velocity-rl-llm-d-time-slicing</link>
            <guid>https://llm-d.ai/blog/increase-researcher-velocity-rl-llm-d-time-slicing</guid>
            <pubDate>Mon, 14 Sep 2026 10:00:00 GMT</pubDate>
            <description><![CDATA[Demonstrates llm-d time-slicing in a real-world use case: running more post-training experiments, SFT and full-parameter RL on different base models, concurrently on the same GPUs using the time-slicing stack via OpenRL.]]></description>
            <content:encoded><![CDATA[<p>When we <a href="https://llm-d.ai/blog/rl-post-training-co-operative-time-slicing" target="_blank" rel="noopener noreferrer" class="">introduced co-operative time-slicing in llm-d</a>, we made a claim: if RL phases become schedulable units, independent jobs can share accelerators with near-zero waste. Today we're backing that claim with a measured, end-to-end proof. For research teams, the claim cashes out as one thing: more experiments per week on the GPUs you already have.</p>
<p><a href="https://opensource.googleblog.com/2026/06/introducing-openrl-a-self-hosted-post-training-api-for-fine-tuning-llms.html" target="_blank" rel="noopener noreferrer" class="">OpenRL</a>, an open source, Kubernetes-native, Tinker-compatible, self-hosted fine-tuning service built on the llm-d time-slicing stack, runs many post-training jobs, SFT and reinforcement learning alike, concurrently on the same GPUs.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="key-results-at-a-glance">Key results at a glance<a href="https://llm-d.ai/blog/increase-researcher-velocity-rl-llm-d-time-slicing#key-results-at-a-glance" class="hash-link" aria-label="Direct link to Key results at a glance" title="Direct link to Key results at a glance" translate="no">​</a></h2>
<p>By time-slicing three distinct workloads (two RL, one SFT) on different base models, we achieved:</p>
<ul>
<li class=""><strong>40% more experiments in the same timeframe:</strong> On the same two GPUs, the three workloads finished in 39 minutes time-sliced versus 54 minutes run one after another, at just three jobs.</li>
<li class=""><strong>Every experiment started instantly:</strong> No job waited for a predecessor to finish; phase-level queue waits ran 1–15 seconds (median).</li>
<li class=""><strong>67% reduction in hardware footprint:</strong> Cut the required physical GPU count from 6 dedicated GPUs down to just 2 shared GPUs.</li>
<li class=""><strong>38% savings in GPU-hours vs. concurrent dedicated runs:</strong> Reduced total compute consumption from 2.10 to 1.30 GPU-hours against six dedicated GPUs running all jobs concurrently, and from 1.80 to 1.30 GPU-hours (28%) against the same two GPUs running the jobs serially.</li>
<li class=""><strong>Over 2x increase in GPU duty cycle:</strong> Boosted average trainer GPU utilization from 15.6% to 34.2%, with ample headroom for more jobs before saturation.</li>
<li class=""><strong>Zero quality degradation:</strong> All three workloads achieved identical convergence curves compared to their dedicated-GPU baselines.</li>
</ul>
<p>This post walks through what the time-slicing platform provides, what a managed RL service (RLaaS) adds, and what the combination measures.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-real-bottleneck-researcher-iteration-speed">The real bottleneck: researcher iteration speed<a href="https://llm-d.ai/blog/increase-researcher-velocity-rl-llm-d-time-slicing#the-real-bottleneck-researcher-iteration-speed" class="hash-link" aria-label="Direct link to The real bottleneck: researcher iteration speed" title="Direct link to The real bottleneck: researcher iteration speed" translate="no">​</a></h2>
<p>One researcher is fine-tuning a customer support assistant on internal tickets, another is training a text-to-SQL agent on proprietary database schemas, and every idea in the backlog is waiting on the same scarce GPUs. How many experiments actually run each week comes down to how those GPUs are shared.</p>
<p>For parameter-efficient methods like LoRA, engines like vLLM and PyTorch already let many jobs share one frozen base model. Full-parameter fine-tuning is the extreme case: every training step can mutate all weights, so each job needs the whole model, the whole optimizer state, and the whole GPU.</p>
<p>This has forced organizations into expensive choices:</p>
<ol>
<li class="">Queuing: forcing research teams to wait in line, slowing development velocity and time to market.</li>
<li class="">Siloed, dedicated GPUs: giving every team its own capacity, which caps how many experiments can run in parallel, yet still sits idle 30-74% of the time as RL alternates between generation and training.</li>
</ol>
<p>llm-d time-slicing eliminates this trade-off: jobs start the moment they are submitted, and even full-parameter customization runs at a fraction of the hardware cost.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="case-study-openrl">Case study: OpenRL<a href="https://llm-d.ai/blog/increase-researcher-velocity-rl-llm-d-time-slicing#case-study-openrl" class="hash-link" aria-label="Direct link to Case study: OpenRL" title="Direct link to Case study: OpenRL" translate="no">​</a></h2>
<p>Here is how that works in practice. The <a href="https://github.com/llm-d-incubation/llm-d-rl-time-slicing" target="_blank" rel="noopener noreferrer" class="">llm-d time-slicing stack</a> supplies the machinery — the Snapshot Agent that snapshots and restores a worker's state between VRAM and host memory, the TimeSlice Orchestrator that grants jobs exclusive access in turn, and a client library that wraps two RPCs, <code>acquire()</code> and <code>yield()</code>. What a managed service must add is exactly one thing: knowing where its jobs' phase boundaries are. That turns out to be the easy part.</p>
<p>The API <em>is</em> the phase structure. <a href="https://github.com/gke-labs/open-rl" target="_blank" rel="noopener noreferrer" class="">OpenRL</a> exposes <a href="https://tinker-docs.thinkingmachines.ai/tinker/" target="_blank" rel="noopener noreferrer" class="">Tinker-style primitives</a> — <code>generate_samples</code> for rollouts, <code>forward_backward</code> for training, and <code>optim_step</code> for the weight update. Every job arrives pre-decomposed into the schedulable units time-slicing was built around. The service wraps <code>acquire()</code> and <code>yield()</code> around each work unit, users write an ordinary training loop and get time-sliced accelerator sharing without knowing it exists.</p>
<p>The integration comes down to two moves:</p>
<ol>
<li class=""><strong>Oversubscribe the hardware.</strong> The OpenRL orchestrator provisions dedicated trainer and sampler workers per job and binds multiple jobs' workers to the same physical GPUs using <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/dynamic-resource-allocation/" target="_blank" rel="noopener noreferrer" class="">Kubernetes Dynamic Resource Allocation</a>. With per-job worker processes, jobs can bring different stacks — PyTorch FSDP or Megatron, vLLM or SGLang — to the same shared hardware.</li>
<li class=""><strong>Wrap GPU work units in acquire/yield.</strong> Each worker loop pops a work unit from its job queue, calls <code>acquire()</code>, runs the work, and calls <code>yield()</code>. The orchestrator and Snapshot Agent handle the rest — granting exclusive access in turn and context-switching job states. Work that doesn't need the GPU, like persisting checkpoints, runs from the host copy and never takes the lock.</li>
</ol>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="what-we-measured">What we measured<a href="https://llm-d.ai/blog/increase-researcher-velocity-rl-llm-d-time-slicing#what-we-measured" class="hash-link" aria-label="Direct link to What we measured" title="Direct link to What we measured" translate="no">​</a></h2>
<div class="theme-admonition theme-admonition-note admonition_xJq3 alert alert--secondary"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>Benchmark scope</div><div class="admonitionContent_BuS1"><p>Small demonstration runs like these (three jobs, two GPUs) are time-slicing's hardest case. The numbers below show the mechanism and its overheads, not a general platform benchmark or a TCO estimate: at production scale, phases run for minutes, switch costs amortize toward zero, and the reclaimable idle only grows.</p></div></div>
<p>To validate the architecture, we ran a highly heterogeneous, concurrent workload representing typical enterprise workloads:</p>
<ul>
<li class="">Job A (Text-to-SQL RL): Fine-tuning Qwen3-1.7B on the Spider dataset.</li>
<li class="">Job B (Math RL): Fine-tuning Qwen2.5-7B on GSM8K.</li>
<li class="">Job C (Dialogue SFT): Supervised fine-tuning of Gemma 4 E2B on MultiWOZ.</li>
</ul>
<p>All three jobs were multiplexed onto a shared pool of two NVIDIA H100 GPUs (one for training, one for sampling).</p>
<div style="text-align:center;margin:20px 0">
  <iframe src="/img/blogs/openrl-time-slicing/blog-interleaving.html" title="GPU occupancy animation" scrolling="no" style="width:100%;height:260px;border:0"></iframe>
</div>
<p><strong>All three jobs converged — matching baseline learning curves.</strong> The text-to-SQL job climbed from 25% to 43% in response accuracy, the math RL job roughly doubled its eval accuracy, and the dialogue SFT job's eval loss fell from 4.77 to 0.56 over 80 steps — a curve point-for-point identical to its baseline run. Overall, time-slicing changed where the jobs ran — not what they learned.</p>
<div style="text-align:center;margin:20px 0">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/openrl-time-slicing/convergence.webp" alt="Convergence: each job's time-sliced curve over its dedicated-GPU baseline" style="width:100%;height:auto" class="img_ev3q">
</div>
<p><strong>Higher resource efficiency.</strong> With one dedicated GPU per worker, these three jobs would hold six GPUs — a trainer and sampler each. Given the inherent dependency between trainer and sampler in synchronous RL, those GPUs sit largely idle — gaps the job itself cannot fill. Time-slicing fills them with other jobs' work: the same jobs run on two GPUs, lifting duty cycles roughly 2x compared with their dedicated-GPU runs.</p>
<div style="text-align:center;margin:20px 0">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/openrl-time-slicing/duty-cycle.webp" alt="Duty cycle: six dedicated baseline GPUs vs two time-sliced GPUs" style="width:100%;height:auto" class="img_ev3q">
</div>
<p><strong>Minimal system overhead.</strong> Context switches cost 0.5–1.6 seconds (median). Queue waits per phase run 1–15 seconds (median) — highest for the SFT job, whose short steps queue behind the RL jobs' longer phases.</p>
<div style="text-align:center;margin:20px 0">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/openrl-time-slicing/switch-wait.webp" alt="Context-switch time and queue wait per phase" style="width:100%;height:auto" class="img_ev3q">
</div>
<p>The full comparison:</p>





























<table><thead><tr><th></th><th>GPUs provisioned</th><th>Workload run time</th><th>GPU-hours</th></tr></thead><tbody><tr><td>Dedicated, all concurrent</td><td>6</td><td>21 min</td><td>2.10</td></tr><tr><td>Shared, jobs run serially</td><td>2</td><td>54 min</td><td>1.80</td></tr><tr><td><strong>Time-sliced</strong></td><td><strong>2</strong></td><td><strong>39 min</strong></td><td><strong>1.30</strong></td></tr></tbody></table>
<ul>
<li class=""><strong>Versus six dedicated GPUs</strong> — time-slicing provisions two-thirds fewer GPUs and pays for ~38% less GPU time.</li>
<li class=""><strong>Versus two GPUs running jobs serially</strong> — identical hardware, but time-slicing finishes the workload ~28% sooner, as it reclaims idle windows.</li>
</ul>
<p>The trade: an individual experiment runs 1.9–2.5x longer than it would on six dedicated GPUs. But that comparison assumes the six GPUs exist. With two, the real alternative is the queue, where an experiment is not slower, it is not running at all until its predecessor finishes. Time-slicing puts all three in flight at once on the same two GPUs, and the batch collectively finishes sooner than queuing them one after another. The reclaimed idle time turns the wait into experiment throughput.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="whats-next">What's next<a href="https://llm-d.ai/blog/increase-researcher-velocity-rl-llm-d-time-slicing#whats-next" class="hash-link" aria-label="Direct link to What's next" title="Direct link to What's next" translate="no">​</a></h2>
<p>We're rolling out a selective state offload backend on Snapshot Agent that allows snapshotting specific GPU memory regions — LoRA adapter weights, accumulated gradients, optimizer state — while the shared base model stays resident. One interface now does it all: whole-process parking for full-parameter jobs, region-level parking for LoRA jobs. In early testing, offloading LoRA adapters through this backend delivered a 2.8x gain in concurrent LoRA jobs on a single NVIDIA L4 trainer GPU.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="get-started-today">Get started today<a href="https://llm-d.ai/blog/increase-researcher-velocity-rl-llm-d-time-slicing#get-started-today" class="hash-link" aria-label="Direct link to Get started today" title="Direct link to Get started today" translate="no">​</a></h2>
<p>If you are building or scaling a multi-tenant post-training platform, you can start getting efficiency gains today:</p>
<ul>
<li class="">Deploy the <a href="https://github.com/llm-d-incubation/llm-d-rl-time-slicing" target="_blank" rel="noopener noreferrer" class="">time-slicing stack</a> today</li>
<li class="">Run <a href="https://github.com/gke-labs/open-rl" target="_blank" rel="noopener noreferrer" class="">OpenRL</a> and get this integration out of the box.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="acknowledgements">Acknowledgements<a href="https://llm-d.ai/blog/increase-researcher-velocity-rl-llm-d-time-slicing#acknowledgements" class="hash-link" aria-label="Direct link to Acknowledgements" title="Direct link to Acknowledgements" translate="no">​</a></h2>
<p>Thanks to <a href="https://github.com/Edwinhr716" target="_blank" rel="noopener noreferrer" class="">Edwin Hernandez</a>, <a href="https://github.com/jessicaochen" target="_blank" rel="noopener noreferrer" class="">Jessica Chen</a>, <a href="https://github.com/lynnl0927" target="_blank" rel="noopener noreferrer" class="">Ling Lin</a> and <a href="https://github.com/ShubyM" target="_blank" rel="noopener noreferrer" class="">Shuby Mishra</a> for bringing this to life.</p>]]></content:encoded>
            <category>blog posts</category>
            <category>Updates</category>
            <category>llm-d release news</category>
            <category>RL</category>
        </item>
        <item>
            <title><![CDATA[Serving Multimodal at Scale in llm-d]]></title>
            <link>https://llm-d.ai/blog/serving-multimodal-at-scale-in-llm-d</link>
            <guid>https://llm-d.ai/blog/serving-multimodal-at-scale-in-llm-d</guid>
            <pubDate>Mon, 31 Aug 2026 09:00:00 GMT</pubDate>
            <description><![CDATA[A multimodal request is not a text request with a picture attached. Walking the two side by side — payload, token accounting, cache identity, cost variance, and the encode stage — and showing what llm-d does about each difference. Sub-second TTFT p90 across a 5-40 req/s ladder and +44% throughput over round-robin on 16 H200s.]]></description>
            <content:encoded><![CDATA[<p>Text inference has a comfortable shape in llm-d. A request arrives as a few thousand tokens, prefill and decode run back to back on one replica, and a prefix-aware router keeps the KV cache warm. Every layer of the stack — scheduler, load balancer, autoscaler — is calibrated against that shape.</p>
<p>Then someone attaches an image, and it is tempting to think of the result as the same request with a picture bolted on.
It is not. A multimodal request differs from a text-only one in almost every property a serving system actually reads: how big it is, how much it costs, how long it takes before the first output token, what identity its cache entries have, and how many stages it has to move through.
The parts of the stack that were calibrated on text keep working, silently, on numbers that no longer mean what they used to.</p>
<p>This post walks those differences deliberately. First what makes media <em>content</em> different from text content.
Then what that does to an inference <em>request</em>, difference by difference. Then, for each one, what llm-d actually does about it — the token estimator, the content-hash routing path, the retuned affinity gate, and the encode tier.
Model server like vllm is the engine throughout; its per-replica mechanisms are the floor, not the answer.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="two-kinds-of-content">Two Kinds of Content<a href="https://llm-d.ai/blog/serving-multimodal-at-scale-in-llm-d#two-kinds-of-content" class="hash-link" aria-label="Direct link to Two Kinds of Content" title="Direct link to Two Kinds of Content" translate="no">​</a></h2>
<p>Text arrives already discretized. A prompt is a string, the tokenizer is deterministic and cheap, and the number of tokens is a property of the string itself — you can compute it in microseconds on a CPU, in a proxy, without a GPU or a model.</p>
<p>Media arrives as a continuous signal that has not been discretized yet. Pixels become tokens only after a learned encoder — a Vision Transformer — patches, projects, and merges them. Everything downstream follows from that one fact.</p>
<table><thead><tr><th style="text-align:left"></th><th style="text-align:left">Text content</th><th style="text-align:left">Media content</th></tr></thead><tbody><tr><td style="text-align:left">Representation</td><td style="text-align:left">Discrete symbols</td><td style="text-align:left">Continuous signal (pixels, samples, frames)</td></tr><tr><td style="text-align:left">Tokenization</td><td style="text-align:left">Deterministic, CPU-cheap, model-adjacent</td><td style="text-align:left">Requires a learned encoder on an accelerator</td></tr><tr><td style="text-align:left">Token count</td><td style="text-align:left">A function of the string</td><td style="text-align:left">A function of <em>resolution and model config</em>, not of byte size</td></tr><tr><td style="text-align:left">Size on the wire</td><td style="text-align:left">Proportional to token count</td><td style="text-align:left">Uncorrelated with token count</td></tr><tr><td style="text-align:left">Delivery</td><td style="text-align:left">Always by value</td><td style="text-align:left">By value (base64) <strong>or by reference</strong> (URL)</td></tr><tr><td style="text-align:left">Identity</td><td style="text-align:left">The string, and every prefix of it</td><td style="text-align:left">A content hash of the whole asset</td></tr></tbody></table>
<p>Two consequences deserve to be stated on their own, because nearly everything llm-d does about multimodal traffic exists to handle them.</p>
<p><strong>The request body does not tell you the prefill cost.</strong> For text, the length of the body is a decent proxy for the work a replica is about to do: bytes in, tokens out, roughly proportional, and the token count is what prefill is billed in.
For media that proxy breaks completely. A 1280x720 image is worth roughly 880 visual tokens to Qwen3-VL — more than most text prompts — whether it arrives as a 200 KB JPEG, a 2 MB PNG, or a 60-byte URL.
Meanwhile the same 200 KB of bytes could be a thumbnail worth 40 tokens or a document scan worth 4,000.
Byte count and token count are simply unrelated quantities.</p>
<p><strong>Identity is content-addressed, not prefix-addressed.</strong> Text caching works because prompts share prefixes — a system prompt is a literal prefix of every request that uses it, and every intermediate prefix is itself a cache key.
Media has no prefixes as text: half a JPEG is not a smaller JPEG. An image is one atomic unit that either matches or does not, keyed by a hash of its content.
That is a weaker matching structure than text's, but it has one very useful property: a content hash means the same thing on every pod in the fleet.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="two-kinds-of-requests">Two Kinds of Requests<a href="https://llm-d.ai/blog/serving-multimodal-at-scale-in-llm-d#two-kinds-of-requests" class="hash-link" aria-label="Direct link to Two Kinds of Requests" title="Direct link to Two Kinds of Requests" translate="no">​</a></h2>
<p>Now put a text-only request and a multimodal request next to each other on the same OpenAI-compatible endpoint, served by the same model.</p>
<div class="language-json codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-json codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token comment" style="color:hsl(230, 4%, 64%)">// Text-only</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token property" style="color:hsl(5, 74%, 59%)">"model"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"Qwen/Qwen3-VL-32B-Instruct"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"> </span><span class="token property" style="color:hsl(5, 74%, 59%)">"messages"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">[</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token property" style="color:hsl(5, 74%, 59%)">"role"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"user"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"> </span><span class="token property" style="color:hsl(5, 74%, 59%)">"content"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">[</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">   </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token property" style="color:hsl(5, 74%, 59%)">"type"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"text"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"> </span><span class="token property" style="color:hsl(5, 74%, 59%)">"text"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"Describe Seattle?"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">]</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">]</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token comment" style="color:hsl(230, 4%, 64%)">// Multimodal</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token property" style="color:hsl(5, 74%, 59%)">"model"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"Qwen/Qwen3-VL-32B-Instruct"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"> </span><span class="token property" style="color:hsl(5, 74%, 59%)">"messages"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">[</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token property" style="color:hsl(5, 74%, 59%)">"role"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"user"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"> </span><span class="token property" style="color:hsl(5, 74%, 59%)">"content"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">[</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">   </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token property" style="color:hsl(5, 74%, 59%)">"type"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"image_url"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"> </span><span class="token property" style="color:hsl(5, 74%, 59%)">"image_url"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token property" style="color:hsl(5, 74%, 59%)">"url"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"https://example.com/photo.jpg"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">   </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">{</span><span class="token property" style="color:hsl(5, 74%, 59%)">"type"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"text"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"> </span><span class="token property" style="color:hsl(5, 74%, 59%)">"text"</span><span class="token operator" style="color:hsl(221, 87%, 60%)">:</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"What is in this image?"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">]</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">]</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">}</span><br></div></code></pre></div></div>
<p>Both are valid chat completions against the same deployment. From the router's point of view they have almost nothing in common.</p>
<p><strong>1. The payload introduces complex asset types and external references, not just tokenizable text.</strong> While a standard router can easily read and tokenize a <code>text</code> part, introducing multimodal elements means the router suddenly encounters non-text structures. The heaviest and most expensive part of the request may not even be present in the payload: as seen in the multimodal example, an <code>image_url</code> is merely a reference, meaning the actual bytes live somewhere else.</p>
<p><strong>2. Token accounting requires model knowledge the tokenizer does not have.</strong> To price the text half you run a tokenizer. To price the image half you need the model's patch size and spatial merge strategy — and different model families answer differently enough that the same image is worth 900 tokens to one and 280 to another. There is no universal answer to "how many tokens is this image."</p>
<p><strong>3. There is a third stage, and it runs before anything else.</strong> A text request is prefill then decode. A multimodal request is encode, then prefill, then decode. The encode stage is a full ViT pass over every asset, and it is one-shot, compute-bound, and highly parallel across items — a different character from both of its neighbors:</p>
<table><thead><tr><th style="text-align:left">Stage</th><th style="text-align:left">Character</th><th style="text-align:left">Scales with</th></tr></thead><tbody><tr><td style="text-align:left"><strong>Encode (E)</strong></td><td style="text-align:left">One-shot, compute-bound, parallel across assets</td><td style="text-align:left">Number and resolution of media assets</td></tr><tr><td style="text-align:left"><strong>Prefill (P)</strong></td><td style="text-align:left">Large GEMMs, bandwidth-heavy</td><td style="text-align:left">Total context length (text + visual tokens)</td></tr><tr><td style="text-align:left"><strong>Decode (D)</strong></td><td style="text-align:left">Memory-bound, sequential</td><td style="text-align:left">Output length, batch size</td></tr></tbody></table>
<p>Nothing can be emitted until the encoder finishes, so encode time lands directly on TTFT. And while a replica is running a ViT over four 1080p images, it is not making progress on anyone else's decode — one image-heavy request stalls the whole batch.</p>
<p><strong>4. Cost variance within a single endpoint explodes.</strong> Text requests to a given endpoint are usually within an order of magnitude of each other. The two requests above are not: one is a handful of tokens with no encoder pass, the other is ~900 tokens of visual context plus a full ViT run. Both arrive at the same pool, and the same scheduler has to place them. Round-robin assumes requests are interchangeable. Here they differ by two orders of magnitude in cost, and the difference is invisible in the byte count.</p>
<p><strong>5. There are two caches to hit, not one.</strong> Text has the KV cache. Multimodal has the KV cache <em>plus</em> an encoder cache holding output embeddings keyed by media hash, and, upstream of that, a processor cache holding preprocessed pixel values. A request can miss the KV cache and still save the entire ViT pass by hitting the encoder cache. Cache-aware placement has more to win — and more ways to get it wrong.</p>
<p>Differences 1 through 5 are each individually survivable on one replica. On a fleet they compound, because every cache in the list above is per-instance. Deploy eight replicas behind a plain Kubernetes Service and round-robin will scatter five requests that share a system prompt and a product photo across five different pods: five ViT runs, five prefills, one cache hit's worth of value out of eight caches' worth of memory. Scaling out does not merely fail to help — every replica you add makes any given pod less likely to hold what the next request needs. Raising <code>--mm-processor-cache-gb</code> on a fleet that routes at random is buying more shelves for a warehouse whose orders arrive by lottery.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="how-llm-d-handles-a-multimodal-request">How llm-d Handles a Multimodal Request<a href="https://llm-d.ai/blog/serving-multimodal-at-scale-in-llm-d#how-llm-d-handles-a-multimodal-request" class="hash-link" aria-label="Direct link to How llm-d Handles a Multimodal Request" title="Direct link to How llm-d Handles a Multimodal Request" translate="no">​</a></h2>
<p>Each of the five differences maps to something concrete in the llm-d router (EPP) or in the deployment topology. Taking them in order.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="reading-a-payload-the-router-cannot-see-difference-1">Reading a payload the router cannot see (difference 1)<a href="https://llm-d.ai/blog/serving-multimodal-at-scale-in-llm-d#reading-a-payload-the-router-cannot-see-difference-1" class="hash-link" aria-label="Direct link to Reading a payload the router cannot see (difference 1)" title="Direct link to Reading a payload the router cannot see (difference 1)" translate="no">​</a></h3>
<p>EPP parses the content-part array and resolves per-asset metadata before it can do anything else. How it gets that metadata depends on how the asset was delivered:</p>
<ul>
<li class=""><strong>Inline images</strong> (raw bytes, base64 data URI) — EPP reads width and height directly out of the image content. Exact, no network call.</li>
<li class=""><strong>Image URLs</strong> — EPP does <strong>not</strong> fetch the remote content. It falls back to a configured <code>defaultResolution</code>. This is a deliberate trade: fetching would put an unbounded external round-trip on the routing hot path. But it means URL-heavy traffic is being priced at a constant, and that constant should reflect your actual traffic.</li>
<li class=""><strong>Video</strong> — EPP cannot inspect video at all, so clients supply metadata via headers: <code>x-llm-d-video-fps</code>, <code>x-llm-d-video-duration-seconds</code>, and <code>x-llm-d-video-resolution</code> (as <code>WIDTHxHEIGHT</code>). Anything omitted falls back to a configured default.</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="pricing-a-multimodal-asset-with-metadata-alone-difference-2">Pricing a multimodal asset with metadata alone (difference 2)<a href="https://llm-d.ai/blog/serving-multimodal-at-scale-in-llm-d#pricing-a-multimodal-asset-with-metadata-alone-difference-2" class="hash-link" aria-label="Direct link to Pricing a multimodal asset with metadata alone (difference 2)" title="Direct link to Pricing a multimodal asset with metadata alone (difference 2)" translate="no">​</a></h3>
<p>With metadata in hand, the <code>token-producer</code> plugin has to put a token count on each asset. How it gets there depends on which backend the plugin is configured with, and the distinction matters because only one of the two paths needs any of the tuning below:</p>
<ul>
<li class=""><strong>With a real tokenizer</strong> — the <code>vllm</code> backend, where EPP calls vLLM's <code>/v1/chat/completions/render</code> endpoint (typically a GPU-less <code>vllm launch render</code> sidecar in the EPP pod or a standalone render deployment in llm-d) — there is nothing to estimate. vLLM runs the model's own processor and returns exact token IDs along with the multimodal placeholder counts, so none of the <code>estimate</code> configuration below is read at all. This is also what precise prefix-cache-aware routing requires, since block keys have to line up with the engine's real tokens.</li>
<li class=""><strong>Without one</strong> — the default <code>estimate</code> backend, which is tokenizer-free byte-packing and needs no model, no sidecar, and no network hop — EPP has no processor to ask. It approximates the placeholder count from the metadata it just resolved, and everything in the rest of this section applies to that path only.</li>
</ul>
<p>So the estimator is the price you pay for skipping the tokenizer. It keeps routing decisions cheap and dependency-free, at the cost of having to encode a bit of the model's own arithmetic in EPP config. Models fall into two families, and the strategy is configurable per EPP.</p>
<p><strong>Dimension-based</strong> (Qwen-VL style) derives the count from resolution:</p>
<div class="language-text codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">tokens = (width × height) / factor</span><br></div></code></pre></div></div>
<p>with <code>factor = 1024</code> (32x32) for Qwen3-VL — one visual token per 32x32-pixel region, from patch size 16 and spatial merge 2. Video multiplies per-frame tokens by a sampled frame count: sample at <code>sampleFPS</code>, clamp to <code>[minFrames, maxFrames]</code>, divide by <code>temporalPatchSize</code>, then cap the total at <code>maxVideoTokens</code>.</p>
<div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token punctuation" style="color:hsl(119, 34%, 47%)">-</span><span class="token plain"> </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">type</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> token</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">-</span><span class="token plain">producer</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">parameters</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">estimate</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">image</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">mode</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> dynamic</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">defaultResolution</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">width</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">1280</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">height</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">720</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">dynamic</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">factor</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">1024</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">video</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">defaultResolution</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">width</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">1280</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">height</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">720</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">defaultDuration</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">10</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">tokensPerFrame</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">mode</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> dynamic</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">dynamic</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">            </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">factor</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">1024</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">frames</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">mode</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> sampled</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">minFrames</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">4</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">maxFrames</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">768</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">sampled</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">            </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">sampleFPS</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">2</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">            </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">temporalPatchSize</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">2</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">maxVideoTokens</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">12288</span><br></div></code></pre></div></div>
<p><strong>Fixed allocation</strong> (Gemma 4 style) ignores resolution entirely. The model allocates a fixed budget per image from a small set of supported values — 70, 140, 280, 560, or 1120, with 280 the default — and video uses a static per-frame count with strided frame selection.</p>
<div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token punctuation" style="color:hsl(119, 34%, 47%)">-</span><span class="token plain"> </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">type</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> token</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">-</span><span class="token plain">producer</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">parameters</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">estimate</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">image</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">mode</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> static</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">static</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">staticToken</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">280</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">video</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">defaultResolution</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">width</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">1280</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">height</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">720</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">defaultDuration</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">10</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">tokensPerFrame</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">mode</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> static</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">static</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">            </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">numTokensPerFrame</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">280</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">frames</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">mode</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> strided</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">minFrames</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">1</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">maxFrames</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">8</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">          </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">strided</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">            </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">frameStride</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">4</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">        </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">maxVideoTokens</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">12288</span><br></div></code></pre></div></div>
<p>Getting this wrong is a silent failure, which is why the guide calls it out in bold. Point the resolution-based estimator at <code>google/gemma-4-31B-it</code> and it prices a 1280x720 image at 900 tokens instead of 280. Every multimodal request is mis-priced, routing skews, and nothing in the logs says so. <strong>The estimator must match the served model</strong> — or configure the <code>vllm</code> render backend and let the model's own processor answer the question instead.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="balancing-requests-that-are-not-interchangeable-differences-3-and-4">Balancing requests that are not interchangeable (differences 3 and 4)<a href="https://llm-d.ai/blog/serving-multimodal-at-scale-in-llm-d#balancing-requests-that-are-not-interchangeable-differences-3-and-4" class="hash-link" aria-label="Direct link to Balancing requests that are not interchangeable (differences 3 and 4)" title="Direct link to Balancing requests that are not interchangeable (differences 3 and 4)" translate="no">​</a></h3>
<p>Affinity alone would pin traffic onto hotspots, so it composes with load. The <code>token-load-scorer</code> picks within the affinity-selected endpoint set on queued prefill token load — and this is precisely why the multimodal <code>token-producer</code> has to stay in the pipeline even when you are not using prefix routing.
The scorer needs a per-request token count, and an image input has no text length to read. Underneath, EPP scrapes each endpoint's <code>/metrics</code> every 50 ms by default and scores on queue depth, running requests, and KV-cache utilization.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="matching-on-content-identity-difference-5">Matching on content identity (difference 5)<a href="https://llm-d.ai/blog/serving-multimodal-at-scale-in-llm-d#matching-on-content-identity-difference-5" class="hash-link" aria-label="Direct link to Matching on content identity (difference 5)" title="Direct link to Matching on content identity (difference 5)" translate="no">​</a></h3>
<p>Difference 5 said there are two caches to hit, not one. llm-d has a distinct routing signal for each, and they are worth keeping separate in your head because they answer different questions: <em>does this pod hold the KV blocks for this prompt</em>, and <em>does this pod hold the encoder embeddings for this image</em>.</p>
<p>The content-hash property is what makes either work across a fleet: the same image produces the same key on every pod, so "who already has this" is a question EPP can answer without touching a GPU. (vLLM hashes each media item by content, and clients can supply stable <code>multi_modal_uuids</code> to make the identity explicit.)</p>
<p><strong>KV / prefix affinity.</strong> Once assets have footprints and hashes, they participate in the same two routing modes llm-d uses for text:</p>
<ul>
<li class=""><strong>Approximate prefix-cache-aware routing.</strong> EPP keeps an in-memory view of each endpoint's prefix-cache state covering both text and media assets, and prefers endpoints with a high match.</li>
<li class=""><strong>Precise prefix-cache-aware routing.</strong> EPP tokenizes the input and subscribes to each model server's KV-event channel, maintaining an indexer that maps <code>block key → endpoints</code>. Multimodal assets are converted to block keys from asset hash and size, so they take part in longest-prefix matching alongside text blocks.</li>
</ul>
<p><strong>Encoder-cache affinity.</strong> The prefix path treats a media asset as one more contributor to a token prefix. The encoder cache is a separate cache with its own hit condition: it is keyed on the asset hash alone, and hitting it saves the entire ViT pass regardless of what the surrounding text looks like. Two requests that share an image but no prompt prefix get nothing from prefix affinity and could still skip encoding entirely — if they land on the same pod.</p>
<p>llm-d exposes that as its own plugin pair. <code>mm-embeddings-cache-producer</code> extracts stable multimodal item hashes from <code>TokenizedPrompt.MultiModalFeatures</code> when a <code>token-producer</code> is configured, and otherwise falls back to reading typed OpenAI chat-completions media blocks directly — so it stays tokenizer-free for request shapes where the structured blocks are enough. It keeps a per-pod LRU of hashes that pod recently handled, and after each scheduling decision its <code>PreRequest</code> hook records the chosen endpoints for every hash in the request, asynchronously so it never blocks the request path. Repeated references to the same hash within one request count once.</p>
<p><code>mm-embeddings-cache-scorer</code> then converts that match data into a normalized score:</p>
<div class="language-text codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">score = matchedItemSize / totalRequestItemSize</span><br></div></code></pre></div></div>
<p>You can tell whether it is earning its weight from <code>encoder_cache_queries_total</code>, <code>encoder_cache_hits_total</code> (labelled by pod and modality), and the <code>encoder_cache_hit_ratio</code> histogram.
Note that the shipped multimodal guides do not enable this pair — they route on the prefix stack alone, which on their shared-prefix benchmark workload already co-locates the images with the prefixes.
Reach for encoder-cache affinity when your traffic reuses <em>assets</em> without reusing <em>prompts</em>: the same product photo behind many different questions, a document image revisited across a session, a template frame shared by unrelated requests.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="what-cache-aware-placement-is-worth">What Cache-Aware Placement Is Worth<a href="https://llm-d.ai/blog/serving-multimodal-at-scale-in-llm-d#what-cache-aware-placement-is-worth" class="hash-link" aria-label="Direct link to What Cache-Aware Placement Is Worth" title="Direct link to What Cache-Aware Placement Is Worth" translate="no">​</a></h2>
<p>The aggregation guide's <a href="https://github.com/llm-d/llm-d/tree/main/guides/multimodal-serving/aggregation#benchmarking-report" target="_blank" rel="noopener noreferrer" class="">benchmarking report</a> isolates the routing half of the above. Qwen3-VL-32B-Instruct on 16 H200 GPUs — 8 model servers, 2 H200s each at TP=2 — driven by a shared-prefix multimodal workload: three 720p images plus ~1.3K text tokens per request, 300-token completions, 600 prefix groups of 5 prompts, on a constant-rate ladder from 5 to 40 req/s with the <code>llm-d-benchmark</code> harness v0.7.0. The comparison is a stock Kubernetes Service round-robining across the same eight vLLM pods — no EPP, no scoring. Both configurations ran back-to-back on the identical fleet, with the token-based routing stack the guide now ships.</p>
<p>Output tokens/sec, higher is better; TTFT in seconds, lower is better.</p>
<table><thead><tr><th style="text-align:right">Rate (req/s)</th><th style="text-align:right">k8s output tok/s</th><th style="text-align:right">llm-d output tok/s</th><th style="text-align:right">k8s TTFT p50</th><th style="text-align:right">llm-d TTFT p50</th><th style="text-align:right">k8s TTFT p90</th><th style="text-align:right">llm-d TTFT p90</th></tr></thead><tbody><tr><td style="text-align:right">5</td><td style="text-align:right">1,408</td><td style="text-align:right">1,421</td><td style="text-align:right">0.401</td><td style="text-align:right">0.133</td><td style="text-align:right">0.487</td><td style="text-align:right">0.148</td></tr><tr><td style="text-align:right">10</td><td style="text-align:right">2,794</td><td style="text-align:right">2,836</td><td style="text-align:right">0.425</td><td style="text-align:right">0.078</td><td style="text-align:right">0.676</td><td style="text-align:right">0.147</td></tr><tr><td style="text-align:right">15</td><td style="text-align:right">4,241</td><td style="text-align:right">4,259</td><td style="text-align:right">0.420</td><td style="text-align:right">0.079</td><td style="text-align:right">0.788</td><td style="text-align:right">0.153</td></tr><tr><td style="text-align:right">20</td><td style="text-align:right">5,535</td><td style="text-align:right">5,634</td><td style="text-align:right">0.501</td><td style="text-align:right">0.080</td><td style="text-align:right">1.358</td><td style="text-align:right">0.158</td></tr><tr><td style="text-align:right">25</td><td style="text-align:right">6,782</td><td style="text-align:right">7,046</td><td style="text-align:right">0.849</td><td style="text-align:right">0.081</td><td style="text-align:right">2.330</td><td style="text-align:right">0.157</td></tr><tr><td style="text-align:right">30</td><td style="text-align:right">7,307</td><td style="text-align:right">8,444</td><td style="text-align:right">1.777</td><td style="text-align:right">0.083</td><td style="text-align:right">7.792</td><td style="text-align:right">0.225</td></tr><tr><td style="text-align:right">35</td><td style="text-align:right">7,272</td><td style="text-align:right">9,782</td><td style="text-align:right">11.060</td><td style="text-align:right">0.153</td><td style="text-align:right">21.192</td><td style="text-align:right">0.350</td></tr><tr><td style="text-align:right">40</td><td style="text-align:right">7,712</td><td style="text-align:right">11,128</td><td style="text-align:right">19.245</td><td style="text-align:right">0.155</td><td style="text-align:right">39.813</td><td style="text-align:right">0.399</td></tr></tbody></table>
<p>Read down the ladder and the two systems separate in a specific place. Through 25 req/s they are within a few percent on throughput — there is spare capacity, and routing has nothing to fix. What is already visible that early is latency: the Service's TTFT p90 has been climbing since rate 15 while llm-d's sits flat around 150 ms.</p>
<p>From ~25 req/s the Service tips into unbounded queueing. Its throughput plateaus near 7,300 tok/s and stays there for the rest of the ladder while its p90 goes 2.3 s → 7.8 s → 21.2 s → 39.8 s. llm-d keeps scaling across the same range, reaching <strong>11,128 tok/s at rate 40, +44% over the Service's 7,712</strong>, and holds <strong>sub-second TTFT p90 across the entire ladder</strong> (0.147–0.399 s). Median TTFT stays at or under 155 ms at every rate — roughly <strong>125x lower</strong> at the top — and the whole run completed with <strong>2 failed requests versus 27</strong>.</p>
<p>The guide's three plots (throughput, latency, and TTFT p90 against QPS) show the divergence more directly than the table does.</p>
<p>The mechanism is worth stating plainly: the affinity filter pins each prefix group's text and image blocks to the pod that already holds them, so repeat traffic prefills almost nothing and re-encodes almost nothing. Note what that implies about the <em>shape</em> of the win — it is not a uniform speedup, it is a saturation point moved. <strong>Capacity is a property of an instance; hit rate is a property of placement.</strong></p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="when-the-encode-stage-needs-its-own-hardware">When the Encode Stage Needs Its Own Hardware<a href="https://llm-d.ai/blog/serving-multimodal-at-scale-in-llm-d#when-the-encode-stage-needs-its-own-hardware" class="hash-link" aria-label="Direct link to When the Encode Stage Needs Its Own Hardware" title="Direct link to When the Encode Stage Needs Its Own Hardware" translate="no">​</a></h2>
<p>Cache-Aware Placement eliminates <em>redundant</em> encoding and prefill. It does nothing about encoding that genuinely has to happen. A fleet parsing documents with dozens of unique images, or transcribing video, runs the ViT on cold content all day. There the encoder is not a cache problem, it is a capacity problem — and it is sitting on GPUs bought for text generation, stalling decode every time it runs.</p>
<p>At that point difference 3 stops being a scheduling detail and becomes a topology decision. Encode, prefill, and decode have different bottlenecks and want different amounts of hardware; welded into one pod, you buy them in fixed proportion. llm-d ships two topologies that break them apart, with these shipped reference shapes:</p>
<ul>
<li class=""><strong>E/PD</strong> —  the two-stage pipeline, layering encode onto standard PD aggregation</li>
<li class=""><strong>E/P/D</strong> — the full three-stage pipeline, layering encode onto standard P/D disaggregation</li>
</ul>
<p>Because the encode stage only exists for requests that carry media, <strong>text-only requests skip it entirely regardless of topology</strong> — mixed traffic does not pay for a tier it does not use. And multiple assets in one request can be encoded concurrently across different encode workers, which is impossible when they are queued behind each other on a single replica.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="how-embeddings-move">How embeddings move<a href="https://llm-d.ai/blog/serving-multimodal-at-scale-in-llm-d#how-embeddings-move" class="hash-link" aria-label="Direct link to How embeddings move" title="Direct link to How embeddings move" translate="no">​</a></h3>
<p>The plumbing is vLLM's <strong>EC connector</strong>, the encoder-output analogue of the KV connector. An encode worker computes embeddings and publishes them; a downstream consumer fetches them instead of recomputing. The llm-d guide uses <code>ECCPUConnector</code>, which stages encoder outputs through CPU memory-mapped regions, with a <strong>NIXL data plane</strong> for the transfer and a <strong>ZMQ control plane</strong> carrying <code>XferReq</code> / <code>XferAck</code>.</p>
<div class="language-text codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">Client -&gt; Envoy -&gt; EPP -&gt; Decode Worker Sidecar</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">                              |</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">                              +-&gt; Encode Worker (multimodal content)</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">                              |       |</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">                              |       | === EC Connector ===</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">                              |       |  ZMQ (control): XferReq / XferAck</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">                              |       |  NIXL (data): direct memory write</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">                              |       |  v (embedding references)</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">                              +-&gt; Decode Worker (prefill + decode locally)</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">                              |</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">                              v</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">                          Response -&gt; Client</span><br></div></code></pre></div></div>
<p>EPP's <code>disagg-profile-handler</code> picks the decode pod, then an encode decider detects multimodal content and picks an encode pod. The request lands on the decode worker's routing sidecar, which dispatches encoding work to the chosen encode worker via an <code>x-encoder-hosts-ports</code> header. The encode worker returns embedding <em>references</em>; the consumer pulls the tensors over NIXL. In E/P/D the same pattern runs one hop earlier — the prefill worker consumes the embeddings, then ships KV to decode.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-engine-flags">The engine flags<a href="https://llm-d.ai/blog/serving-multimodal-at-scale-in-llm-d#the-engine-flags" class="hash-link" aria-label="Direct link to The engine flags" title="Direct link to The engine flags" translate="no">​</a></h3>
<p>llm-d wires the tiers together; per-worker behavior is set on the engine. An encode-only worker, from the guide's <code>encode-deployment.yaml</code>:</p>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">vllm serve Qwen/Qwen3-VL-32B-Instruct </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --tensor-parallel-size</span><span class="token operator" style="color:hsl(221, 87%, 60%)">=</span><span class="token number" style="color:hsl(35, 99%, 36%)">2</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --trust-remote-code </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --mm-processor-cache-gb </span><span class="token number" style="color:hsl(35, 99%, 36%)">20</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --mm-encoder-only </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --enforce-eager </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --no-enable-prefix-caching </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --ec-transfer-config </span><span class="token string" style="color:hsl(119, 34%, 47%)">'{"ec_connector": "ECCPUConnector", "ec_role": "ec_producer", "ec_connector_extra_config": {"num_ec_blocks": 1000000}}'</span><br></div></code></pre></div></div>
<p>Three of these are requirements rather than choices. <code>--mm-encoder-only</code> skips loading the language model, which is the whole point — the encode pod holds ViT weights only. <code>--enforce-eager</code> and <code>--no-enable-prefix-caching</code> are current constraints of vLLM's encoder-disaggregation path, not tuning knobs. <code>num_ec_blocks</code> sizes the shared encoder cache for multimodal items and defaults to 100,000; the guide raises it to 1,000,000 so large or numerous images do not trigger evictions and costly re-encodes.</p>
<p>The consumer side is a one-line change. In E/PD, the combined PD worker runs:</p>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --ec-transfer-config </span><span class="token string" style="color:hsl(119, 34%, 47%)">'{"ec_connector": "ECCPUConnector", "ec_role": "ec_consumer"}'</span><br></div></code></pre></div></div>
<p>In E/P/D that <code>ec_consumer</code> config goes on the <strong>prefill</strong> worker, alongside a <code>--kv-transfer-config</code> using <code>NixlConnector</code> for the prefill-to-decode hop. The E/P/D decode worker carries the KV config only and no EC config at all — it never touches embeddings.</p>
<p>Encode pods publish their side channel via <code>VLLM_EC_SIDE_CHANNEL_HOST</code> (from the pod IP) and <code>VLLM_EC_SIDE_CHANNEL_PORT</code>, 5610 in the guide.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="routing-three-pools">Routing three pools<a href="https://llm-d.ai/blog/serving-multimodal-at-scale-in-llm-d#routing-three-pools" class="hash-link" aria-label="Direct link to Routing three pools" title="Direct link to Routing three pools" translate="no">​</a></h3>
<p>Disaggregation changes what the router has to do, and the shipped values files show it directly. E/PD defines two scheduling profiles: an <code>encode</code> profile that filters to encode pods and scores on queue depth, and a <code>decode</code> profile running the full <code>prefix-cache-affinity-filter</code> plus <code>token-load-scorer</code> stack. E/P/D adds a third <code>prefill</code> profile with the same affinity stack and switches decode to an <code>active-request-scorer</code> — once prefill is separated, the decode pool is chosen on in-flight load rather than cache affinity.</p>
<p>Note that in E/PD prefill and decode are collocated, so the <code>decode</code> profile is deliberately scored like a <em>prefill</em> pool. It is an easy thing to get backwards when adapting these manifests.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="choosing-a-topology">Choosing a Topology<a href="https://llm-d.ai/blog/serving-multimodal-at-scale-in-llm-d#choosing-a-topology" class="hash-link" aria-label="Direct link to Choosing a Topology" title="Direct link to Choosing a Topology" translate="no">​</a></h2>
<table><thead><tr><th style="text-align:left">Dimension</th><th style="text-align:left">Aggregated</th><th style="text-align:left">Encode-disaggregated</th></tr></thead><tbody><tr><td style="text-align:left">Worker roles</td><td style="text-align:left">Homogeneous; every pod runs E+P+D</td><td style="text-align:left">Heterogeneous; encode pool plus PD or P/D pools</td></tr><tr><td style="text-align:left">Transfer overhead</td><td style="text-align:left">None — everything is local</td><td style="text-align:left">Low to medium; embeddings cross the network</td></tr><tr><td style="text-align:left">Multi-asset parallelism</td><td style="text-align:left">Sequential on one replica</td><td style="text-align:left">Parallel across encode workers</td></tr><tr><td style="text-align:left">Independent scaling</td><td style="text-align:left">No</td><td style="text-align:left">Yes, including different hardware per tier</td></tr><tr><td style="text-align:left">Deployment complexity</td><td style="text-align:left">Low</td><td style="text-align:left">High — multiple tiers, sidecars, NIXL overlays</td></tr><tr><td style="text-align:left">Best for</td><td style="text-align:left">Small or low-resolution media, smaller models, high cache hit rates</td><td style="text-align:left">Many or large assets, heavy ViTs, high concurrency</td></tr></tbody></table>
<p>Start aggregated. It is a single manifest and a router config, and if your traffic has meaningful prefix structure, cache-aware routing captures most of the available win at a fraction of the operational cost — that is what the 16-GPU benchmark measures.</p>
<p>Reach for disaggregation when the encoder is genuinely the bottleneck: a high multimodal-to-text ratio, several large assets per request, or a ViT heavy enough that running it inline visibly stalls decode.</p>
<p>And be honest about the crossover. <a href="https://www.lmsys.org/blog/2026-01-12-epd/" target="_blank" rel="noopener noreferrer" class="">SGLang's report</a> is blunt on this, and it applies equally here: for image-light workloads the network latency of shipping embeddings can outweigh the time saved by offloading, <strong>raising</strong> TTFT relative to collocation while dedicated encoder GPUs sit idle. Disaggregation is most efficient exactly when visual processing is the primary bottleneck. If it is not, you are paying for a tier and a network hop to solve a problem you do not have.</p>
<p>There is a middle path worth trying first: <code>--mm-encoder-tp-mode data</code> buys intra-replica encoder parallelism with no topology change, no extra pods, and no embedding transfer.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="status-and-caveats">Status and Caveats<a href="https://llm-d.ai/blog/serving-multimodal-at-scale-in-llm-d#status-and-caveats" class="hash-link" aria-label="Direct link to Status and Caveats" title="Direct link to Status and Caveats" translate="no">​</a></h2>
<p>Encode disaggregation is under active development in both vLLM and the llm-d router, and the guide is marked experimental. As of llm-d <a href="https://github.com/llm-d/llm-d/releases/tag/v0.8.1" target="_blank" rel="noopener noreferrer" class="">v0.8.1</a> the e-disaggregation manifests pin a model-server image override pending upstream vLLM support (<a href="https://github.com/llm-d/llm-d/issues/1891" target="_blank" rel="noopener noreferrer" class="">llm-d#1891</a>), and vLLM's own EPD proxy documents stability for the 1E1P1D configuration. The <code>x-encoder-hosts-ports</code> dispatch contract and the EC connector interface are both still moving. Aggregated multimodal serving, by contrast, is the well-lit path — a standard deployment plus router configuration, and where most deployments should begin.</p>
<p>The reference material is all in the llm-d repository:</p>
<ul>
<li class=""><a href="https://github.com/llm-d/llm-d/tree/main/guides/multimodal-serving" target="_blank" rel="noopener noreferrer" class="">Multimodal serving guide index</a> — aggregation vs. e-disaggregation, and how to choose</li>
<li class=""><a href="https://github.com/llm-d/llm-d/tree/main/guides/multimodal-serving/aggregation" target="_blank" rel="noopener noreferrer" class="">Aggregation guide</a> — manifests for NVIDIA GPU, Intel XPU, and TPU v7, plus the full benchmark report</li>
<li class=""><a href="https://github.com/llm-d/llm-d/tree/main/guides/multimodal-serving/e-disaggregation" target="_blank" rel="noopener noreferrer" class="">E-disaggregation guide</a> — E/PD and E/P/D manifests and request flows</li>
<li class=""><a href="https://github.com/llm-d/llm-d/blob/main/docs/well-lit-paths/workloads/multimodal-serving.md" target="_blank" rel="noopener noreferrer" class="">Multimodal workload well-lit path</a> — the scheduling and token-estimation reference</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="get-involved-with-llm-d">Get Involved with llm-d<a href="https://llm-d.ai/blog/serving-multimodal-at-scale-in-llm-d#get-involved-with-llm-d" class="hash-link" aria-label="Direct link to Get Involved with llm-d" title="Direct link to Get Involved with llm-d" translate="no">​</a></h2>
<ul>
<li class="">Explore the llm-d Community Quickstart Guide → <a href="https://github.com/llm-d/llm-d/blob/main/README.md" target="_blank" rel="noopener noreferrer" class="">Start here</a></li>
<li class="">Join our Slack → <a href="https://inviter.co/llm-d-slack" target="_blank" rel="noopener noreferrer" class="">Get your invite</a> and connect with maintainers and contributors</li>
<li class="">Explore the code → <a href="https://github.com/llm-d" target="_blank" rel="noopener noreferrer" class="">Browse our GitHub organization</a></li>
<li class="">Attend meetings → All meetings are open! Add our <a href="https://red.ht/llm-d-public-calendar" target="_blank" rel="noopener noreferrer" class="">public calendar</a></li>
</ul>]]></content:encoded>
            <category>blog posts</category>
            <category>Multimodal</category>
            <category>VLM</category>
            <category>Inference</category>
            <category>Disaggregation</category>
            <category>Scheduling</category>
            <category>KV Cache</category>
            <category>vLLM</category>
        </item>
        <item>
            <title><![CDATA[llm-d v0.9: Hardened for Scale]]></title>
            <link>https://llm-d.ai/blog/llm-d-v0.9-hardened-for-scale</link>
            <guid>https://llm-d.ai/blog/llm-d-v0.9-hardened-for-scale</guid>
            <pubDate>Fri, 28 Aug 2026 09:00:00 GMT</pubDate>
            <description><![CDATA[llm-d v0.9 hardens the router for production scale with HA, KEDA-native autoscaling, and end-to-end observability — while expanding to diffusion models, GB200/GB300 hardware, and next-generation disaggregated inference.]]></description>
            <content:encoded><![CDATA[<p>If v0.8 was about declaring llm-d an inference control plane, v0.9 is about proving it at production scale. The router gains high availability so that no single endpoint picker failure drops traffic. Flow control ships with bounded defaults that protect clusters out of the box. A formal plugin lifecycle gates experimental extensions behind explicit opt-in. And KEDA begins replacing Prometheus Adapter as the autoscaling foundation, aligning llm-d with the Kubernetes-native scaling ecosystem.</p>
<p>The v0.8 release previewed four themes for v0.9 — agentic inference, RL workflow maturity, scaling and hardening, and accelerator expansion — and this release advances all four. DisaggregatedSet revision routing makes P/D rolling updates safe for the first time. GPU utilization-aware routing scores endpoints by actual compute usage, not just queue depth. Diffusion model routing extends the control plane to image generation. And new well-lit paths land for GB200, GB300, Intel XPU, ROCm, and TPU v7 hardware. The reinforcement learning story advances from feasibility proof to architectural foundation, with time-slicing entering incubation.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="production-hardened-router">Production-Hardened Router<a href="https://llm-d.ai/blog/llm-d-v0.9-hardened-for-scale#production-hardened-router" class="hash-link" aria-label="Direct link to Production-Hardened Router" title="Direct link to Production-Hardened Router" translate="no">​</a></h2>
<p>The most consequential changes in v0.9 are about what happens when things go wrong.</p>
<p><strong>Router high availability</strong> introduces a multi-EPP topology where non-leader replicas keep their datastores populated and route traffic rather than returning 503. Requests that reach a standby replica route normally rather than failing, so a load balancer distributing traffic across EPP instances provides resilience without additional coordination. The new <code>--drain-timeout</code> flag enables graceful shutdown — the endpoint picker stops accepting new requests while draining in-flight traffic, preventing the connection resets that operators reported during rolling updates.</p>
<p><strong>Plugin stability lifecycle</strong> formalizes the maturity of every router plugin as Alpha, Beta, or Stable. Alpha plugins require <code>--allow-experimental-plugins</code> to activate, preventing accidental use of unproven extensions in production. Automated dependency validation ensures that a plugin's prerequisites are satisfied before the router starts, replacing runtime crashes with clear startup errors.</p>
<p><strong>Flow control</strong> ships with production-safe defaults for the first time. <code>defaultRequestTTL</code> defaults to 60 seconds and per-band <code>maxRequests</code> to 5000, bounding queue growth without operator intervention. Rejection codes now distinguish an empty endpoint pool (503) from retryable backpressure (429), giving load balancers and clients the signal they need to back off correctly. Priority-aware stepped gating and soft-reflective-ceiling policies give operators finer control over how traffic sheds under saturation.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="disaggregation-production-grade-operations">Disaggregation: Production-Grade Operations<a href="https://llm-d.ai/blog/llm-d-v0.9-hardened-for-scale#disaggregation-production-grade-operations" class="hash-link" aria-label="Direct link to Disaggregation: Production-Grade Operations" title="Direct link to Disaggregation: Production-Grade Operations" translate="no">​</a></h2>
<p>Disaggregated prefill/decode has been one of llm-d's deepest investments. v0.9 focuses on making it operationally robust.</p>
<p><strong>DisaggregatedSet revision routing</strong> solves the rolling update problem. During a model version rollout, the router understands which pods belong to which revision and routes accordingly, preventing the request failures that occurred when a prefill pod sent KV cache to a decode pod running a different model checkpoint. This is the kind of operational safety that P/D disaggregation needs before platform teams will run it in production with confidence.</p>
<p><strong>Topology-aware routing</strong> extends this with a new filter and scorer that understands the physical P/D topology for placement decisions. CPU-tier-aware pull-source selection distributes KV transfer load proportionally across available sources, avoiding the hot spots that emerged when all decode pods pulled from the same prefill replica. An early offloading connector on the disaggregation sidecar begins exploring KV cache transfer without RDMA fabric, using vLLM's OffloadingConnector and ZMQ transport — an incubation-stage capability that may broaden where P/D disaggregation can run in future releases.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="routing-intelligence">Routing Intelligence<a href="https://llm-d.ai/blog/llm-d-v0.9-hardened-for-scale#routing-intelligence" class="hash-link" aria-label="Direct link to Routing Intelligence" title="Direct link to Routing Intelligence" translate="no">​</a></h2>
<p>The router's scheduling pipeline gains several capabilities that move it from heuristic-based to measurement-based decisions.</p>
<p><strong>GPU utilization-aware routing</strong> uses the DCGM extractor and a generic endpoint-attribute filter and scorer to route requests based on actual GPU utilization metrics rather than proxy signals like queue depth. Operators can now express routing policies in terms of the resource they actually care about — GPU compute — rather than inferring it from request counts.</p>
<p><strong>Session affinity</strong> via the <code>session_id</code> strategy keeps multi-turn conversations on the same backend where prior KV cache is resident. The header-based profile handler selects a scheduling profile per request from a header, enabling a single router deployment to apply different routing strategies to different traffic classes without separate endpoint picker instances.</p>
<p><strong>Sticky-until-saturated routing</strong> is now the <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing" target="_blank" rel="noopener noreferrer" class="">default strategy across all guides</a>. Requests stick to the endpoint with the best prefix cache match until that endpoint reaches a saturation threshold, then spill to the next-best option. This balances cache reuse against load distribution without manual tuning.</p>
<p><strong>The utilization filter</strong> replaces the former active-request-filter with a unified mechanism that caps endpoints on any combination of active, running, waiting, and KV-cache utilization. This consolidates what was previously multiple independent filters into a single, composable policy.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="multimodal-and-diffusion-model-support">Multimodal and Diffusion Model Support<a href="https://llm-d.ai/blog/llm-d-v0.9-hardened-for-scale#multimodal-and-diffusion-model-support" class="hash-link" aria-label="Direct link to Multimodal and Diffusion Model Support" title="Direct link to Multimodal and Diffusion Model Support" translate="no">​</a></h2>
<p>v0.9 extends the router to workload types that previous releases did not address.</p>
<p><strong>Image generation routing</strong> adds OpenAI-compatible <code>/v1/images/generations</code> endpoint handling for diffusion backends such as vLLM-Omni. This extends the router's API surface to cover generative image workloads alongside language models. Video input support in approximate prefix match enables the router to compute cache affinity for video-bearing multimodal requests, extending the prefix-cache optimization to vision-language models processing video.</p>
<p><strong>E/P/D heterogeneous serving</strong> with SGLang enables encode, prefill, and decode stages to run on mixed GPU and XPU hardware, with the router managing request flow across the heterogeneous topology. Multimodal predicted latency extends the latency predictor to account for the additional compute cost of processing image and video tokens alongside text, improving routing accuracy for multimodal workloads.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="keda-native-autoscaling">KEDA-Native Autoscaling<a href="https://llm-d.ai/blog/llm-d-v0.9-hardened-for-scale#keda-native-autoscaling" class="hash-link" aria-label="Direct link to KEDA-Native Autoscaling" title="Direct link to KEDA-Native Autoscaling" translate="no">​</a></h2>
<p>v0.9 begins the migration from Prometheus Adapter to KEDA as the autoscaling foundation.</p>
<p>New guides land for KEDA + EPP pool-level saturation metrics, where the endpoint picker exposes queue depth, in-flight request counts, and KV-cache pressure as KEDA-compatible scaling signals. The router becomes the source of truth for scaling decisions rather than relying on Prometheus queries against model server metrics. SLO-driven autoscaling combines KEDA with the predicted latency scorer, scaling based on whether the deployment can meet its latency targets rather than reacting to utilization thresholds after they are breached.</p>
<p><strong>Queue-based KEDA + EPP autoscaling</strong> now runs in nightly CI on OpenShift with GPU, validating that the scaling path works end-to-end on every commit. The Workload Variant Autoscaler continues to support the existing Prometheus Adapter path for operators who have not yet migrated.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="observability-and-security">Observability and Security<a href="https://llm-d.ai/blog/llm-d-v0.9-hardened-for-scale#observability-and-security" class="hash-link" aria-label="Direct link to Observability and Security" title="Direct link to Observability and Security" translate="no">​</a></h2>
<p>Production operations require visibility. v0.9 closes the observability gaps that operators reported during v0.8 deployments.</p>
<p><strong>End-to-end tracing</strong> adds OpenTelemetry spans over the scoring path and propagates trace context through the full P/D transfer chain — from request arrival through prefill scheduling, KV transfer, and decode completion. For the first time, operators can trace a single request across the entire disaggregated inference pipeline in their existing tracing infrastructure.</p>
<p><strong>mTLS</strong> for the EPP metrics endpoint and scrape sources hardens the security posture of the control plane. Configurable ext_proc TLS minimum version and cipher suites give security teams the controls they need. Bounded metric cardinality prevents label explosion on model-name and fairness-id dimensions, addressing the Prometheus memory issues that operators with many models or tenants encountered. The Grafana dashboard moves from the router repository to the main llm-d repo, and per-guide troubleshooting documentation ships for workload autoscaling and P/D disaggregation.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="new-well-lit-paths-and-accelerator-coverage">New Well-Lit Paths and Accelerator Coverage<a href="https://llm-d.ai/blog/llm-d-v0.9-hardened-for-scale#new-well-lit-paths-and-accelerator-coverage" class="hash-link" aria-label="Direct link to New Well-Lit Paths and Accelerator Coverage" title="Direct link to New Well-Lit Paths and Accelerator Coverage" translate="no">​</a></h2>
<p>Each release expands the set of tested, documented deployment patterns. v0.9 adds new well-lit paths, new hardware coverage, and new deployment topologies.</p>
<p><strong>Fast Model Actuation (FMA)</strong> is a new well-lit path that addresses cold-start latency. Combined with ModelExpress P2P weight transfer, model weights load via GPU-to-GPU RDMA rather than disk — one pod fetches from HuggingFace, and every other pod pulls directly from that pod's HBM over the RDMA fabric. This can significantly reduce cold-start time for large models by bypassing disk I/O entirely.</p>
<p><strong>Multi-model routing</strong> introduces the Inference Payload Processor (IPP), enabling multiple LLMs to serve behind a single gateway endpoint. IPP extracts the model name from request bodies and sets routing headers, letting HTTPRoutes direct traffic to the appropriate InferencePool. P2P KV cache sharing adds a new well-lit path where vLLM instances pull cached prefix KV blocks directly from a peer's CPU offload tier instead of recomputing them — extending cache reuse beyond a single pod without requiring a centralized cache store.</p>
<p><strong>NVIDIA GB200 (A4X) and GB300 (A4X-Max)</strong> receive P/D disaggregation overlays with DRA and RDMA recipes, bringing disaggregated inference to NVIDIA's latest data center hardware. Intel XPU expands to wide expert parallelism, tiered prefix cache with the lmcache connector, and multimodal optimized baseline — making XPU a viable platform for all three well-lit paths. ROCm gains predicted latency routing and P/D disaggregation with the MoRI connector. TPU v7 adds disaggregated P/D benchmarks for the agentic serving path.</p>
<p><strong>LiteLLM and Kong AI Gateway</strong> integration guides land for operators who want to front llm-d with an API management layer that handles authentication, rate limiting, and model routing across multiple providers. SGLang adds managed Lustre L3 offloading support and native filesystem offloading, expanding the tiered caching story to SGLang backends. The default vLLM image updates to v0.26.0.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="reinforcement-learning-incubation-and-direction">Reinforcement Learning: Incubation and Direction<a href="https://llm-d.ai/blog/llm-d-v0.9-hardened-for-scale#reinforcement-learning-incubation-and-direction" class="hash-link" aria-label="Direct link to Reinforcement Learning: Incubation and Direction" title="Direct link to Reinforcement Learning: Incubation and Direction" translate="no">​</a></h2>
<p>RL rollout generation is an inference problem — the same prefix-cache-aware, load-balanced scheduling that llm-d provides for production serving applies directly to the thousands of generation requests per training step. v0.9 establishes the early integration points, with active work in the <a href="https://github.com/llm-d-incubation/llm-d-rl" target="_blank" rel="noopener noreferrer" class="">llm-d-rl</a> and <a href="https://github.com/llm-d-incubation/llm-d-rl-time-slicing" target="_blank" rel="noopener noreferrer" class="">llm-d-rl-time-slicing</a> incubation repositories.</p>
<p><strong>Framework integrations</strong> with <a href="https://github.com/llm-d-incubation/llm-d-rl/tree/main/integrations/verl" target="_blank" rel="noopener noreferrer" class="">veRL</a> and <a href="https://github.com/llm-d-incubation/llm-d-rl/tree/main/integrations/vime" target="_blank" rel="noopener noreferrer" class="">vime</a> replace each framework's built-in load balancer with llm-d's scoring and filtering pipeline — bringing prefix-cache affinity, P2P KV cache sharing, and flow control to rollout generation without changes to the training code. Time-slicing enters incubation with an <a href="https://github.com/llm-d/llm-d/blob/main/proposals/rl-time-slicing-platform.md" target="_blank" rel="noopener noreferrer" class="">architecture proposal</a> and an early orchestrator that enables a single GPU fleet to alternate between training and inference phases within an RL step, targeting the 45–66% of accelerator time that synchronous RL loops typically leave idle.</p>
<p>This work is incubation-stage — APIs are evolving and production hardening is ahead. The full RL story targets v0.10 and beyond.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="what-this-means-for-you">What This Means for You<a href="https://llm-d.ai/blog/llm-d-v0.9-hardened-for-scale#what-this-means-for-you" class="hash-link" aria-label="Direct link to What This Means for You" title="Direct link to What This Means for You" translate="no">​</a></h2>
<p><strong>Platform teams</strong> running llm-d in production gain true HA support, flow control defaults that protect clusters without manual tuning, and a plugin lifecycle that prevents experimental code from reaching production unless explicitly enabled. The KEDA migration provides a standard autoscaling interface that integrates with existing Kubernetes scaling infrastructure. The metric renames in this release (EPP KV metrics move to the <code>llm_d_router_epp</code> subsystem) require dashboard and alert updates — deprecated aliases are available during the transition.</p>
<p><strong>ML infrastructure teams</strong> building RL training pipelines can follow the incubation-stage veRL and vime integrations, which bring llm-d's routing intelligence to rollout generation — with time-slicing on the horizon for GPU-efficient training. New accelerator overlays for GB200, GB300, and expanded XPU coverage give teams deploying across hardware generations tested recipes for each platform.</p>
<p><strong>Application architects</strong> building multimodal and generative applications get routing support for diffusion models alongside language models on shared infrastructure. Session affinity and header-based profile selection enable sophisticated traffic management for agentic and multi-turn workloads. End-to-end OTel tracing through the disaggregated pipeline provides the observability needed to debug latency issues in production.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="what-is-next">What Is Next?<a href="https://llm-d.ai/blog/llm-d-v0.9-hardened-for-scale#what-is-next" class="hash-link" aria-label="Direct link to What Is Next?" title="Direct link to What Is Next?" translate="no">​</a></h2>
<p>The <a href="https://github.com/llm-d/llm-d/milestones" target="_blank" rel="noopener noreferrer" class="">v0.10 milestone</a> targets September and continues along four directions.</p>
<p><strong>RL integration deepens.</strong> v0.9 established early veRL and vime integrations and introduced the time-slicing orchestrator. Next steps include end-to-end validation across more RL frameworks, weight synchronization hardening, and maturing time-slicing from prototype to deployable infrastructure.</p>
<p><strong>A standardized model server interface.</strong> The control plane needs a common API to query engine capabilities, manage lifecycle, and configure runtime parameters — independent of whether the engine underneath is vLLM, SGLang, or TensorRT-LLM. This is a prerequisite for the engine lifecycle management that time-slicing and fast model actuation require.</p>
<p><strong>KV-cache observability and intelligence.</strong> As the multi-tier cache hierarchy deepens, operators need visibility into hit rates, tier utilization, and eviction patterns. The KV cache layer targets a unified observability framework alongside smarter cache management policies.</p>
<p><strong>Autoscaling maturity.</strong> The KEDA foundation laid in v0.9 opens the door to proactive, SLO-driven scaling policies that anticipate demand rather than reacting to it.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="community-and-contribution">Community and Contribution<a href="https://llm-d.ai/blog/llm-d-v0.9-hardened-for-scale#community-and-contribution" class="hash-link" aria-label="Direct link to Community and Contribution" title="Direct link to Community and Contribution" translate="no">​</a></h2>
<p>The project's contributor base continues to grow, with contributions spanning the router, KV cache layer, guides, and CI infrastructure across multiple hardware platforms.</p>
<p>To get started with llm-d v0.9:</p>
<ul>
<li class=""><strong>Documentation</strong>: <a href="https://llm-d.ai/" target="_blank" rel="noopener noreferrer" class="">llm-d.ai</a></li>
<li class=""><strong>Guides</strong>: <a href="https://github.com/llm-d/llm-d/tree/release-0.9/guides" target="_blank" rel="noopener noreferrer" class="">Well-lit paths</a> for optimized baseline, prefix-cache routing, P/D disaggregation, batch gateway, flow control, autoscaling, and more</li>
<li class=""><strong>Release notes</strong>: <a href="https://github.com/llm-d/llm-d/releases/tag/v0.9.0" target="_blank" rel="noopener noreferrer" class="">v0.9.0 on GitHub</a></li>
<li class=""><strong>Slack community</strong>: Join the conversation at <a href="https://llm-d.ai/slack" target="_blank" rel="noopener noreferrer" class="">llm-d.ai/slack</a></li>
</ul>
<p>Follow <a href="https://twitter.com/llm_d" target="_blank" rel="noopener noreferrer" class="">@llm_d</a> on Twitter/X, <a href="https://bsky.app/profile/llm-d.bsky.social" target="_blank" rel="noopener noreferrer" class="">llm-d on Bluesky</a>, or <a href="https://www.linkedin.com/company/llm-d/" target="_blank" rel="noopener noreferrer" class="">llm-d on LinkedIn</a> for updates. Check <a href="https://llm-d.ai/community/events" target="_blank" rel="noopener noreferrer" class="">llm-d.ai/community/events</a> for upcoming community events and <a href="https://www.youtube.com/@llm-d" target="_blank" rel="noopener noreferrer" class="">llm-d on YouTube</a> for talks and demos. Come build with us.</p>]]></content:encoded>
            <category>Releases</category>
            <category>Announcements</category>
            <category>llm-d release news</category>
        </item>
        <item>
            <title><![CDATA[Seeing Through the Stack: End-to-End and Fine-Grained Tracing in llm-d]]></title>
            <link>https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d</link>
            <guid>https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d</guid>
            <pubDate>Wed, 26 Aug 2026 09:00:00 GMT</pubDate>
            <description><![CDATA[How llm-d stitches Gateway, EPP, KV-cache, P/D proxy, and vLLM into one OpenTelemetry trace, and instruments the scheduling decisions that metrics alone cannot explain.]]></description>
            <content:encoded><![CDATA[<p>Production llm-d deployments usually already expose Prometheus metrics, GPU utilization, and latency histograms. Those signals answer <em>whether</em> the fleet is healthy. They rarely answer the question that dominates incident response and optimization work:</p>
<blockquote>
<p><em>For this slow or failed request, which hop decided what, and where did the time actually go?</em></p>
</blockquote>
<p>That gap is structural. llm-d’s value sits in control-plane decisions: precise prefix-cache scoring, load-aware selection, prefill/decode (P/D) disaggregation, multi-hop proxies. Fleet aggregates cannot reconstruct those decisions after the fact. Distributed tracing can.</p>
<p>This post walks through two complementary capabilities now available across the llm-d stack:</p>
<ol>
<li class=""><strong>End-to-end (E2E) distributed tracing:</strong> one <code>trace_id</code> across Gateway → EPP → KV-cache → P/D proxy → vLLM</li>
<li class=""><strong>Fine-grained tracing:</strong> first-party spans at the decision points that make well-lit paths real</li>
</ol>
<p>Together they move observability from “the cluster looks busy” to “this request chose this pod for this cache score, ran prefill here, and spent most of its time to first token waiting in the decode queue.”</p>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>Blog key takeaways</div><div class="admonitionContent_BuS1"><ul>
<li class=""><strong>Metrics detect; traces explain.</strong> Prometheus/Grafana remain the detection and capacity plane; OpenTelemetry traces are the request-level causal spine for RCA and optimization validation.</li>
<li class=""><strong>E2E tracing</strong> propagates W3C Trace Context (<code>traceparent</code> / <code>tracestate</code>) so Gateway, EPP, KV-cache, P/D proxy, and vLLM share one tree, not four orphan timelines.</li>
<li class=""><strong>Fine-grained tracing</strong> manually instruments llm-d decisions (prefix-cache scoring, KV index lookup, P/D profile pick, proxy stages) that HTTP auto-instrumentation cannot name.</li>
<li class=""><strong>Telemetry is metadata-only:</strong> token counts, latencies, routing attributes, cache ratios, never prompts or completions.</li>
<li class=""><strong>Production defaults:</strong> parent-based ratio sampling at 10% unless you override it, an OpenTelemetry Collector in the middle, and GenAI semantic conventions where engines emit them.</li>
</ul></div></div>
<div style="text-align:center;margin:24px 0"><img src="https://llm-d.ai/img/blogs/distributed-tracing/figure1-observability-pillars.png" alt="Metrics, traces, and logs as complementary observability pillars in llm-d" style="width:95%;height:auto"><p style="text-align:center;font-size:0.9em;margin-top:8px"><em><strong>FIGURE 1</strong>: Metrics, traces, and logs answer different questions. This post focuses on traces as the request spine.</em></p></div>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="why-llm-inference-breaks-classical-just-add-apm-advice">Why LLM inference breaks classical “just add APM” advice<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#why-llm-inference-breaks-classical-just-add-apm-advice" class="hash-link" aria-label="Direct link to Why LLM inference breaks classical “just add APM” advice" title="Direct link to Why LLM inference breaks classical “just add APM” advice" translate="no">​</a></h2>
<p>Kubernetes-era Application Performance Monitoring (APM) habits assume relatively uniform microservices: short RPCs, similar cost per call, cheap retries. Distributed LLM inference violates those assumptions in ways that change what must be instrumented:</p>
<table><thead><tr><th style="text-align:left">Classical microservice</th><th style="text-align:left">Distributed LLM inference (llm-d)</th></tr></thead><tbody><tr><td style="text-align:left">Request cost is roughly similar</td><td style="text-align:left">Prefill vs decode, prompt length, and cache hit rate swing cost by orders of magnitude</td></tr><tr><td style="text-align:left">Stateless replicas are interchangeable</td><td style="text-align:left">KV-cache locality makes pods <em>not</em> interchangeable</td></tr><tr><td style="text-align:left">Latency is “service time + queue”</td><td style="text-align:left">Latency is admission + scoring + optional P/D coordination + engine phases</td></tr><tr><td style="text-align:left">One hop failure is obvious</td><td style="text-align:left">Failure can surface far from the decision that caused it</td></tr><tr><td style="text-align:left">Auto-instrumented HTTP spans are enough</td><td style="text-align:left">The important story is <em>inside</em> the scheduler and cache index</td></tr></tbody></table>
<p>llm-d already invests heavily in making those control-plane decisions correct; see <a class="" href="https://llm-d.ai/blog/intelligent-inference-scheduling-with-llm-d">Intelligent Inference Scheduling</a> and <a class="" href="https://llm-d.ai/blog/kvcache-wins-you-can-see">KV-Cache Wins You Can See</a>. Observability has to keep pace: if a precise prefix-cache win or a P/D mis-decision cannot be inspected on a real request, those paths cannot be operated or improved with confidence.</p>
<p>From an observability design standpoint, that means tracing is a first-class well-lit-path concern (configuration, sampling, span contracts, and backend wiring), not an optional debug switch flipped after an outage.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="design-goals-for-llm-d-tracing">Design goals for llm-d tracing<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#design-goals-for-llm-d-tracing" class="hash-link" aria-label="Direct link to Design goals for llm-d tracing" title="Direct link to Design goals for llm-d tracing" translate="no">​</a></h2>
<p>The <a href="https://github.com/llm-d/llm-d/blob/main/proposals/distributed-tracing.md" target="_blank" rel="noopener noreferrer" class="">distributed tracing proposal</a> and the operator guide <a class="" href="https://llm-d.ai/docs/operations/observability/tracing">Distributed Tracing</a> target five outcomes:</p>
<ol>
<li class=""><strong>Performance diagnostics:</strong> decompose TTFT / ITL / e2e latency across hops</li>
<li class=""><strong>Optimization validation:</strong> prove KV-aware routing and P/D policy behave as intended on individual requests</li>
<li class=""><strong>Error attribution:</strong> keep failures on the same tree as the scheduling decision that preceded them</li>
<li class=""><strong>Cost / usage attribution:</strong> token counts and cache effectiveness per request, not only fleet averages</li>
<li class=""><strong>Safe-by-default telemetry:</strong> metadata and timings without shipping user content into the backend</li>
</ol>
<p>Those outcomes require both <strong>breadth</strong> (E2E context propagation) and <strong>depth</strong> (fine-grained decision spans). Either alone is incomplete: a connected tree of opaque HTTP spans still hides why the scheduler chose a path; rich local spans without shared context still force timestamp archaeology.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="before-the-fragmented-request-story">Before: the fragmented request story<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#before-the-fragmented-request-story" class="hash-link" aria-label="Direct link to Before: the fragmented request story" title="Direct link to Before: the fragmented request story" translate="no">​</a></h2>
<p>Early llm-d rollouts (and many DIY inference platforms) typically show one of three incomplete pictures:</p>
<p><strong>Metrics-only.</strong> Dashboards for queue depth, GPU utilization, TTFT histograms. Excellent for SLOs and capacity planning. Blind for a single request’s path through scorers, proxies, and engines.</p>
<p><strong>Component-local traces.</strong> vLLM emits <code>llm_request</code>; the gateway logs a request ID; the P/D sidecar keeps local timers. Without shared context, engineers glue timelines together with wall-clock timestamps and hope clocks agree.</p>
<p><strong>Generic HTTP spans only.</strong> Auto-instrumentation draws <code>POST /v1/chat/completions</code> between services. It does not record why the prefix-cache scorer preferred pod B, or why the profile handler completed the request on decode alone instead of running a prefill leg first.</p>
<div style="text-align:center;margin:24px 0"><img src="https://llm-d.ai/img/blogs/distributed-tracing/figure2-before-after.png" alt="Before fragmented signals versus after one unified trace tree" style="width:98%;height:auto"><p style="text-align:center;font-size:0.9em;margin-top:8px"><em><strong>FIGURE 2</strong>: The operational difference E2E + fine-grained tracing is meant to create.</em></p></div>
<p>In observability terms: the stack had a <strong>detection plane</strong> without a reliable <strong>explanation plane</strong>.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="use-cases-the-instrumentation-targets">Use cases the instrumentation targets<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#use-cases-the-instrumentation-targets" class="hash-link" aria-label="Direct link to Use cases the instrumentation targets" title="Direct link to Use cases the instrumentation targets" translate="no">​</a></h2>
<p>These are the questions that drove span placement and attribute design.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="1-where-did-ttft-go">1. Where did TTFT go?<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#1-where-did-ttft-go" class="hash-link" aria-label="Direct link to 1. Where did TTFT go?" title="Direct link to 1. Where did TTFT go?" translate="no">​</a></h3>
<p>A chat or agent turn feels slow. Metrics report TTFT p95 is high. With a full trace, latency decomposes along:</p>
<p>Gateway admission → EPP scoring → optional P/D prefill → decode-side first-token attributes from the engine.</p>
<p>Debate about “network vs GPU” becomes secondary until the waterfall has identified the dominant span on the critical path.</p>
<div style="text-align:center;margin:24px 0"><img src="https://llm-d.ai/img/blogs/distributed-tracing/figure3-ttft-walkthrough.png" alt="Four-step TTFT root-cause walkthrough using metrics then traces" style="width:98%;height:auto"><p style="text-align:center;font-size:0.9em;margin-top:8px"><em><strong>FIGURE 3</strong>: Recommended RCA loop: detect with metrics, explain with traces, confirm with logs, verify the fix on subsequent sampled trees.</em></p></div>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="2-did-kv-cache-aware-routing-actually-help">2. Did KV-cache-aware routing actually help?<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#2-did-kv-cache-aware-routing-actually-help" class="hash-link" aria-label="Direct link to 2. Did KV-cache-aware routing actually help?" title="Direct link to 2. Did KV-cache-aware routing actually help?" translate="no">​</a></h3>
<p>Fleet-level cache hit rate can look healthy while a slice of traffic is still routed poorly. Fine-grained spans expose candidate endpoints, score distributions, and block hit ratios for <em>that</em> request. Which spans appear depends on how routing is configured: scorer-based setups emit <code>scoring</code> with one <code>scorer.&lt;scorer type&gt;</code> child per scorer, carrying <code>llm_d.epp.scorer.score.max</code> / <code>.avg</code> and <code>llm_d.epp.scorer.endpoints_scored</code> as attributes. The precise prefix-cache path adds <code>produce_precise_prefix_cache</code> (<code>llm_d.epp.producer.total_blocks</code>, <code>.max_match_blocks</code>) over an <code>index_lookup</code> (<code>llm_d.kv_cache.lookup.cache_hit</code>, <code>.blocks_found</code>). Prefix affinity there is not a scorer, so it appears as <code>prefix-cache-affinity-filter</code> shrinking the pool under <code>filter_endpoints</code>, while any scorers you also configure keep emitting their own <code>scoring</code> subtree next to it. On a warm repeat of a shared prefix, that subtree is where the hit becomes visible: in a capture on a two-pod deployment, the producer reported <code>max_match_blocks</code> equal to <code>total_blocks</code> at 13 of 13, the lookup reported <code>cache_hit=true</code>, and <code>filter_endpoints</code> narrowed two candidates to the single pod already holding those blocks. That is how precise prefix-cache scheduling is validated in production, in the same spirit as the wins in the <a class="" href="https://llm-d.ai/blog/kvcache-wins-you-can-see">KV-cache blog</a>, but request-scoped.</p>
<p>The affinity filter's own routing decision (sticky to the cache-affine pod, no match, overridden by load, or skipped for exploration) is captured today as the <code>llm_d_epp_prefix_cache_affinity_filter_decisions_total</code> metric, labeled by outcome, not yet as a span; a fine-grained span for it is tracked in <a href="https://github.com/llm-d/llm-d-router/issues/2539" target="_blank" rel="noopener noreferrer" class="">llm-d-router#2539</a>.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="3-was-pd-the-right-call">3. Was P/D the right call?<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#3-was-pd-the-right-call" class="hash-link" aria-label="Direct link to 3. Was P/D the right call?" title="Direct link to 3. Was P/D the right call?" translate="no">​</a></h3>
<p>Disaggregation is not free. <code>pick_disagg_profile</code> records each stage decision on <code>llm_d.epp.profile_handler.decision</code>: <code>run_decode</code>, then <code>run_prefill</code> or <code>skip_prefill</code>, and finally <code>complete_prefill-decode</code> or <code>complete_decode-only</code>. The handler is called once per stage, so a P/D request carries several of these spans rather than one. When separation adds coordination overhead instead of TTFT benefit, the rationale is on the span, ready for threshold tuning with evidence rather than folklore.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="4-which-component-failed-and-after-which-decision">4. Which component failed, and after which decision?<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#4-which-component-failed-and-after-which-decision" class="hash-link" aria-label="Direct link to 4. Which component failed, and after which decision?" title="Direct link to 4. Which component failed, and after which decision?" translate="no">​</a></h3>
<p>Errors set span status and remain attached to the parent tree. A decode failure still sits under the Gateway root that includes the scoring and profile decision that sent the request there. Mean time to resolution drops because causality does not have to be reconstructed from three log systems.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="5-can-tokens-and-cache-effectiveness-be-attributed-without-leaking-prompts">5. Can tokens and cache effectiveness be attributed without leaking prompts?<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#5-can-tokens-and-cache-effectiveness-be-attributed-without-leaking-prompts" class="hash-link" aria-label="Direct link to 5. Can tokens and cache effectiveness be attributed without leaking prompts?" title="Direct link to 5. Can tokens and cache effectiveness be attributed without leaking prompts?" translate="no">​</a></h3>
<p>vLLM’s <code>llm_request</code> spans carry GenAI semantic convention attributes (prompt/completion token counts, latency breakdowns). Combined with llm-d routing attributes, each sampled request yields a cost shape, still without putting prompt text into Jaeger or Tempo.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="architecture-request-path-and-telemetry-path">Architecture: request path and telemetry path<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#architecture-request-path-and-telemetry-path" class="hash-link" aria-label="Direct link to Architecture: request path and telemetry path" title="Direct link to Architecture: request path and telemetry path" translate="no">​</a></h2>
<p>llm-d tracing is built on four layers:</p>
<ul>
<li class=""><strong>Manual OpenTelemetry instrumentation</strong> in Gateway/EPP, KV-cache, and P/D proxy</li>
<li class=""><strong>Upstream engine tracing</strong> (vLLM <code>llm_request</code>, and the same OTEL env pattern for other capable engines)</li>
<li class=""><strong>W3C Trace Context</strong> propagation on HTTP hops</li>
<li class=""><strong>OTLP → OpenTelemetry Collector → backend</strong> (Jaeger in the recipes; Tempo or commercial backends in production)</li>
</ul>
<p>Sampling is <strong>parent-based ratio</strong> (<code>parentbased_traceidratio</code>), the only sampler these components accept, so one decision at the entrypoint covers the whole tree. For production traffic, start around <strong>10%</strong> (<code>OTEL_TRACES_SAMPLER_ARG=0.1</code>) and adjust for QPS, retention cost, and whether staging needs denser samples.</p>
<div style="text-align:center;margin:24px 0"><img src="https://llm-d.ai/img/blogs/distributed-tracing/figure4-architecture.png" alt="llm-d distributed tracing architecture with W3C propagation and OTLP export" style="width:98%;height:auto"><p style="text-align:center;font-size:0.9em;margin-top:8px"><em><strong>FIGURE 4</strong>: The request path carries W3C context; every component exports OTLP to a Collector that forwards to the trace backend.</em></p></div>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="component-responsibilities">Component responsibilities<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#component-responsibilities" class="hash-link" aria-label="Direct link to Component responsibilities" title="Direct link to Component responsibilities" translate="no">​</a></h3>
<table><thead><tr><th style="text-align:left">Layer</th><th style="text-align:left">Span role</th><th style="text-align:left">What to inspect</th></tr></thead><tbody><tr><td style="text-align:left"><strong>Gateway</strong></td><td style="text-align:left"><code>request</code> (SERVER): the root when the gateway's own tracing is off, otherwise a child of the gateway's span; injects <code>traceparent</code> / <code>tracestate</code></td><td style="text-align:left">Total e2e time; whether context reached children</td></tr><tr><td style="text-align:left"><strong>EPP plugins</strong></td><td style="text-align:left"><code>request_orchestration</code> over scoring, profile pick, and pre-request spans</td><td style="text-align:left">Why an endpoint / mode was chosen</td></tr><tr><td style="text-align:left"><strong>KV-cache</strong></td><td style="text-align:left"><code>index_lookup</code> on the request path, <code>index_add</code> when speculative indexing records the request's own blocks, <code>index_evict</code> from KV-event processing; emitted inside the EPP process, so they carry the EPP service name in Jaeger; attributes keep the <code>llm_d.kv_cache.*</code> prefix even though the span names no longer do</td><td style="text-align:left">Block hits, lookup cost, index churn</td></tr><tr><td style="text-align:left"><strong>P/D proxy</strong></td><td style="text-align:left"><code>&lt;METHOD&gt; &lt;path&gt;</code> (otelhttp) → <code>forward_request</code> → conditional prefill/decode children</td><td style="text-align:left">Stage timing, connector, skip reasons</td></tr><tr><td style="text-align:left"><strong>vLLM (or peer engine)</strong></td><td style="text-align:left">Continued <code>llm_request</code> with GenAI attributes</td><td style="text-align:left">Prefill/decode time, TTFT, token usage</td></tr></tbody></table>
<!-- -->
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="propagation-and-sampling-details">Propagation and sampling details<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#propagation-and-sampling-details" class="hash-link" aria-label="Direct link to Propagation and sampling details" title="Direct link to Propagation and sampling details" translate="no">​</a></h3>
<p>A few mechanics matter when validating a deployment:</p>
<ul>
<li class=""><strong>Entry sampling wins.</strong> With <code>parentbased_traceidratio</code>, the gateway (or an upstream traced client) decides once. Downstream components should respect that parent decision so the tree stays complete; partial trees are worse than fewer trees.</li>
<li class=""><strong>Headers are the contract.</strong> W3C <code>traceparent</code> / <code>tracestate</code> must survive Envoy, ext-proc, and sidecar hops. Dropped headers produce orphan <code>llm_request</code> spans that look “traced” but cannot join the gateway root.</li>
<li class=""><strong>Collectors are not optional in production.</strong> Exporting OTLP directly from every pod to a UI backend skips batching, noise filtering (for example <code>/metrics</code> scrapes), and fan-out to long-term storage. The recipes put a Collector in the path for that reason.</li>
<li class=""><strong>Service names are operational metadata.</strong> Set distinct <code>OTEL_SERVICE_NAME</code> values per role (<code>vllm-prefill</code>, <code>vllm-decode</code>, EPP/gateway name). Ambiguous names make multi-cluster Jaeger search painful.</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="why-manual-instrumentation-not-agents-alone">Why manual instrumentation (not agents alone)<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#why-manual-instrumentation-not-agents-alone" class="hash-link" aria-label="Direct link to Why manual instrumentation (not agents alone)" title="Direct link to Why manual instrumentation (not agents alone)" translate="no">​</a></h3>
<p>“Drop in an auto-instrumentation agent” is rejected as the sole control-plane strategy. Agents are useful for baseline HTTP/gRPC spans. They cannot emit:</p>
<ul>
<li class="">a profile-handler decision enum</li>
<li class="">a block hit ratio from the KV index</li>
<li class="">a score distribution across candidate pods</li>
</ul>
<p>Those are <strong>llm-d product semantics</strong>. They belong in first-party spans with stable <code>llm_d.*</code> attribute names, the same way first-party PromQL surfaces in the <a class="" href="https://llm-d.ai/docs/operations/observability">observability docs</a>.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="capability-1-end-to-end-tracing-breadth">Capability 1: End-to-end tracing (breadth)<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#capability-1-end-to-end-tracing-breadth" class="hash-link" aria-label="Direct link to Capability 1: End-to-end tracing (breadth)" title="Direct link to Capability 1: End-to-end tracing (breadth)" translate="no">​</a></h2>
<p>E2E tracing answers: <strong>show the whole journey of this request.</strong></p>
<p>The mechanism is intentionally standard:</p>
<ol>
<li class="">Create (or continue) a root span at the gateway.</li>
<li class="">Propagate W3C context on every hop to the P/D proxy and model servers.</li>
<li class="">Export via OTLP so the Collector assembles one tree in Jaeger/Tempo.</li>
</ol>
<p>Operationally, this removes timestamp archaeology. One <code>trace_id</code> surfaces gateway time, scheduling time, prefill, decode, and engine spans as parent/child relationships, even when those processes run in different pods (as long as they share the Collector/backend).</p>
<p><strong>Acceptance check in Jaeger:</strong> the EPP service name, which the router chart registers as <code>llm-d-router/epp</code>, and the engine names you set, such as <code>vllm-prefill</code> / <code>vllm-decode</code>, appear on the same trace. If only generic <code>GET</code>/<code>POST</code> spans appear, export is often working while llm-d/engine detailed instrumentation is not; follow the checklist in the <a class="" href="https://llm-d.ai/docs/operations/observability/tracing">tracing guide</a>.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="capability-2-fine-grained-tracing-depth">Capability 2: Fine-grained tracing (depth)<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#capability-2-fine-grained-tracing-depth" class="hash-link" aria-label="Direct link to Capability 2: Fine-grained tracing (depth)" title="Direct link to Capability 2: Fine-grained tracing (depth)" translate="no">​</a></h2>
<p>E2E alone can still leave a fat opaque span inside the scheduler. Fine-grained tracing opens those boxes with spans that name llm-d decisions.</p>
<div style="text-align:center;margin:24px 0"><img src="https://llm-d.ai/img/blogs/distributed-tracing/figure5-fine-grained-spans.png" alt="Fine-grained llm-d spans around scoring, KV index, P/D decisions, and engine request" style="width:95%;height:auto"><p style="text-align:center;font-size:0.9em;margin-top:8px"><em><strong>FIGURE 5</strong>: Fine-grained spans map onto the control-plane decisions that define llm-d.</em></p></div>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="span-map-representative">Span map (representative)<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#span-map-representative" class="hash-link" aria-label="Direct link to Span map (representative)" title="Direct link to Span map (representative)" translate="no">​</a></h3>
<table><thead><tr><th style="text-align:left">Span</th><th style="text-align:left">Insight</th></tr></thead><tbody><tr><td style="text-align:left"><code>request_orchestration</code></td><td style="text-align:left">The EPP-side envelope every decision span hangs from</td></tr><tr><td style="text-align:left"><code>filter_endpoints</code> / <code>pick_endpoints</code></td><td style="text-align:left">Candidate set before and after filters; top endpoints and scores</td></tr><tr><td style="text-align:left"><code>scoring</code> → <code>scorer.&lt;scorer type&gt;</code></td><td style="text-align:left">Endpoints scored, score max/avg, scorer name and weight</td></tr><tr><td style="text-align:left"><code>produce_precise_prefix_cache</code></td><td style="text-align:left">Resident-block match for the request (<code>total_blocks</code>, <code>max_match_blocks</code>)</td></tr><tr><td style="text-align:left"><code>index_lookup</code> / <code>index_add</code> / <code>index_evict</code></td><td style="text-align:left">Lookup and speculative add on the request path; eviction from KV-event processing</td></tr><tr><td style="text-align:left"><code>pick_disagg_profile</code></td><td style="text-align:left">Per-stage disaggregation decision (<code>run_prefill</code>, <code>complete_decode-only</code>, …)</td></tr><tr><td style="text-align:left"><code>prepare_disaggregation</code></td><td style="text-align:left">Whether prefill / encode headers were set for the proxy</td></tr><tr><td style="text-align:left"><code>&lt;METHOD&gt; &lt;path&gt;</code> → <code>forward_request</code> → <code>prefill</code> / <code>decode</code></td><td style="text-align:left">Stage timing, connector, targets, skip reasons</td></tr><tr><td style="text-align:left"><code>llm_request</code> (vLLM)</td><td style="text-align:left">Engine TTFT, phase times, token usage</td></tr></tbody></table>
<p>One naming detail is worth knowing before searching Jaeger: the scorer span uses the plugin <em>type</em>, not its instance name, so a profile that configures the same scorer twice (for example two <code>endpoint-attribute-scorer</code> instances scoring different attributes) produces two identically-named <code>scorer.endpoint-attribute-scorer</code> spans, distinguishable only by the <code>llm_d.epp.scorer.name</code> attribute.</p>
<p>Naming has now converged: every span name in llm-d-router is bare (<code>request</code>, <code>request_orchestration</code>, <code>filter_endpoints</code>, <code>scoring</code>, <code>scorer.&lt;type&gt;</code>, <code>pick_disagg_profile</code>, <code>index_lookup</code>, <code>prefill</code>, <code>decode</code>, the P/D proxy root <code>&lt;METHOD&gt; &lt;path&gt;</code>, …); component prefixes only remain on attributes (<code>llm_d.epp.*</code>, <code>llm_d.kv_cache.*</code>, <code>llm_d.pd_proxy.*</code>). The last holdouts, the <code>gateway.</code> prefix on the EPP root spans and the <code>llm_d.epp.</code>/<code>llm_d.pd_proxy.</code> prefixes on the scoring and P/D-proxy stage spans, were dropped in <a href="https://github.com/llm-d/llm-d-router/pull/2557" target="_blank" rel="noopener noreferrer" class="">llm-d-router#2557</a> and <a href="https://github.com/llm-d/llm-d-router/pull/2558" target="_blank" rel="noopener noreferrer" class="">llm-d-router#2558</a>. The <a class="" href="https://llm-d.ai/docs/operations/observability/tracing">tracing guide</a> is the source of truth if that changes again.</p>
<p>On the KV-cache side, a wrapper such as <code>NewTracedIndex</code> keeps tracing orthogonal to the index implementation: business logic stays clean; span names and attributes stay consistent. That pattern, <strong>instrumentation as a decorator</strong>, is the preferred control-plane approach over copy-pasted <code>StartSpan</code> calls inside every algorithm.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="attribute-contract-what-belongs-on-a-span">Attribute contract (what belongs on a span)<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#attribute-contract-what-belongs-on-a-span" class="hash-link" aria-label="Direct link to Attribute contract (what belongs on a span)" title="Direct link to Attribute contract (what belongs on a span)" translate="no">​</a></h3>
<div class="language-text codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"># KV index lookup (index_lookup)</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">llm_d.kv_cache.lookup.cache_hit = true</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">llm_d.kv_cache.lookup.blocks_found = 48</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">llm_d.kv_cache.index.lookup.block_count = 52</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"># Scoring (llm_d.epp.scorer.&lt;scorer type&gt;)</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">llm_d.epp.scorer.score.max = 0.91</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">llm_d.epp.scorer.score.avg = 0.44</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">llm_d.epp.scorer.endpoints_scored = 8</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"># Disaggregation profile handler (pick_disagg_profile)</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">llm_d.epp.profile_handler.decision = run_prefill</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">gen_ai.request.model = meta-llama/Llama-3.1-8B-Instruct</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"># vLLM / GenAI semantic conventions</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">gen_ai.usage.prompt_tokens = 128</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">gen_ai.usage.completion_tokens = 512</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">gen_ai.latency.time_to_first_token = 0.015</span><br></div></code></pre></div></div>
<p><strong>In scope:</strong> timings, counts, enums, bounded identifiers (model name, request ID where cardinality is managed), cache ratios, error status.</p>
<p><strong>Out of scope by design:</strong> raw prompts, completions, full token ID lists, unbounded label sets. Payload debugging belongs in controlled logging, not the trace backend.</p>
<p>Span status follows a minimal convention: leave success as unset/default; set <code>Error</code> only on failures. Traces carry flow and timing; detailed exception text stays in logs correlated by <code>trace_id</code> where needed.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="after-one-request-one-tree">After: one request, one tree<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#after-one-request-one-tree" class="hash-link" aria-label="Direct link to After: one request, one tree" title="Direct link to After: one request, one tree" translate="no">​</a></h2>
<p>Here is one real request, captured end to end on a live P/D deployment and exported from Jaeger. This is the shape to recognize once E2E and fine-grained tracing are enabled:</p>
<div style="text-align:center;margin:24px 0"><img src="https://llm-d.ai/img/blogs/distributed-tracing/figure6-trace-waterfall.png" alt="Jaeger waterfall of a real 25-span trace for a P/D disaggregated chat completion, spanning EPP, routing sidecar, and both vLLM engines" style="width:98%;height:auto"><p style="text-align:center;font-size:0.9em;margin-top:8px"><em><strong>FIGURE 6</strong>: A real 25-span trace for a single disaggregated chat completion (2,071 prompt tokens, 200 completion tokens) across four services. EPP tracing came from the router chart; the routing sidecar and both vLLM engines were wired by hand.</em></p></div>
<p>Three things in that capture are worth dwelling on, because they are easy to get wrong from the waterfall alone.</p>
<p><strong>Routing is usually not where the time goes.</strong> The entire EPP orchestration here, three profile decisions, two scheduler profiles, filtering, scoring, and picking, took 0.295ms out of 3146ms, so those scheduling spans are microsecond-scale. The exception worth knowing is the precise prefix-cache path, where the EPP calls the engine's render endpoint to tokenize the prompt before it can hash blocks: in a separate capture that single HTTP child accounted for 7.1ms of a 7.6ms orchestration. Still small against engine time, but no longer invisible. Either way, when a request is slow the trace tells you immediately whether to look downstream.</p>
<p><strong><code>decode</code> really is nested under <code>prefill</code>.</strong> With the default <code>nixlv2</code> connector the decode span is started from the prefill span's context, so Jaeger renders it as a child rather than a sibling. This capture confirms it on <code>main</code>, and the same context reuse is present in <code>v0.9.0</code>. A prefill span reporting 49.9ms while containing a 3092ms child is that quirk, not a slow prefill. Read the stage durations from the attributes the proxy puts on the decode span, <code>llm_d.pd_proxy.prefill_duration_ms</code> and <code>llm_d.pd_proxy.decode_duration_ms</code>, rather than from the nesting.</p>
<p><strong>Two TTFT numbers, two questions.</strong> The P/D proxy sidecar recorded <code>llm_d.pd_proxy.true_ttft_ms = 50</code>, derived from the prefill leg, while the decode engine independently reported <code>gen_ai.latency.time_to_first_token = 0.343</code> with <code>gen_ai.latency.time_in_queue = 0.322</code>. Neither is wrong; they measure different things, and only a trace that carries both makes the difference legible. Also note the prefill engine's <code>completion_tokens = 1</code>: the prefill leg is sent with <code>max_tokens=1</code>, visible as <code>gen_ai.request.max_tokens</code> on that engine span, so prefill reports a single token while the decode engine reports the full 200.</p>
<p>One deployment detail affects the root span. This capture ran the standalone <code>epponly</code> topology, where an Envoy sidecar fronts the EPP rather than a Kubernetes Gateway, and that proxy was not itself traced, so <code>request</code> is the root. Where the gateway is traced, or a payload processor runs ahead of the EPP, <code>request</code> becomes a child of that span instead.</p>
<p>Compared with Figure 2: one ID, explicit parent/child edges, and attributes that explain <strong>routing and P/D policy</strong>, not only HTTP status codes.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="what-this-unlocks-for-platform-teams">What this unlocks for platform teams<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#what-this-unlocks-for-platform-teams" class="hash-link" aria-label="Direct link to What this unlocks for platform teams" title="Direct link to What this unlocks for platform teams" translate="no">​</a></h2>
<ol>
<li class=""><strong>Faster bottleneck localization:</strong> decompose the critical path of a real request before changing scorer weights or P/D thresholds.</li>
<li class=""><strong>Optimization validation:</strong> treat precise prefix-cache and P/D as measurable per-request behaviors, not faith-based features.</li>
<li class=""><strong>Shared technical vocabulary:</strong> scheduling, KV, and serving work can refer to the same stable span names in design reviews and incident channels.</li>
<li class=""><strong>Safer default telemetry:</strong> metadata-only tracing is easier to enable in regulated environments.</li>
<li class=""><strong>Vendor-neutral ops:</strong> OTLP + W3C + GenAI conventions; swap Jaeger for Tempo (or a commercial backend) without re-instrumenting llm-d.</li>
</ol>
<p>Traces do <strong>not</strong> replace metrics. PromQL still owns SLOs, Grafana still owns fleet views, and alerts still own detection. Traces are what keeps the step from alert to action out of guesswork.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="getting-started-operator-checklist">Getting started (operator checklist)<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#getting-started-operator-checklist" class="hash-link" aria-label="Direct link to Getting started (operator checklist)" title="Direct link to Getting started (operator checklist)" translate="no">​</a></h2>
<p>Full steps live in the docs; the mental model is:</p>
<ol>
<li class=""><strong>Install the telemetry plane:</strong> OTel Collector + Jaeger (or another backend) via the observability recipes.</li>
<li class=""><strong>Enable model-server tracing:</strong> for vLLM, pass <code>--otlp-traces-endpoint</code>, add <code>--collect-detailed-traces all</code> if you want the queue and model-phase latencies used above, and set <code>OTEL_SERVICE_NAME</code> on the pod. The engine ships no service name of its own, so without it every engine span arrives as <code>unknown_service</code>, which reads like broken instrumentation rather than a missing variable.</li>
<li class=""><strong>Enable EPP tracing:</strong> one switch, <code>router.tracing</code>, in the llm-d-router chart that deploys your EPP. It sets the EPP's <code>--tracing</code> flag along with its exporter, endpoint, and sampler, so nothing else is needed there.</li>
<li class=""><strong>Wire the P/D routing sidecar yourself:</strong> the EPP switch above does not reach it, and the shipped P/D model-server manifests carry no tracing configuration at all. That container needs <code>--tracing=true</code>, which defaults to false, <em>and</em> its own <code>OTEL_TRACES_EXPORTER=otlp</code> plus <code>OTEL_EXPORTER_OTLP_ENDPOINT</code>. Miss the flag and the proxy stages simply never appear; miss the exporter variable and the spans are pretty-printed to the pod's stdout instead, because the default exporter is <code>console</code>. Both failures look exactly like the dropped-header symptom above.</li>
<li class=""><strong>Send one request, then open the UI:</strong> confirm a multi-service tree, not orphan engine spans.</li>
<li class=""><strong>Turn sampling down for production:</strong> start near <code>0.1</code> unless actively debugging or soaking in staging. One trap here: <code>parentbased_traceidratio</code> is the only sampler the llm-d components accept. Any other value, including standard OpenTelemetry names like <code>parentbased_always_on</code>, logs an error and falls back to ratio <code>0.1</code>, as does a <code>OTEL_TRACES_SAMPLER_ARG</code> that fails to parse as a float. A debug run you believed captured everything then quietly keeps a tenth.</li>
</ol>
<p>Docs:</p>
<ul>
<li class=""><a class="" href="https://llm-d.ai/docs/operations/observability">Observability overview</a></li>
<li class=""><a class="" href="https://llm-d.ai/docs/operations/observability/tracing">Distributed Tracing</a></li>
<li class=""><a class="" href="https://llm-d.ai/docs/operations/observability/metrics">Metrics</a></li>
</ul>
<div class="theme-admonition theme-admonition-info admonition_xJq3 alert alert--info"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>Production sampling</div><div class="admonitionContent_BuS1"><p>Sampling every request (ratio <code>1.0</code>) is fine for demos and small staging clusters. For production inference traffic, prefer parent-based ratio sampling and a Collector that batches and filters noise (for example <code>/metrics</code> scrape spans). Retention and cardinality costs climb quickly with QPS.</p></div></div>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="roadmap-tightening-the-observability-loop">Roadmap: tightening the observability loop<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#roadmap-tightening-the-observability-loop" class="hash-link" aria-label="Direct link to Roadmap: tightening the observability loop" title="Direct link to Roadmap: tightening the observability loop" translate="no">​</a></h2>
<p>E2E and fine-grained tracing are a foundation, not an end state. Near-term work in the observability area continues to focus on:</p>
<ul>
<li class=""><strong>Tighter metrics ↔ traces correlation</strong> (exemplars / trace links from Grafana panels into Jaeger/Tempo)</li>
<li class=""><strong>Stable span and attribute conventions</strong> across llm-d components so dashboards and runbooks can rely on names</li>
<li class=""><strong>Better empty-trace diagnostics</strong> when only generic HTTP spans appear</li>
<li class=""><strong>Multi-cluster / multi-tenant service-naming guidance</strong> (<code>OTEL_SERVICE_NAME</code> discipline)</li>
</ul>
<p>Gaps (missing spans on a path that matters, attributes needed for a well-lit path, Collector recipes for a specific backend) are welcome as issues and proposals in the llm-d observability channels and GitHub.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="closing">Closing<a href="https://llm-d.ai/blog/end-to-end-and-fine-grained-tracing-in-llm-d#closing" class="hash-link" aria-label="Direct link to Closing" title="Direct link to Closing" translate="no">​</a></h2>
<p>llm-d’s advanced serving features only pay off if they can be <strong>seen</strong> working on live traffic. End-to-end tracing supplies the map of the request. Fine-grained tracing labels the turns that matter: cache scores, P/D mode, proxy stages, engine phases.</p>
<p>That is the observability bar for operating llm-d as a distributed inference platform: not merely hosting GPUs with charts on the side, but maintaining a request spine that holds up under pressure.</p>]]></content:encoded>
            <author>gyliu513@gmail.com (Guangya Liu)</author>
            <category>blog posts</category>
            <category>Observability</category>
            <category>llm-d release news</category>
        </item>
        <item>
            <title><![CDATA[Sticky Until Saturated: Token-Aware Routing in llm-d]]></title>
            <link>https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing</link>
            <guid>https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing</guid>
            <pubDate>Mon, 17 Aug 2026 09:00:00 GMT</pubDate>
            <description><![CDATA[The llm-d router's default configuration is built on token-aware routing: keep each request on the cache-warm endpoint until a calibrated token-load limit is exceeded, then route by load alone, sustaining 2-3x round-robin throughput with the one required threshold derived from a single hardware calibration measurement.]]></description>
            <content:encoded><![CDATA[<p><em>How the llm-d router balances KV-cache affinity against token load</em></p>
<p>The llm-d router's default configuration has changed to something an operator can reason about, built on a single methodology: <strong>token-aware routing</strong>. The scheduler prioritizes KV-cache affinity, keeping each request on the endpoint that already holds its prefix, unless the load on that endpoint exceeds a calibrated limit; past the limit it ignores affinity and picks the endpoint by load alone. Load is measured in tokens matched to the workload's bottleneck, giving two configurations: for prefill-bound traffic (long prompts), <strong>prefix-cache affinity + token load</strong> (<code>prefix-cache-affinity-filter + token-load-scorer</code>), routing on uncached prefill tokens in flight; for decode-bound traffic (long outputs), <strong>prefix-cache affinity + active requests</strong> (<code>prefix-cache-affinity-filter + active-request-scorer</code>), routing on active streams. We call each pairing of the affinity filter with a load signal a <em>bottleneck-matched configuration</em> (or <em>matched configuration</em> for short).</p>
<p>Two failure modes motivated the change. The first is the previous default itself: a four-signal weighted blend (prefix-cache match, queue depth, KV utilization, LRU) whose emergent behavior was hard to predict and harder to tune. The second is the hot spotting most routers suffer from over-indexing on KV-cache affinity: affinity concentrates traffic on cache-warm endpoints, and without an explicit saturation release the warm endpoint keeps absorbing load past the point where a cold endpoint would serve the request faster. Token-aware routing pairs one signal with one bottleneck and one calibrated limit, so the scheduler is legible: an operator can predict what it will do, why it will do it, and how it will degrade under load.</p>
<p>The results back the change. On the benchmarks below, the matched configurations sustain 2–3× the throughput of Kubernetes Service round-robin on prefill-bound workloads while holding TTFT through the operating range, and hold parity or better everywhere else. The stack now ships as the default across llm-d's <a href="https://github.com/llm-d/llm-d/tree/main/guides/optimized-baseline" target="_blank" rel="noopener noreferrer" class="">optimized-baseline</a>, <a href="https://github.com/llm-d/llm-d/tree/main/guides/agentic-serving" target="_blank" rel="noopener noreferrer" class="">agentic-serving</a>, <a href="https://github.com/llm-d/llm-d/tree/main/guides/multimodal-serving" target="_blank" rel="noopener noreferrer" class="">multimodal-serving</a>, and <a href="https://github.com/llm-d/llm-d/tree/main/guides/pd-disaggregation" target="_blank" rel="noopener noreferrer" class="">P/D-disaggregation</a> guides, and it is running on production serving fleets, including Google Cloud Vertex AI, Red Hat, and Mistral.</p>
<p>This post is the analysis behind that shift. It develops the framework across three workloads spanning the two bottleneck regimes (prefill compute, decode slots), derives the configuration's one threshold in closed form from a single hardware calibration (see <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#deriving-tau-from-the-hardware" class="">Deriving τ from the Hardware</a>), and evaluates the latency-predictor pipeline as a workload-agnostic alternative for operators with high-variance traffic or an uncharacterized bottleneck. The experiments were run against the affinity filter's earlier parameterization; the shipped interface has since been redesigned around the calibration quantity derived here (<code>peakPrefillThroughput</code>, see <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#the-saturation-override" class="">the saturation override</a>), and the calibration procedure is distributed with the router as a <a href="https://github.com/llm-d/llm-d/tree/main/guides/recipes/router/calibration" target="_blank" rel="noopener noreferrer" class="">shared recipe</a> with a per-(model, accelerator) <a href="https://github.com/llm-d/llm-d/blob/main/guides/recipes/router/calibration/configuration-matrix.md" target="_blank" rel="noopener noreferrer" class="">configuration matrix</a>.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="setup">Setup<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#setup" class="hash-link" aria-label="Direct link to Setup" title="Direct link to Setup" translate="no">​</a></h2>
<p><strong>Hardware and serving stack.</strong> 10× Qwen3-32B (8× for b2b-saas) model servers running vLLM, each with tensor parallelism TP=2 across 2× H100 GPUs on a dedicated GKE node. vLLM is configured with <code>max-num-batched-tokens=8192</code> and continuous batching. Each model server runs as a Kubernetes pod, fronted by a Gateway API <code>InferencePool</code> resource that routes inference traffic through the router. Throughout, we refer to a model server as an endpoint; in this deployment each endpoint is one pod, but an endpoint may span multiple pods in multi-node deployments.</p>
<p><strong>Router pipeline and plugin configuration.</strong> The router composes scheduling decisions from a pipeline of filter and scorer plugins. Filters restrict the candidate endpoint set; scorers assign weighted scores; a picker plugin selects the final destination from the scored candidates. We evaluate five scheduler configurations:</p>
<ul>
<li class=""><strong>k8</strong>, Kubernetes Service round-robin, bypassing the router entirely. Serves as the no-scheduler baseline.</li>
<li class=""><strong>token-load-aware</strong>, <code>prefix-cache-affinity-filter</code> (<code>affinityThreshold=0.8</code>, <code>maxTokensInFlightPenalty=286720</code>; the earlier interface's predictor-based TTFT threshold was unused on this arm, no predictor deployed) followed by <code>token-load-scorer</code> and <code>max-score-picker</code>. Under the shipped interface this configuration is <code>peakPrefillThroughput=20480</code> with <code>maxTTFTPenaltyMs=14000</code> (see <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#the-saturation-override" class="">the saturation override</a> for the mapping between the two parameterizations). The matched configuration for prefill-bound workloads. We refer to <code>maxTokensInFlightPenalty</code> as τ throughout this post. The token-load scorer uses a lookahead formulation: <code>score(endpoint) = current_uncached_in_flight(endpoint) + prompt_tokens × (1 - hit_rate(endpoint))</code>, where the second term is the marginal uncached work this request would add on each candidate. Streaming is enabled for all workloads; with the in-flight load producer's default configuration (<code>addEstimatedOutputTokens=false</code>), a request's tokens are released as soon as the first streamed chunk arrives, so the in-flight counter tracks only tokens yet to be prefilled. The producer can instead be configured (<code>addEstimatedOutputTokens=true</code>) to also hold an output estimate, <code>round(inputTokens × outputRatio)</code> (default ratio 1.5, bounded by the client's output cap and an optional operator cap), until the response completes, approximating tokens held in KV cache.</li>
<li class=""><strong>active-request-aware</strong>, <code>prefix-cache-affinity-filter</code> (same <code>affinityThreshold=0.8</code> and <code>maxTokensInFlightPenalty=286720</code> saturation override as the token-load-aware configuration) followed by <code>active-request-scorer</code> and <code>max-score-picker</code>. The matched configuration for decode-bound workloads. The affinity filter is included structurally but is a no-op when shared-prefix content is too small to clear the 0.8 threshold; on reasoning's 250-token shared system prompt the filter passes all candidates through and the downstream scorer operates on the full set.</li>
<li class=""><strong>legacy blend</strong>, the heuristic multi-signal weighted blend shipped as the router default at the time these experiments were run (since superseded as the default by the prefix+token matched configuration): <code>prefix-cache-scorer (weight=3) + queue-scorer (weight=2) + kv-cache-utilization-scorer (weight=2) + no-hit-lru-scorer (weight=2)</code>, with <code>max-score-picker</code>. No affinity filter, prefix locality is enforced by the prefix-cache-scorer's weight in the blend.</li>
<li class=""><strong>latency-predictor</strong>, <code>prefix-cache-affinity-filter (maxTTFTPenaltyMs=5000, maxTokensInFlightPenalty=0) + latency-scorer</code>, with <code>weighted-random-picker</code>. The workload-agnostic pipeline, with predictor training and prediction sidecars deployed alongside each model server.</li>
</ul>
<p>All configurations using the affinity filter use the same <code>affinityThreshold=0.8</code> and <code>explorationProbability=0</code>. Full configmaps are in the <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#configmaps" class="">appendix</a>.</p>
<p><strong>Workloads.</strong> Three workloads are used:</p>
<ul>
<li class=""><strong>code-generation</strong> (prefill-bound): conversation-replay workload from the <a href="https://github.com/kubernetes-sigs/inference-perf/tree/main/workload-catalog/code-generation" target="_blank" rel="noopener noreferrer" class=""><code>inference-perf</code> workload catalog</a>. Per-conversation system prompts 3000–100000 tokens (mean ~55000), 2–20 turns per conversation (mean 6), 100–10000 input tokens per turn (mean 1500), 50–4000 output tokens per turn (mean 800). Concurrency swept from 10 to 100.</li>
<li class=""><strong>reasoning</strong> (decode-bound): reasoning workload from the <a href="https://github.com/kubernetes-sigs/inference-perf/tree/main/workload-catalog/reasoning" target="_blank" rel="noopener noreferrer" class=""><code>inference-perf</code> workload catalog</a>. 250-token shared system prompt, 1000-token user prompt, 8000-token mean output (max 32000). Each run generates <code>num_conversations = concurrency_level</code> single-turn conversations (each pairs a unique user prompt with the same shared system prompt) and issues <code>3 × concurrency_level</code> requests, so each conversation is issued roughly three times over the run. The repetition ensures the workload exercises steady-state load balancing rather than being dominated by the initial arrival burst. Concurrency swept from 50 to 450.</li>
<li class=""><strong>b2b-saas</strong> (prefill-bound, pathological): the shared-prefix workload used by the <a href="https://github.com/llm-d/llm-d/blob/main/guides/optimized-baseline/benchmark-templates/guide.yaml" target="_blank" rel="noopener noreferrer" class="">llm-d optimized-baseline benchmark guide</a> and analyzed in the <a href="https://llm-d.ai/blog/kvcache-wins-you-can-see#a1-benchmark-setup-details" target="_blank" rel="noopener noreferrer" class="">llm-d "KV-cache wins you can see" blog post</a>. 150 distinct 6000-token system prompts × 5 question variants, 1200-token questions, 1000-token outputs. Shared-prefix sampling under Poisson arrival, QPS ramped from 3 to 60. The same 750-prompt corpus cycles through the cluster repeatedly, making this a stress test of the matched configuration's cache-management behavior rather than a representative traffic shape. See <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#the-b2b-saas-caveat" class="">the b2b-saas caveat</a> for the framing.</li>
</ul>
<p>Full workload YAML specifications are in the <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#workload-yamls" class="">appendix</a>.</p>
<p><strong>Load generation and metrics.</strong> Load is generated by <a href="https://github.com/kubernetes-sigs/inference-perf" target="_blank" rel="noopener noreferrer" class=""><code>inference-perf</code></a>. Per-stage metrics (TTFT, TPOT, end-to-end latency, throughput, success rate, queue depth, KV utilization, prefix cache hit rate) are exported to Google Cloud Storage as JSON and aggregated for analysis. Each (workload, configuration, concurrency level) combination is run once; we report achieved values rather than confidence intervals.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="main-result">Main Result<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#main-result" class="hash-link" aria-label="Direct link to Main Result" title="Direct link to Main Result" translate="no">​</a></h2>
<p>Identify the workload's bottleneck, deploy the matched configuration:</p>
<table><thead><tr><th style="text-align:left">Bottleneck</th><th style="text-align:left">Workload signature</th><th style="text-align:left">Configuration</th><th style="text-align:left">Notes</th></tr></thead><tbody><tr><td style="text-align:left"><strong>Prefill compute</strong></td><td style="text-align:left">Long prompts (relative to outputs), enough volume that aggregate prompt processing strains per-endpoint prefill throughput</td><td style="text-align:left"><code>prefix-cache-affinity-filter</code> (calibrated <code>peakPrefillThroughput</code>, <code>maxTTFTPenaltyMs</code> = T_max) + <code>token-load-scorer</code> + <code>max-score-picker</code></td><td style="text-align:left">Same matched configuration covers both typical prefill-bound workloads (code-generation) and pathological cases where the same small corpus repeats (b2b-saas). The gate encodes τ = <code>peakPrefillThroughput</code> × <code>maxTTFTPenaltyMs</code> (see <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#deriving-tau-from-the-hardware" class="">the derivation</a>); our runs correspond to 20480 tok/s × 14s = 286720. <code>maxTTFTPenaltyMs</code> must be nonzero, it is the saturation release; 0 would never break stickiness.</td></tr><tr><td style="text-align:left"><strong>Decode slots</strong></td><td style="text-align:left">Short prompts, long outputs, decode batch capacity is the binding constraint</td><td style="text-align:left"><code>prefix-cache-affinity-filter</code> (calibrated <code>peakPrefillThroughput</code>, <code>maxTTFTPenaltyMs</code> = T_max) + <code>active-request-scorer</code> + <code>max-score-picker</code></td><td style="text-align:left">Affinity filter is included structurally but acts as a no-op when shared-prefix content is too small to clear <code>affinityThreshold=0.8</code>.</td></tr><tr><td style="text-align:left"><strong>Mixed / unknown / high-variance</strong></td><td style="text-align:left">Heterogeneous traffic shapes; production workloads with shifting bottlenecks</td><td style="text-align:left"><code>prefix-cache-affinity-filter</code> (<code>ttftSource=latencyPredictor</code>, <code>maxTTFTPenaltyMs=5000</code>) + <code>latency-scorer</code> + <code>weighted-random-picker</code></td><td style="text-align:left">Outperforms k8 on all workloads evaluated here. Adds setup overhead (predictor training, sidecar deployment), prefer a matched configuration when the workload is well-understood. Plausibly the best choice for high-variance production workloads where the bottleneck shifts dynamically, though this is untested here.</td></tr></tbody></table>
<p>The threshold τ in the affinity filter should be derived from one hardware calibration measurement per (model, accelerator), see <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#deriving-tau-from-the-hardware" class="">the derivation</a>. On Qwen3-32B / H100 with <code>max-num-batched-tokens=8192</code> and a TTFT degradation tolerance of 14s, this produces τ = 286720 (= 35 × 8192, or 35 max-num-batched-tokens chunks of pending uncached prefill work).</p>
<p>The prefix+token configuration is the bottleneck-matched choice for prefill-bound workloads and also serves as a strong default across regimes; it is now the configuration the optimized-baseline guide ships as the llm-d default. For decode-bound workloads specifically (where active-stream count is the binding signal), the <code>active-request-scorer</code> configuration provides a small additional improvement at the operating range knee. For mixed workloads where the bottleneck shifts dynamically, the latency-predictor pipeline is the safer default at the cost of additional setup overhead.</p>
<p>A note on the heuristic weighted blend (legacy blend): a carefully tuned weight set will outperform a general configuration on the specific workload it was tuned for. The blend's weights (<code>prefix=3, queue=2, kv=2, lru=2</code>) reflect optimization for repeated-corpus chat-completion-shaped traffic and deliver the lowest TTFT-p90 on b2b-saas (<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#b2b-saas-pathological-prefill-bound" class="">results below</a>). The matched configurations are not claimed to beat a bespoke weight set on the workload it was designed for; they are claimed to be predictable across workloads, derivable from one calibration measurement, and competitive across the load curve in each regime. The trade-off is best-case performance on one workload vs. legibility and portability across many.</p>
<p><a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#results" class="">Results</a> presents the evidence. <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#the-prefix-cache-affinity-filter" class="">The Prefix-Cache-Affinity Filter</a> develops the architectural argument for the affinity filter. <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#deriving-tau-from-the-hardware" class="">Deriving τ from the Hardware</a> derives τ from hardware calibration.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="three-workloads-two-bottlenecks">Three Workloads, Two Bottlenecks<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#three-workloads-two-bottlenecks" class="hash-link" aria-label="Direct link to Three Workloads, Two Bottlenecks" title="Direct link to Three Workloads, Two Bottlenecks" translate="no">​</a></h2>
<p>The central claim of this work is that LLM inference scheduling benefits from a different organizing principle than weight-tuning a multi-signal scorer: identify what's limiting throughput on the target workload, then deploy a scheduler configuration whose signal matches that limit. This section establishes the taxonomy.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-two-regimes">The Two Regimes<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#the-two-regimes" class="hash-link" aria-label="Direct link to The Two Regimes" title="Direct link to The Two Regimes" translate="no">​</a></h3>
<p>A request through vLLM consists of two phases with different resource profiles. <strong>Prefill</strong> processes the prompt in chunks of <code>max-num-batched-tokens</code> (8192 in our setup), bounded by GPU compute throughput and per-chunk attention cost. <strong>Decode</strong> generates output tokens one at a time across a batch of concurrent requests, bounded by KV-cache memory and the number of available decode slots. Which phase saturates first depends on the workload's shape, specifically, the ratio of prompt tokens to output tokens.</p>
<p>We identify two regimes:</p>
<p><strong>Prefill-bound (compute-limited).</strong> The bottleneck is per-endpoint prefill throughput. Prompts are long enough that filling <code>max-num-batched-tokens</code> consumes nontrivial time per iteration, and aggregate prompt volume exceeds the cluster's ability to keep up if requests are distributed poorly. Decode batches fill quickly but spend most of their iteration time on prefill chunks rather than decode steps. The right scheduler signal is <strong>uncached prefill tokens currently in flight per endpoint</strong>, routing new prompts to the endpoint with the lowest in-flight uncached-token count maximizes effective prefill throughput. Code-generation (mean ~70k token prompts, mean 800 output tokens) and b2b-saas (7200-token prompts, 1000-token outputs, fixed 750-prompt corpus) are both prefill-bound. They differ in cache-management dynamics, see <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#the-b2b-saas-caveat" class="">the b2b-saas caveat</a>.</p>
<p><strong>Decode-bound (slot-limited).</strong> The bottleneck is the number of concurrent decode streams a endpoint can sustain. Prompts are short, outputs are long, prefill completes quickly, and the cluster spends most of its time generating output tokens. KV-cache pressure builds with concurrent requests, not with per-request size. The right scheduler signal is <strong>running request count per endpoint</strong>, sending new work to the endpoint with the fewest active streams keeps decode batches uniformly loaded. An alternative token-denominated signal is tokens in process: the in-flight load producer tracks tokens yet to be prefilled, and can be configured (<code>addEstimatedOutputTokens=true</code>) to also hold a ratio-based output estimate until the response completes, approximating KV-cache occupancy. Once a request is past prefill, its actual tokens in KV cache could in principle be tracked as the decode-load signal, from the router's event-driven KV-block index rather than the engine's polled KV-usage metric, which lags dispatch. In practice the simple active-request count works well, and it is the form we benchmark here. Reasoning (mean 1000 token prompts, mean 8000 output tokens) is our representative.</p>
<p>The regimes are not always disjoint, a real workload may sit between them or shift between them as load changes, but they cover the dominant cases the router encounters in practice. The taxonomy is useful precisely because the matched configuration for each is different.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-b2b-saas-caveat">The B2B-SaaS Caveat<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#the-b2b-saas-caveat" class="hash-link" aria-label="Direct link to The B2B-SaaS Caveat" title="Direct link to The B2B-SaaS Caveat" translate="no">​</a></h3>
<p>B2B-SaaS deserves explicit framing before we present results. Unlike code-generation and reasoning, which approximate realistic traffic shapes, <strong>b2b-saas is a stress test on a fixed, small corpus</strong>: 150 distinct system prompts × 5 question variants, sampled randomly. The same 750-prompt set cycles through the cluster repeatedly. With aggregate cacheable content (~900k tokens) exceeding the cluster's per-endpoint KV capacity (~200–300k tokens per endpoint × 8 endpoints, with substantial overlap if prefixes are replicated), the workload is engineered to make cache distribution the dominant secondary factor on top of prefill compute.</p>
<p>This produces two characteristics that distinguish b2b-saas from code-generation despite both being prefill-bound:</p>
<ul>
<li class=""><strong>The cluster settles into one of two distinct steady states depending on τ.</strong> Either it converges to a stable partition (each endpoint owns a subset of prefixes, hit rate stays high) or it cascades into eviction churn (every endpoint tries to cache every prefix, hit rate collapses). There's no smooth in-between, small changes in τ can flip the cluster from one state to the other.</li>
<li class=""><strong>Steady-state behavior depends on how prompts seed across endpoints during the ramp.</strong> Because the same 150 prefixes repeat, the partition that forms in the first few ramp stages persists for the rest of the run. Two runs of the same configuration can converge to different partitions and produce different absolute numbers, even though the <em>relative</em> ranking of configurations is stable.</li>
</ul>
<p>These properties make b2b-saas an excellent benchmark for cache-management mechanisms and a poor benchmark for hyperparameter sweeps. We use it specifically to demonstrate (a) that token-load-aware routing beats round-robin by 2–2.5× on workloads with heavy prefix reuse, and (b) that the τ=286720 threshold (= 35 × 8192) in <code>prefix-cache-affinity-filter</code> functions as a saturation valve, validated empirically by the failure modes of smaller τ values. We do <strong>not</strong> use it to claim a precise optimal τ; the bimodality means such a claim wouldn't generalize even within b2b-saas, let alone across workloads. The matched configuration for prefill-bound regimes is structural; the tuning is derived from the τ_sat formula in <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#deriving-tau-from-the-hardware" class="">the derivation</a> rather than from b2b-saas sweeps.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="primary-metrics">Primary Metrics<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#primary-metrics" class="hash-link" aria-label="Direct link to Primary Metrics" title="Direct link to Primary Metrics" translate="no">​</a></h3>
<p>In what follows we focus on <strong>TTFT-p90 and input tokens per second</strong> for the prefill-bound workloads (code-gen and b2b-saas), and <strong>TPOT-p90 and output tokens per second</strong> for the decode-bound workload (reasoning). These are the metrics that reflect whether each workload's bottleneck is being managed well; other metrics are reported in the <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#full-result-tables" class="">appendix</a> but are not load-bearing in the analysis.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="results">Results<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#results" class="hash-link" aria-label="Direct link to Results" title="Direct link to Results" translate="no">​</a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="code-generation-prefill-bound">Code-Generation (Prefill-Bound)<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#code-generation-prefill-bound" class="hash-link" aria-label="Direct link to Code-Generation (Prefill-Bound)" title="Direct link to Code-Generation (Prefill-Bound)" translate="no">​</a></h3>
<p>Long prompts (mean 70k tokens, growing across conversation turns), moderate outputs (mean 800), no cross-request prefix overlap. Per-endpoint prefill compute is the binding constraint. Matched configuration: <code>prefix-cache-affinity-filter</code> (τ=286720, equivalently 35 × B = 35 chunks) + <code>token-load-scorer</code> + <code>max-score-picker</code>. Lookahead scoring: <code>score(endpoint) = current_uncached_in_flight + prompt_tokens × (1 - hit_rate(endpoint))</code>.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id="ttft-p90-and-input-tokens-per-second">TTFT-p90 and input tokens per second<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#ttft-p90-and-input-tokens-per-second" class="hash-link" aria-label="Direct link to TTFT-p90 and input tokens per second" title="Direct link to TTFT-p90 and input tokens per second" translate="no">​</a></h4>
<div style="display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:20px 0"><img src="https://llm-d.ai/img/blogs/bottleneck-aware-scheduling/fig_5_1_1_codegen_ttft.png" alt="Code-generation TTFT-p90 vs concurrency across scheduler configurations" style="width:48%;min-width:320px;height:auto"><img src="https://llm-d.ai/img/blogs/bottleneck-aware-scheduling/fig_5_1_2_codegen_int.png" alt="Code-generation input tokens per second vs concurrency across scheduler configurations" style="width:48%;min-width:320px;height:auto"></div>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id="prefix-cache-hit-rate">Prefix cache hit rate<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#prefix-cache-hit-rate" class="hash-link" aria-label="Direct link to Prefix cache hit rate" title="Direct link to Prefix cache hit rate" translate="no">​</a></h4>
<div style="text-align:center;margin:20px 0"><img src="https://llm-d.ai/img/blogs/bottleneck-aware-scheduling/fig_5_1_3_codegen_prefix.png" alt="Code-generation prefix cache hit rate vs concurrency" style="width:70%;min-width:320px;height:auto"></div>
<p>Per-conversation prompts are unique, so cache hits only come from within-conversation turn continuity. Each concurrency point is an independent run (the cluster is not warmed across runs), so the conc=10 column is noisy because the run has only ~60 total requests (10 conversations × ~6 turns) and absolute hit-rate values at this volume are dominated by which endpoints individual conversations happen to land on. At conc=20 prefix+token achieves the highest sustained hit rate (48%), consistent with the affinity filter preserving turn-to-turn locality where the soft-affinity (latency-predictor) and no-affinity (legacy blend, which relies on the prefix-cache-scorer's weight in its blend instead) configurations do not. At high concurrency cache hit rate collapses across all configurations because per-endpoint KV capacity is exhausted by the diversity of active conversations, but the prefill-throughput advantage above persists, suggesting the filter is doing useful work even when the steady-state hit rate metric is low.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id="summary">Summary<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#summary" class="hash-link" aria-label="Direct link to Summary" title="Direct link to Summary" translate="no">​</a></h4>
<p>Across the full load curve prefix+token has the lowest TTFT-p90 and highest input tokens per second. Through conc=60 TTFT-p90 stays below 40s; throughput plateaus at ~47k in_t/s by conc=60 and holds. latency-predictor tracks prefix+token within ~10s of TTFT across the curve. k8 and the legacy blend exhibit cliff failures in multiple concurrency points and are not viable for sustained operation.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="reasoning-decode-bound">Reasoning (Decode-Bound)<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#reasoning-decode-bound" class="hash-link" aria-label="Direct link to Reasoning (Decode-Bound)" title="Direct link to Reasoning (Decode-Bound)" translate="no">​</a></h3>
<p>Short prompts (mean 1000 tokens), long outputs (mean 8000, max 32k), 250-token shared system prompt. Each run has <code>num_conversations = conc</code> single-turn conversations, each issued roughly three times (total <code>3 × conc</code> requests). Decode-slot pressure is the binding constraint at all concurrency levels above ~150. Matched configuration: <code>prefix-cache-affinity-filter + active-request-scorer + max-score-picker</code> (the "run-req" configuration). The affinity filter is included but acts as a no-op in practice: a conversation's first issue can only match the 250-token shared prompt (0.25 affinity at best against the ~1000-token user prompt), and observed hit rates stay below the 0.8 threshold throughout (see the hit-rate data below), so the filter passes all endpoints through. We also include the workload-agnostic prefix+token configuration for comparison; it is competitive here but does not exceed run-req on the decode-slot signal.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id="tpot-p90-and-output-tokens-per-second">TPOT-p90 and output tokens per second<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#tpot-p90-and-output-tokens-per-second" class="hash-link" aria-label="Direct link to TPOT-p90 and output tokens per second" title="Direct link to TPOT-p90 and output tokens per second" translate="no">​</a></h4>
<div style="display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:20px 0"><img src="https://llm-d.ai/img/blogs/bottleneck-aware-scheduling/fig_5_2_1_reasoning_tpot.png" alt="Reasoning TPOT-p90 vs concurrency across scheduler configurations" style="width:48%;min-width:320px;height:auto"><img src="https://llm-d.ai/img/blogs/bottleneck-aware-scheduling/fig_5_2_2_reasoning_outt.png" alt="Reasoning output tokens per second vs concurrency across scheduler configurations" style="width:48%;min-width:320px;height:auto"></div>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id="prefix-cache-hit-rate-1">Prefix cache hit rate<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#prefix-cache-hit-rate-1" class="hash-link" aria-label="Direct link to Prefix cache hit rate" title="Direct link to Prefix cache hit rate" translate="no">​</a></h4>
<div style="text-align:center;margin:20px 0"><img src="https://llm-d.ai/img/blogs/bottleneck-aware-scheduling/fig_5_2_3_reasoning_prefix.png" alt="Reasoning prefix cache hit rate vs concurrency" style="width:70%;min-width:320px;height:auto"></div>
<p>Hit rates never reach the 0.8 affinity-filter threshold: a conversation's first issue can only hit on the 250-token shared prompt (0.25 affinity at best), and although repeated issues of the same conversation are fully cacheable in principle, observed rates never clear the threshold. run-req and prefix+token both achieve high hit rates through the operating range because their schedulers do not actively scatter requests (run-req minimizes stream count per endpoint, which preserves locality as a side effect; prefix+token's filter is inactive but the downstream token-load-scorer also preserves locality through low-load preference). The legacy blend creates more scatter, and latency-predictor's weighted-random sampling actively spreads requests.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id="summary-1">Summary<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#summary-1" class="hash-link" aria-label="Direct link to Summary" title="Direct link to Summary" translate="no">​</a></h4>
<p>Overall run-req has the lowest TPOT-p90 and the highest output tokens per second. prefix+token is competitive but does not improve over run-req. Latency-predictor matches run-req at saturation. The legacy blend's prefix-weighted scoring creates hotspots that hurt at every concurrency above 50.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="b2b-saas-pathological-prefill-bound">B2B-SaaS (Pathological Prefill-Bound)<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#b2b-saas-pathological-prefill-bound" class="hash-link" aria-label="Direct link to B2B-SaaS (Pathological Prefill-Bound)" title="Direct link to B2B-SaaS (Pathological Prefill-Bound)" translate="no">​</a></h3>
<p>Synthetic stress workload: 150 distinct system prompts × 5 question variants, sampled randomly under Poisson arrival ramped from 3 → 60 QPS. 7200-token prompts (6000-token system + 1200-token question), 1000-token outputs, streaming. Aggregate cacheable content (~900k tokens) exceeds aggregate per-endpoint KV capacity if prefixes are replicated rather than partitioned. Matched configuration: <code>prefix-cache-affinity-filter</code> (τ=286720, hard) + <code>token-load-scorer</code> + <code>max-score-picker</code>. See <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#the-b2b-saas-caveat" class="">the b2b-saas caveat</a> on b2b-saas as a stress test.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id="ttft-p90-and-input-tokens-per-second-1">TTFT-p90 and input tokens per second<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#ttft-p90-and-input-tokens-per-second-1" class="hash-link" aria-label="Direct link to TTFT-p90 and input tokens per second" title="Direct link to TTFT-p90 and input tokens per second" translate="no">​</a></h4>
<div style="display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:20px 0"><img src="https://llm-d.ai/img/blogs/bottleneck-aware-scheduling/fig_5_3_1_b2b_ttft.png" alt="B2B-SaaS TTFT-p90 vs QPS across scheduler configurations" style="width:48%;min-width:320px;height:auto"><img src="https://llm-d.ai/img/blogs/bottleneck-aware-scheduling/fig_5_3_2_b2b_int.png" alt="B2B-SaaS input tokens per second vs QPS across scheduler configurations" style="width:48%;min-width:320px;height:auto"></div>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id="prefix-cache-hit-rate-2">Prefix cache hit rate<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#prefix-cache-hit-rate-2" class="hash-link" aria-label="Direct link to Prefix cache hit rate" title="Direct link to Prefix cache hit rate" translate="no">​</a></h4>
<div style="text-align:center;margin:20px 0"><img src="https://llm-d.ai/img/blogs/bottleneck-aware-scheduling/fig_5_3_3_b2b_prefix.png" alt="B2B-SaaS prefix cache hit rate vs QPS" style="width:70%;min-width:320px;height:auto"></div>
<p>Both prefix+token and the legacy blend sustain high hit rates (~90–95%) once load ramps past QPS ~20. This is the cluster's prefix partition holding: each endpoint owns a subset of the 150 prefixes and serves repeated requests for that subset locally. Both configurations preserve the partition through the operating range, which is why both deliver the prefill-throughput advantage seen above. They preserve it through different mechanisms, though: prefix+token uses the <code>prefix-cache-affinity-filter</code> to restrict candidates to warm endpoints, then <code>token-load-scorer + max-score-picker</code> to pick among them. The legacy blend has no affinity filter (see <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#setup" class="">Setup</a>); its prefix locality is enforced by giving <code>prefix-cache-scorer</code> the largest weight (3) in the blend, which causes <code>max-score-picker</code> to almost always pick the endpoint with the highest prefix match. The two are mechanically different but produce similar steady-state behavior in this workload because both end up routing to the cache-warm endpoint most of the time. At very high QPS (50+) prefix+token's hit rate drops to 70–73% while the legacy blend holds at 96–97%; this reflects the τ=286720 saturation valve engaging on prefix+token when warm endpoints accumulate enough uncached in-flight tokens to trigger the override, briefly redistributing traffic away from warm endpoints. The legacy blend has no such valve.</p>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id="summary-2">Summary<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#summary-2" class="hash-link" aria-label="Direct link to Summary" title="Direct link to Summary" translate="no">​</a></h4>
<p>Overall prefix+token (τ=286720) and the legacy blend both sustain useful TTFT and high prefill throughput. k8 cannot reach this range. latency-predictor cannot either. Beyond the operating range, the legacy blend's bespoke-tuned weights give it a slight TTFT advantage. The <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#deriving-tau-from-the-hardware" class="">derivation below</a> produces τ=286720 from one calibration measurement and an SLO ceiling, eliminating the need to tune τ empirically per workload.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="cross-workload-summary">Cross-Workload Summary<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#cross-workload-summary" class="hash-link" aria-label="Direct link to Cross-Workload Summary" title="Direct link to Cross-Workload Summary" translate="no">​</a></h3>
<p>Three workloads, two bottlenecks, two matched configurations. The pattern across the three workloads is consistent: the configuration whose signal matches the workload's bottleneck wins through the stable operating range, while alternatives either knee earlier, exhibit cliff failure modes, or both. No single configuration wins across all three workloads, but the choice of which to deploy is fully determined by identifying the bottleneck.</p>
<div style="text-align:center;margin:20px 0"><img src="https://llm-d.ai/img/blogs/bottleneck-aware-scheduling/fig_5_4_cross_workload.png" alt="Cross-workload summary of matched configuration performance vs baselines" style="width:100%;height:auto"></div>
<table><thead><tr><th style="text-align:left">Workload</th><th style="text-align:left">Bottleneck</th><th style="text-align:left">Matched configuration</th><th style="text-align:left">Knee position (matched)</th><th style="text-align:left">Knee position (k8)</th><th style="text-align:left">Throughput at knee (matched vs k8)</th></tr></thead><tbody><tr><td style="text-align:left">code-generation</td><td style="text-align:left">prefill compute</td><td style="text-align:left">prefix-cache-affinity (τ=286720) + token-load + max-score</td><td style="text-align:left">conc=60</td><td style="text-align:left">conc=30</td><td style="text-align:left">46k vs 16k in_t/s (2.9×)</td></tr><tr><td style="text-align:left">reasoning</td><td style="text-align:left">decode slots</td><td style="text-align:left">prefix-cache-affinity (τ=286720) + active-request-scorer + max-score</td><td style="text-align:left">conc=350</td><td style="text-align:left">conc=250</td><td style="text-align:left">7.0k vs 6.8k out_t/s (~parity)</td></tr><tr><td style="text-align:left">b2b-saas</td><td style="text-align:left">prefill compute (pathological cache dynamics)</td><td style="text-align:left">prefix-cache-affinity (τ=286720) + token-load + max-score</td><td style="text-align:left">QPS=38</td><td style="text-align:left">QPS=18</td><td style="text-align:left">90k vs 45k in_t/s (2.0×)</td></tr></tbody></table>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-prefix-cache-affinity-filter">The Prefix-Cache-Affinity Filter<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#the-prefix-cache-affinity-filter" class="hash-link" aria-label="Direct link to The Prefix-Cache-Affinity Filter" title="Direct link to The Prefix-Cache-Affinity Filter" translate="no">​</a></h2>
<p>The filter restricts the candidate set passed to the downstream scorer. Each endpoint is assigned an affinity score (fraction of incoming prompt tokens already cached on that endpoint); endpoints with affinity ≥ <code>affinityThreshold</code> (0.8 in our setup) form the candidate set. If no endpoint meets the threshold, all endpoints pass through and the downstream scorer operates on the full set.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="composability-across-regimes">Composability Across Regimes<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#composability-across-regimes" class="hash-link" aria-label="Direct link to Composability Across Regimes" title="Direct link to Composability Across Regimes" translate="no">​</a></h3>
<p>The filter is present with the same <code>affinityThreshold=0.8</code> in all three matched configurations. The downstream scorer changes; the filter does not.</p>
<ul>
<li class=""><strong>Prefill-bound, typical</strong> (code-gen): filter restricts to cache-warm endpoints (affinity &gt; 0.8 when turn-to-turn cache continuity exists) → <code>token-load-scorer</code> picks the warm endpoint with fewest uncached tokens in flight</li>
<li class=""><strong>Prefill-bound, pathological</strong> (b2b-saas): filter restricts to cache-warm endpoints (affinity &gt; 0.8 from the system-prompt portion of the prompt) → <code>token-load-scorer</code> picks the warm endpoint with fewest uncached tokens in flight</li>
<li class=""><strong>Decode-bound</strong> (reasoning): affinity scores stay below 0.8 (the 250-token shared prompt against a 1000-token user prompt gives 0.25 affinity at best on a conversation's first issue, and observed hit rates stay below the threshold on repeats) → filter passes all endpoints through → <code>active-request-scorer</code> picks the endpoint with fewest active streams, as if filter weren't present</li>
</ul>
<p>One filter, one threshold, three matched configurations, no per-workload reconfiguration.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-saturation-override">The Saturation Override<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#the-saturation-override" class="hash-link" aria-label="Direct link to The Saturation Override" title="Direct link to The Saturation Override" translate="no">​</a></h3>
<p>The filter allows non-warm endpoints back into the candidate set when staying with the warm set would be harmful. In the interface our experiments ran against, this override was expressed as two alternative thresholds:</p>
<ul>
<li class=""><strong><code>maxTokensInFlightPenalty</code></strong> (τ): a non-warm endpoint is added back to the candidate set if its uncached-tokens-in-flight count is at least τ lower than the warm endpoint's. This is the saturation guard used by the matched configurations (τ=286720), and engages only when the warm endpoint is genuinely compute-saturated. The earlier interface's predictor-based threshold (next bullet) requires latency-predictor sidecars and was inert on these arms.</li>
<li class=""><strong><code>maxTTFTPenaltyMs</code></strong>: a non-warm endpoint is added back to the candidate set if its predicted TTFT is within the budget (in milliseconds) of the best warm endpoint's predicted TTFT. Requires the latency-predictor to produce TTFT estimates. Used by the latency-predictor pipeline (<code>maxTokensInFlightPenalty=0</code>, <code>maxTTFTPenaltyMs=5000</code>); see <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#latency-predictors-threshold-configuration" class="">below</a>.</li>
</ul>
<p>The filter on llm-d main unifies these into a single time-domain gate. Every endpoint's TTFT is estimated, either from <code>peakPrefillThroughput</code> (<code>in_flight_tokens / R_peak</code>, the default) or from the latency predictor, selected by <code>ttftSource</code>, and stickiness breaks when the best warm endpoint's estimated TTFT exceeds the best non-warm endpoint's by more than <code>maxTTFTPenaltyMs</code>. With the throughput source, this is exactly the token-gap condition above: the gate fires when the in-flight gap exceeds τ = R_peak × T_max, computed internally. The shipped defaults (<code>peakPrefillThroughput=15928</code>, <code>maxTTFTPenaltyMs=18000</code>) reproduce our threshold: 15928 × 18s = 286,704 ≈ 286720. The <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#deriving-tau-from-the-hardware" class="">next section</a> derives this quantity from hardware calibration; under the current interface, the calibration measurement <em>is</em> the configuration parameter.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="latency-predictors-threshold-configuration">Latency-Predictor's Threshold Configuration<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#latency-predictors-threshold-configuration" class="hash-link" aria-label="Direct link to Latency-Predictor's Threshold Configuration" title="Direct link to Latency-Predictor's Threshold Configuration" translate="no">​</a></h3>
<p>The latency-predictor pipeline sets <code>maxTTFTPenaltyMs=5000</code> and uses weighted-random sampling among the candidates the filter produces. This combination has empirically worked well on the workloads where the predictor is appropriate (code-gen and reasoning). The 5s value can be raised if observed TTFT regressions warrant a tighter override; we have not characterized the sensitivity systematically. In the current filter interface this configuration corresponds to <code>ttftSource: latencyPredictor</code> with <code>maxTTFTPenaltyMs=5000</code>.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="deriving-tau-from-the-hardware">Deriving τ from the Hardware<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#deriving-tau-from-the-hardware" class="hash-link" aria-label="Direct link to Deriving τ from the Hardware" title="Direct link to Deriving τ from the Hardware" translate="no">​</a></h2>
<p>The 286720 threshold (= 35 × 8192, or 35 max-num-batched-tokens chunks) appears in our matched configurations without justification above. This section derives it from a single calibration measurement and an operator-chosen SLO ceiling, and shows the formula generalizes across (model, accelerator) combinations.</p>
<p>This derivation is no longer only an operator recipe: the filter on llm-d main implements it internally, taking <code>peakPrefillThroughput</code> (R_peak) as its calibrated parameter and <code>maxTTFTPenaltyMs</code> (T_max) as the SLO ceiling (see <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#the-saturation-override" class="">the saturation override</a>). The calibration measurement itself ships as <a href="https://github.com/llm-d/llm-d/tree/main/guides/recipes/router/calibration" target="_blank" rel="noopener noreferrer" class=""><code>guides/recipes/router/calibration</code></a> (<code>calibrate.sh</code> reports <code>peakPrefillThroughput = CHUNK_SIZE / median(TTFT)</code>, exactly <code>B / T(B)</code> below), with measured reference values per (model, accelerator, engine) in the <a href="https://github.com/llm-d/llm-d/blob/main/guides/recipes/router/calibration/configuration-matrix.md" target="_blank" rel="noopener noreferrer" class="">configuration matrix</a>.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="what-τ-represents-and-when-it-should-fire">What τ Represents and When It Should Fire<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#what-%CF%84-represents-and-when-it-should-fire" class="hash-link" aria-label="Direct link to What τ Represents and When It Should Fire" title="Direct link to What τ Represents and When It Should Fire" translate="no">​</a></h3>
<p>τ is the gap in uncached tokens in flight at which we let a request bypass the warm endpoint for a colder one. Because vLLM batches prefill in chunks of <code>max-num-batched-tokens</code> per iteration rather than processing tokens serially, the cost of staying sticky is bounded by per-chunk throughput, not per-token throughput. τ is therefore best expressed in units of chunks: how many <code>max-num-batched-tokens</code> worth of pending uncached prefill work the warm endpoint is allowed to accumulate as a lead over the coldest endpoint before the override fires. The threshold should fire only when the warm endpoint is genuinely compute-saturated, i.e., when keeping a new arrival on it would cause that arrival's TTFT to exceed an operator-chosen SLO ceiling. Below saturation, stickiness is essentially free (the warm endpoint processes new chunks alongside ongoing work); at saturation, stickiness becomes harmful because the new arrival queues behind work the cold endpoint could do faster.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="deriving-tau-sat">Deriving τ_sat<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#deriving-tau-sat" class="hash-link" aria-label="Direct link to Deriving τ_sat" title="Direct link to Deriving τ_sat" translate="no">​</a></h3>
<p>The peak prefill throughput per endpoint is set by how fast vLLM processes one fully-packed chunk:</p>
<div class="language-text codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">R_peak = B / T(B)</span><br></div></code></pre></div></div>
<p>where <code>B = max-num-batched-tokens</code> (the value configured in your vLLM deployment, 8192 in our setup per <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#setup" class="">Setup</a>, but operator-tunable in general) and <code>T(B)</code> is the measured wall-clock time to prefill one chunk of <code>B</code> tokens on the target hardware. This is one calibration measurement.</p>
<p>At saturation, in-flight uncached tokens drain at rate <code>R_peak</code>. A new arrival's queueing time is approximately <code>τ / R_peak</code>, where τ is the warm endpoint's lead in uncached-tokens-in-flight over the coldest endpoint (the quantity the affinity filter's override is configured to fire on, see <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#setup" class="">Setup</a>). For this queueing time to stay within an operator-chosen TTFT degradation ceiling <code>T_max</code>:</p>
<div class="language-text codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">τ_sat = R_peak × T_max = (B × T_max) / T(B)</span><br></div></code></pre></div></div>
<p>The threshold depends on one measured quantity (<code>T(B)</code>) and one operator-chosen quantity (<code>T_max</code>). Nothing else.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="calibration">Calibration for Qwen3-32B / H100<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#calibration" class="hash-link" aria-label="Direct link to Calibration for Qwen3-32B / H100" title="Direct link to Calibration for Qwen3-32B / H100" translate="no">​</a></h3>
<p>We measured TTFT for single requests at prompt sizes <code>P = k × 8192</code> for <code>k = 1..19</code>:</p>
<div style="text-align:center;margin:20px 0"><img src="https://llm-d.ai/img/blogs/bottleneck-aware-scheduling/fig_7_3_1_calibration.png" alt="TTFT vs prompt size calibration measurement for Qwen3-32B on H100" style="width:70%;min-width:320px;height:auto"></div>
<p><code>T(B = 8192) = 0.40</code> s, giving <code>R_peak = 20480 tokens/sec</code> per endpoint.</p>
<p>(The shipped calibration recipe reports <code>peakPrefillThroughput = 15928</code> for the same nominal path (Qwen3-32B / H100 / TP=2 / B=8192), lower than our 20480 due to methodological differences: the recipe takes the median TTFT of repeated random-token requests through the full request path, where our value comes from a single-request quadratic fit. The two decompositions agree on the quantity that matters, the override threshold: 15928 × 18s and 20480 × 14s both give τ ≈ 286.7k.)</p>
<p>For T_max values:</p>
<table><thead><tr><th style="text-align:right">T_max</th><th style="text-align:right">τ_sat</th></tr></thead><tbody><tr><td style="text-align:right">10s</td><td style="text-align:right">205k</td></tr><tr><td style="text-align:right"><strong>14s</strong></td><td style="text-align:right"><strong>286,720</strong></td></tr><tr><td style="text-align:right">18s</td><td style="text-align:right">369k</td></tr><tr><td style="text-align:right">25s</td><td style="text-align:right">512k</td></tr></tbody></table>
<p>286720 corresponds to T_max = 14s, i.e., "the threshold fires when keeping a sticky request would cause new arrivals to queue ~14 seconds of prefill work." Equivalently, since <code>τ = K × B</code> for some integer K and <code>T_max = K × T(B)</code>, the threshold can be expressed in chunks: <strong>τ = 35 × B = 35 max-num-batched-tokens chunks of pending uncached prefill work</strong>, equivalent to ~14 seconds of queueing at peak chunk throughput (35 × 0.40s). The chunk-count framing is invariant across hardware: any (model, accelerator) combination with the same <code>K=35</code> choice produces a threshold corresponding to the same multiple of single-chunk wall time. This matches the empirical observation in the <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#b2b-saas-pathological-prefill-bound" class="">b2b-saas results</a> that the override begins firing around QPS 50+, where TTFT-p90 is approaching the 30s range and the cluster is near compute saturation.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="portability-across-model-accelerator-engine">Portability Across (Model, Accelerator, Engine)<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#portability-across-model-accelerator-engine" class="hash-link" aria-label="Direct link to Portability Across (Model, Accelerator, Engine)" title="Direct link to Portability Across (Model, Accelerator, Engine)" translate="no">​</a></h3>
<p>The formula requires one calibration run per (model, accelerator, engine) combination. <code>R_peak</code> captures everything specific to the serving path, compute throughput, attention efficiency, kernel quality, framework overhead, in a single number.</p>
<div style="text-align:center;margin:20px 0"><img src="https://llm-d.ai/img/blogs/bottleneck-aware-scheduling/fig_7_4_1_portability.png" alt="Measured peakPrefillThroughput and tau_sat across serving paths" style="width:85%;min-width:320px;height:auto"></div>
<p>Every row below is measured; none are estimates. The anchored row is our single-request fit from <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#calibration" class="">the calibration above</a> (20,480 tok/s). The GLM-5.2 row was calibrated on a production Vertex AI serving fleet (SGLang with EAGLE speculative decoding, 8× B200 per pod, TP=8): ten ~32k-token cache-miss prefills through the full gateway path, median TTFT 1.369s, giving 24,027 tok/s per pod. The remaining rows are the measured <code>peakPrefillThroughput</code> values distributed with the router in the <a href="https://github.com/llm-d/llm-d/blob/main/guides/recipes/router/calibration/configuration-matrix.md" target="_blank" rel="noopener noreferrer" class="">configuration matrix</a>, plus the <a href="https://github.com/llm-d/llm-d/tree/main/guides/agentic-serving" target="_blank" rel="noopener noreferrer" class="">agentic-serving</a> guide's TPU v7x calibration. Recipe-measured values read lower than a single-request fit of the same path (15,928 vs our 20,480 on the reference H100 path, reconciled <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#calibration" class="">above</a>), so τ derived from them is conservative. Each value holds at the chunk size, TP, and quantization its deployment runs (the matrix paths use <code>max-num-batched-tokens=8192</code>; the GLM-5.2 fleet runs a 32k chunk): re-measure after changing any of them.</p>
<p>The spread makes the section's point sharper than any estimate could: <code>R_peak</code> is a property of the full serving path, not of the accelerator. gpt-oss-120B posts the highest value in the table at TP=1 despite being the largest model listed, because it is a sparse MoE (~5B active parameters, MXFP4) and a prefill step touches few weights; on identical H100 hardware it clears ~2.5× the dense Qwen3-32B path. Architecture, engine, sparsity, and quantization all move the number, which is why the matrix keys rows on (model, accelerator, engine) and why one calibration Job beats an estimate whenever the hardware is available. (The SGLang / H100 row corrects the value currently published in the matrix, 30,720, which is 2× too high.) (For hardware that cannot be measured yet, a FLOPs-based estimate can seed a starting value; <code>portability_script/portability.py</code> includes the model we used before these measurements existed.)</p>
<table><thead><tr><th style="text-align:left">Path</th><th style="text-align:left">Engine</th><th style="text-align:right">TP</th><th style="text-align:right"><code>peakPrefillThroughput</code> (tok/s)</th><th style="text-align:right">τ_sat at T_max=14s</th></tr></thead><tbody><tr><td style="text-align:left">gpt-oss-120B / H100</td><td style="text-align:left">vLLM</td><td style="text-align:right">1</td><td style="text-align:right">39,065</td><td style="text-align:right">~547,000</td></tr><tr><td style="text-align:left">Qwen3-32B / TPU v7x</td><td style="text-align:left">vLLM</td><td style="text-align:right">8</td><td style="text-align:right">27,336</td><td style="text-align:right">~383,000</td></tr><tr><td style="text-align:left">Qwen3-32B / TPU v6e</td><td style="text-align:left">vLLM</td><td style="text-align:right">8</td><td style="text-align:right">26,290</td><td style="text-align:right">~368,000</td></tr><tr><td style="text-align:left">GLM-5.2-NVFP4 / 8× B200</td><td style="text-align:left">SGLang</td><td style="text-align:right">8</td><td style="text-align:right">24,027</td><td style="text-align:right">~336,000</td></tr><tr><td style="text-align:left">Qwen3-32B / H100 (anchored)</td><td style="text-align:left">vLLM</td><td style="text-align:right">2</td><td style="text-align:right">20,480</td><td style="text-align:right"><strong>286,720</strong></td></tr><tr><td style="text-align:left">Qwen3-Coder-480B-FP8 / TPU v7x</td><td style="text-align:left">vLLM</td><td style="text-align:right">8</td><td style="text-align:right">16,444</td><td style="text-align:right">~230,000</td></tr><tr><td style="text-align:left">Qwen3-VL-32B / H200</td><td style="text-align:left">vLLM</td><td style="text-align:right">2</td><td style="text-align:right">15,751</td><td style="text-align:right">~221,000</td></tr><tr><td style="text-align:left">Qwen3-32B / H100</td><td style="text-align:left">SGLang</td><td style="text-align:right">2</td><td style="text-align:right">15,360</td><td style="text-align:right">~215,000</td></tr></tbody></table>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="why-τ-does-not-transplant">Why τ Does Not Transplant<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#why-%CF%84-does-not-transplant" class="hash-link" aria-label="Direct link to Why τ Does Not Transplant" title="Direct link to Why τ Does Not Transplant" translate="no">​</a></h3>
<p>The table explains why a single τ value cannot transplant across deployments, even deployments sharing hardware. On the same H100, moving our 286,720 onto the gpt-oss-120B path would set the threshold ~1.9× too low: that path drains ~547,000 tokens within the same 14s budget, so the valve would fire while the warm endpoint still had headroom, giving up cache affinity too early. Moving it onto the Qwen3-VL-32B / H200 path would set it ~1.3× too high: that endpoint saturates near 221,000 tokens of in-flight work, so the valve would engage late and new arrivals would queue past the SLO ceiling. The same reversal appears within one accelerator family: TPU v7x supports τ = 383,000 serving Qwen3-32B but only 230,000 serving Qwen3-Coder-480B.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="recommendations">Recommendations<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#recommendations" class="hash-link" aria-label="Direct link to Recommendations" title="Direct link to Recommendations" translate="no">​</a></h3>
<ul>
<li class="">Calibrate per (model, accelerator, engine, <code>max-num-batched-tokens</code>) combination by measuring <code>T(B)</code>. Check the shipped <a href="https://github.com/llm-d/llm-d/blob/main/guides/recipes/router/calibration/configuration-matrix.md" target="_blank" rel="noopener noreferrer" class="">configuration matrix</a> first, your combination may already be measured; otherwise run <a href="https://github.com/llm-d/llm-d/tree/main/guides/recipes/router/calibration" target="_blank" rel="noopener noreferrer" class=""><code>calibrate.sh</code></a> against your deployed stack and set the reported value as <code>peakPrefillThroughput</code> on the filter.</li>
<li class="">Choose <code>T_max</code> (<code>maxTTFTPenaltyMs</code>) based on operator TTFT SLO degradation tolerance. We use 14s, corresponding to the TTFT degradation tolerance our b2b-saas operating range approaches at saturation; the filter's shipped default is 18s. Workloads with stricter SLOs should use proportionally smaller T_max.</li>
<li class="">Do not transplant τ values (or <code>peakPrefillThroughput</code> values) across deployments without re-measuring.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="discussion">Discussion<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#discussion" class="hash-link" aria-label="Direct link to Discussion" title="Direct link to Discussion" translate="no">​</a></h2>
<p>The framework reduces a multi-dimensional tuning problem (which scorers, which weights, which thresholds) to a one-step decision (which bottleneck), with all other parameters either fixed by the matched configuration or derivable from a single calibration measurement. This works on the three workloads evaluated here. The natural follow-up is to validate the framework on a broader range of traffic shapes.</p>
<p>The <a href="https://github.com/kubernetes-sigs/inference-perf" target="_blank" rel="noopener noreferrer" class=""><code>inference-perf</code> workload catalog</a> provides standardized workload generators covering a range of prompt/output distributions, multi-turn structures, and prefix-reuse patterns beyond the three we evaluated. We would prioritize:</p>
<ul>
<li class=""><strong>Tool-use / agentic workloads</strong>: many short turns with moderate per-turn prompts, growing context. Tests whether the prefill-bound matched configuration remains correct when per-turn prompt growth shifts the bottleneck between regimes within a single conversation. Partially addressed since these experiments: the <a href="https://github.com/llm-d/llm-d/tree/main/guides/agentic-serving" target="_blank" rel="noopener noreferrer" class="">agentic-serving guide</a> now ships the prefill-bound matched configuration (token-load routing with offload-aware cache accounting and a calibrated <code>peakPrefillThroughput</code>) for agentic code-generation workloads on H200 and TPU v7, including P/D-disaggregated variants, with published benchmark results; a systematic study of regime shift within single conversations remains open.</li>
<li class=""><strong>Multimodal serving</strong>: image-plus-text traffic adds a stage the two-regime taxonomy does not cover: a vision encoder that runs ahead of prefill and can saturate independently. Addressed since these experiments: the <a href="https://github.com/llm-d/llm-d/tree/main/guides/multimodal-serving" target="_blank" rel="noopener noreferrer" class="">multimodal-serving guides</a> now ship these matched configurations applied per scheduling profile: encode routes on queue depth, every profile that performs prefill (including colocated prefill+decode) uses the affinity-filter + token-load stack, and pure decode scores on active requests alone. Benchmarks against a round-robin baseline on a shared-prefix multimodal workload (8 model servers, 2×H200 each at TP=2) are published with the guide. Multimodal also stresses an assumption behind the token-load signal: image inputs carry no text length, so per-request token counts come from the multimodal <code>token-producer</code>, which estimates each image's contribution from its resolution, count-calibrated against the served model. Two of this post's constants had to move for multimodal: <code>affinityThreshold</code> drops from 0.8 to 0.6, because a multimodal prompt's cacheable fraction tops out near 0.7 (the image and question portions are never cache hits) so the 0.8 default can never engage; and <code>maxTTFTPenaltyMs</code> doubles from the 18s default to 36s, because the calibration that produces <code>peakPrefillThroughput</code> (measured 15751 for Qwen3-VL-32B on H200/TP=2) exercises text prefill only: vision-encoder time makes image-heavy prefill slower per estimated token than the measured throughput implies, so the filter's predicted TTFT runs light of wall-clock. In this post's terms the effective τ doubles for image-heavy traffic; the doubled gate is benchmark-validated to parity with the previously shipped weighted blend.</li>
<li class=""><strong>Long-output summarization</strong>: moderate-prompt, very-long-output workloads. Tests whether the decode-bound matched configuration holds when output token diversity (versus reasoning's concentrated chain-of-thought style) changes decode batching dynamics.</li>
<li class=""><strong>Mixed-traffic scenarios</strong>: simultaneous code-gen-style and chat-style traffic on the same cluster. Tests whether per-route configuration selection is necessary or whether a single configuration can serve heterogeneous traffic adequately.</li>
<li class=""><strong>High-prefix-reuse production traces</strong>: real chat-completion traffic where prefix-reuse rates are high but the corpus is unbounded (unlike b2b-saas's fixed 150-prompt corpus). Validates whether the matched configuration holds under realistic cache-management dynamics, or whether b2b-saas-style pathologies don't appear in practice.</li>
</ul>
<p>Prefill/decode-disaggregated deployments deserve a note of their own: they are the limiting case of the framework. When prefill and decode run in separate pools, the <a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#the-two-regimes" class="">two regimes</a> stop being workload properties the operator must identify and become structural properties of each pool: every request exercises both bottlenecks, one pool at a time. The llm-d P/D guides (<a href="https://github.com/llm-d/llm-d/tree/main/guides/pd-disaggregation" target="_blank" rel="noopener noreferrer" class="">pd-disaggregation</a> and the P/D variants of <a href="https://github.com/llm-d/llm-d/tree/main/guides/agentic-serving" target="_blank" rel="noopener noreferrer" class="">agentic-serving</a>) accordingly ship both matched configurations simultaneously: the prefill profile routes with the affinity-filter + token-load stack (with its own calibrated <code>peakPrefillThroughput</code>), and the pure-decode profile scores on active requests alone. The multimodal e-p-d configuration extends the same pattern to three pools, with encode routing on queue depth. In these deployments the one decision the framework asks of the operator (which bottleneck) is answered by the architecture itself; what remains is per-pool calibration.</p>
<p>A secondary follow-up: characterizing the latency-predictor pipeline on high-variance production traffic where the bottleneck shifts dynamically. Our three benchmark workloads each sit in a single regime; production traffic often does not. The latency-predictor pipeline's per-request TTFT estimation may give it a structural advantage in such settings, outperforming any single matched configuration that's optimal for one regime but suboptimal for another, but we have not measured this. Reducing the pipeline's setup overhead (predictor training, sidecar deployment, model serving) would also lower the cost of deploying it as a workload-agnostic default; the current filter's <code>ttftSource: latencyPredictor</code> mode already removes the configuration-surface part of that overhead, though the predictor sidecars still need to be deployed and trained.</p>
<p>A tertiary follow-up has shipped since these experiments were run: the <a href="https://github.com/llm-d/llm-d/blob/main/guides/recipes/router/calibration/configuration-matrix.md" target="_blank" rel="noopener noreferrer" class="">configuration matrix</a> distributed with the router records measured <code>peakPrefillThroughput</code> values for the (model, accelerator, engine) combinations llm-d supports, so operators on those paths don't need to run the calibration step themselves. The formula is portable; the constants are not, and the matrix is how the constants now travel.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="appendix">Appendix<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#appendix" class="hash-link" aria-label="Direct link to Appendix" title="Direct link to Appendix" translate="no">​</a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="configmaps">Configmaps<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#configmaps" class="hash-link" aria-label="Direct link to Configmaps" title="Direct link to Configmaps" translate="no">​</a></h3>
<p>Full scheduler configmaps for all five configurations: <a href="https://github.com/kaushikmitr/llm-d/tree/feature/vllm-optimized-benchmarking/llm-d-benchmarking/configmaps" target="_blank" rel="noopener noreferrer" class="">llm-d-benchmarking/configmaps</a></p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="workload-yamls">Workload YAMLs<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#workload-yamls" class="hash-link" aria-label="Direct link to Workload YAMLs" title="Direct link to Workload YAMLs" translate="no">​</a></h3>
<p>Full workload specifications: <a href="https://github.com/kaushikmitr/llm-d/tree/feature/vllm-optimized-benchmarking/llm-d-benchmarking/workloads" target="_blank" rel="noopener noreferrer" class="">llm-d-benchmarking/workloads</a></p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="full-result-tables">Full Result Tables<a href="https://llm-d.ai/blog/sticky-until-saturated-token-aware-routing#full-result-tables" class="hash-link" aria-label="Direct link to Full Result Tables" title="Direct link to Full Result Tables" translate="no">​</a></h3>
<p>Per-workload result tables and analysis scripts live in the <code>analysis/</code> subdirectory of each workload: <a href="https://github.com/kaushikmitr/llm-d/tree/feature/vllm-optimized-benchmarking/llm-d-benchmarking/workloads" target="_blank" rel="noopener noreferrer" class="">llm-d-benchmarking/workloads</a></p>]]></content:encoded>
            <category>blog posts</category>
            <category>Scheduling</category>
            <category>Inference</category>
            <category>SIG-Benchmarking</category>
        </item>
        <item>
            <title><![CDATA[Pull, Don't Recompute: Peer-to-Peer KV Cache Sharing in llm-d]]></title>
            <link>https://llm-d.ai/blog/p2p-kv-cache-sharing-llm-d</link>
            <guid>https://llm-d.ai/blog/p2p-kv-cache-sharing-llm-d</guid>
            <pubDate>Sat, 15 Aug 2026 09:00:00 GMT</pubDate>
            <description><![CDATA[When load balancing or serving topology separates a request from its cached prefix, llm-d can move the KV from a peer instead of recomputing it.]]></description>
            <content:encoded><![CDATA[<p>A request arrives and its 48K-token prefix is already sitting in a KV cache,
but the endpoint holding it - one schedulable serving instance: either a
complete engine instance or a rank within a multi-rank deployment - is busy.
Route the request to
the cache owner and it queues behind that backlog; route it to an idle
endpoint and it spends seconds recomputing work the cluster already did.
Waiting and recomputing are both wrong answers. P2P (peer-to-peer) KV cache
sharing adds the third option: send the request to the best endpoint for
load, and copy the finished KV to it.</p>
<p>A busy owner is only one way locality breaks. Load balancing may select
another endpoint, or the required KV may have been generated by a different
serving role. In every such case the llm-d router already knows how much of a
request's prefix each candidate endpoint holds. With P2P, that knowledge
becomes a transfer instruction: route the request to the best endpoint
overall, then tell it where to fetch the missing prefix.</p>
<div class="theme-admonition theme-admonition-info admonition_xJq3 alert alert--info"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>Headline result</div><div class="admonitionContent_BuS1"><p>On <code>GLM-5.2-FP8</code> at concurrency 64, P2P increased successful throughput
(requests completing end-to-end within the fixed 300-second window) with
both prefix-cache routing methods: 4.6% with approximate routing and 9.7%
with precise routing. Precise routing with P2P led all four configurations
at 11.1% above the baseline. Across three repeat comparisons, the combined
policy improved successful throughput by 9.6% on average.</p></div></div>
<p>This is not a universal speedup. When routing already produces a local hit,
P2P correctly does nothing. When locality conflicts with load balance or
serving topology, it can replace seconds of repeated computation with a peer
transfer. The operating principle is simple: <strong>local hits first; portable
reuse when locality breaks.</strong></p>
<p>The rest of this post answers four questions: how expensive is a pull; whether
it improves load-balanced serving; whether it preserves session history across
prefill/decode (P/D) roles; and when it should stay inactive.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-gap-prefix-caches-are-per-endpoint">The Gap: Prefix Caches Are Per-Endpoint<a href="https://llm-d.ai/blog/p2p-kv-cache-sharing-llm-d#the-gap-prefix-caches-are-per-endpoint" class="hash-link" aria-label="Direct link to The Gap: Prefix Caches Are Per-Endpoint" title="Direct link to The Gap: Prefix Caches Are Per-Endpoint" translate="no">​</a></h2>
<p>Shared system prompts, common documents, agentic loops, and multi-turn
conversations all repeat long prefixes. Reusing their KV skips a large portion
of prefill work, reduces time to first token (TTFT), and leaves more GPU cycles
for decode. For more background, see
<a href="https://llm-d.ai/blog/kvcache-wins-you-can-see" target="_blank" rel="noopener noreferrer" class="">KV-Cache Wins You Can See</a>.</p>
<p>llm-d already improves reuse in two ways. Prefix-aware routing sends
requests to the endpoints that hold their prefixes. KV offloading keeps
copies in a larger CPU tier, and a filesystem backend can extend that tier
to local or shared storage for persistence and larger capacity.</p>
<p>Routing alone cannot make every good placement local, while shared storage
adds an infrastructure dependency and a storage data path. Often the required
blocks are already in another endpoint's CPU tier, one network hop away.
P2P cache sharing uses that middle path.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="how-p2p-works">How P2P Works<a href="https://llm-d.ai/blog/p2p-kv-cache-sharing-llm-d#how-p2p-works" class="hash-link" aria-label="Direct link to How P2P Works" title="Direct link to How P2P Works" translate="no">​</a></h2>
<p>P2P pulling is a small, opt-in scheduling step. It is off by default because
the crossover and available CPU-tier and fabric capacity are
deployment-specific; without calibration, a short-prefix pull can cost more
than recomputation.
Every participating vLLM instance can serve two roles, selected per request:</p>
<ul>
<li class=""><strong>Consumer.</strong> Pulls matching KV blocks from a peer instead of computing them
locally.</li>
<li class=""><strong>Producer.</strong> Serves blocks from its CPU offload tier when another peer
requests them.</li>
</ul>
<p>The consumer sends the producer the hashes of the blocks it needs. The
producer reports which blocks remain available, then writes the matching
blocks over NIXL, the NVIDIA Inference Xfer Library. The llm-d router describes
the operation as a pull because the consumer requests it; after the lookup
handshake, the producer performs the data-path write. Neither GPU performs the
peer-to-peer copy, so serving a peer costs the producer CPU memory bandwidth
and network capacity, not GPU compute. The transfer copies reusable blocks
to the destination; the producer keeps its copy. An instrumented GLM run
below verifies that the router selected a remote source and the engine
completed the peer transfer. A normal miss falls back to computation.</p>
<div margin:="">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/p2p-kv-cache/architecture.png" alt="Architecture diagram showing the EPP selecting a destination and KV source, with NIXL moving matching blocks between peer CPU tiers" height:="" class="img_ev3q">
  <p margintop:=""><em>The EPP selects the destination and source; the sidecar passes that decision to the engine; NIXL moves matching blocks CPU-to-CPU.</em></p>
</div>
<p>The router's Endpoint Picker (EPP) supplies the source decision from its
prefix index. It compares the peer with the most cached tokens against the
endpoint selected to run the request. If the peer holds enough more cached
prefix tokens than that destination (<code>minCachedTokenDelta</code>) to beat the
measured transfer crossover, the EPP names it as the KV source; a tie or
self-match stays local. Among near-tied holders, the EPP samples the source
by load, weighting peers inversely to their waiting-queue depth as a proxy
for producer pressure, so concurrent pulls spread across producers instead
of converging on one. The main deployment builds its source map from KV
events reported by the engines. The GLM comparison also tests the
placement-derived approximate index. Both aim to locate reusable state. The
approximate index infers that location from placement history, so its view
can drift from what the engines actually hold.</p>
<p>P2P also composes with P/D disaggregation. A prefill worker can pull history
generated by a decoder, compute only the new portion, and continue the normal
P/D flow. No application change is required.</p>





















<table><thead><tr><th>Situation</th><th>P2P behavior</th></tr></thead><tbody><tr><td>Placement finds a local prefix</td><td>Stays idle; moving zero bytes is optimal</td></tr><tr><td>Load balancing selects another endpoint</td><td>Pulls the prefix instead of recomputing it</td></tr><tr><td>A later P/D turn needs decode-generated history</td><td>Copies that history to the prefill worker</td></tr></tbody></table>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="what-we-measured">What We Measured<a href="https://llm-d.ai/blog/p2p-kv-cache-sharing-llm-d#what-we-measured" class="hash-link" aria-label="Direct link to What We Measured" title="Direct link to What We Measured" translate="no">​</a></h2>
<p>We evaluated four models, from an 8B dense model to a 753B wide-EP MoE, across
aggregated and P/D-disaggregated deployments. The experiments make two kinds
of claims. In an isolated A/B, P2P is the only policy difference. In a
system-policy comparison, placement or the CPU offload stack changes with it,
so the result belongs to the complete serving policy.</p>
<p>The three anchor results below establish the transfer economics, compare a
complete wide-EP routing policy under saturation, and measure the P/D
session-continuity payoff. The document Q&amp;A and smaller-model experiments then
show where the same mechanism appears under different serving policies.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="1-price-the-transfer-before-using-it">1. Price the Transfer Before Using It<a href="https://llm-d.ai/blog/p2p-kv-cache-sharing-llm-d#1-price-the-transfer-before-using-it" class="hash-link" aria-label="Direct link to 1. Price the Transfer Before Using It" title="Direct link to 1. Price the Transfer Before Using It" translate="no">​</a></h3>
<p>Pulling is useful only when it costs less than recomputing. The crossover
depends on the model, KV representation, hardware, and network, so it must be
measured rather than assumed. A fresh prefix in these experiments means a
newly salted token sequence that is seeded on the source and absent from the
consumer before the timed request.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Setup: a single pod pair, KV source injected directly, no router in the path</summary><div><div class="collapsibleContent_i85q">
<!-- -->
<p>The driver seeds a fresh prefix on the source pod and requests it on the
consumer, injecting the KV source into the request rather than letting the
router decide. This measures the transfer itself rather than any placement
policy. Transfers run CPU-to-CPU over NIXL (UCX) with <code>rdma/ib</code> devices
exposed to both pods. The transport sets the crossover, so the
<a href="https://github.com/llm-d/llm-d/tree/main/guides/p2p-kv-cache-sharing" target="_blank" rel="noopener noreferrer" class="">guide</a>
recommends deriving the threshold from a crossover measured on your own
fabric.</p>
</div></div></details>
<p>On <code>openai/gpt-oss-120b</code> with H200 GPUs, the pull won at every measured prefix
length, so the crossover sits below the smallest measured prefix of 2K tokens.
The gap also widens with length: the transfer moves bytes at network
bandwidth, linear in prefix size, while recompute pays prefill FLOPs per token
plus an attention term that grows quadratically with context:</p>









































<table><thead><tr><th style="text-align:right">Prefix tokens</th><th style="text-align:right">Recompute</th><th style="text-align:right">P2P pull</th><th style="text-align:right">Delta</th></tr></thead><tbody><tr><td style="text-align:right">2,048</td><td style="text-align:right">78 ms</td><td style="text-align:right">35 ms</td><td style="text-align:right"><strong>-56%</strong></td></tr><tr><td style="text-align:right">8,192</td><td style="text-align:right">250 ms</td><td style="text-align:right">57 ms</td><td style="text-align:right"><strong>-77%</strong></td></tr><tr><td style="text-align:right">16,384</td><td style="text-align:right">510 ms</td><td style="text-align:right">86 ms</td><td style="text-align:right"><strong>-83%</strong></td></tr><tr><td style="text-align:right">32,768</td><td style="text-align:right">1,173 ms</td><td style="text-align:right">165 ms</td><td style="text-align:right"><strong>-86%</strong></td></tr><tr><td style="text-align:right">49,152</td><td style="text-align:right">1,988 ms</td><td style="text-align:right">235 ms</td><td style="text-align:right"><strong>-88%</strong></td></tr></tbody></table>
<div margin:="">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/p2p-kv-cache/crossover-gptoss.png" alt="Line chart comparing prefill latency for recompute and P2P pull across gpt-oss-120b prefix lengths" height:="" class="img_ev3q">
  <p margintop:=""><em>Recompute grows far faster than the peer transfer; the advantage reaches 88% at 48K tokens.</em></p>
</div>
<p>The crossover moved on the 753B GLM testbed, whose KV footprint is about 93 KB
per token. Pull and recompute were roughly tied near 8K tokens; at 12K the pull
was 27% faster, and at 24K it was 61% faster. A 24K prefix is about 2.1 GiB of
KV, while a 70K prefix is about 6.2 GiB. Break-even depends on the ratio of
prefill cost to KV-transfer cost, not model size alone. On the GLM rig,
short-prefix recompute stayed below the measured 1.2-1.3 second pull floor, so
P2P began winning only around 8.7K tokens.</p>
<p>This is why the EPP uses a per-deployment minimum cached-token advantage
rather than pulling every remote hit. The production threshold should sit
above the measured crossover and include margin for fabric contention and
producer load.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="2-reuse-cached-state-when-placement-changes">2. Reuse Cached State When Placement Changes<a href="https://llm-d.ai/blog/p2p-kv-cache-sharing-llm-d#2-reuse-cached-state-when-placement-changes" class="hash-link" aria-label="Direct link to 2. Reuse Cached State When Placement Changes" title="Direct link to 2. Reuse Cached State When Placement Changes" translate="no">​</a></h3>
<p>Approximate and precise routing try to answer the same question: where does
reusable state live? Approximate routing infers the answer from prior
placements and expected cache behavior. That inference often keeps a session
on the same worker, but it can diverge from actual residency, including after
evictions. Precise routing instead follows the cache state reported by the
engines. It has a direct view of residency, but a cache-rich worker may not be
the best place to run the next request.</p>
<p>P2P works with either view. It lets the llm-d router choose where the request
should run, then reuse state held by another worker.</p>
<p>The <a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d" target="_blank" rel="noopener noreferrer" class="">GLM-5.2 agentic-serving study</a>
describes the production coding-agent trace shape and wide-EP serving
architecture. This experiment crosses both routing methods with and without
P2P under saturation.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Setup: GLM-5.2-FP8 on 32x H200 P/D-disaggregated; one four-configuration comparison plus three repeat comparisons; AIPerf trace replay at concurrency 64</summary><div><div class="collapsibleContent_i85q">
<!-- -->
<p>The 753B MoE runs on two prefill and two decode instances, each 8-way
data/expert parallel. AIPerf replays 48 entries from the SemiAnalysis Weka
coding-agent trace corpus with seed 67. The four-configuration comparison covers
approximate and precise routing, each with and without P2P. Each configuration
starts on fresh engine pods and uses the same 300-second admission window plus
a 120-second drain. Only requests that reach a terminal state by 300 seconds
enter the result, so this is a matched saturation snapshot rather than a
measurement through full workload completion.</p>
<p>The repeated baseline is calibrated approximate routing without P2P. The
candidate combines DP-aware precise cache-location data with peer retrieval
using a 2,048-token pull threshold. All four configurations use the same
calibrated prefill capacity and 55-second affinity-penalty budget.</p>
<p>The 2,048-token threshold is below the separate 12,288-token crossover
recommendation. It describes the measured policy, not a production tuning
recommendation.</p>
</div></div></details>
<p>The four-way comparison is one saturation snapshot. The repeat comparisons
test whether the combined policy holds.</p>
<div margin:="">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/p2p-kv-cache/glm-c64-policy-comparison.png" alt="Bar chart comparing successful throughput for approximate and precise routing, each with and without P2P, in the GLM C64 comparison" height:="" class="img_ev3q">
  <p margintop:=""><em>P2P improves successful throughput with either routing method. The combination of precise routing and P2P delivers the best performance.</em></p>
</div>



































<table><thead><tr><th>Routing policy</th><th style="text-align:right">Successful req/s</th><th style="text-align:right">Change from approximate without P2P</th><th style="text-align:right">Median TTFT</th></tr></thead><tbody><tr><td>Approximate routing</td><td style="text-align:right">2.890</td><td style="text-align:right">baseline</td><td style="text-align:right">2.691 s</td></tr><tr><td>Approximate routing with P2P</td><td style="text-align:right">3.023</td><td style="text-align:right"><strong>+4.6%</strong></td><td style="text-align:right"><strong>2.184 s (-18.9%)</strong></td></tr><tr><td>Precise routing</td><td style="text-align:right">2.927</td><td style="text-align:right">+1.3%</td><td style="text-align:right">2.899 s (+7.7%)</td></tr><tr><td>Precise routing with P2P</td><td style="text-align:right"><strong>3.210</strong></td><td style="text-align:right"><strong>+11.1%</strong></td><td style="text-align:right"><strong>2.018 s (-25.0%)</strong></td></tr></tbody></table>
<p>Without P2P, the two routing modes stayed close in this snapshot. That does
not make them equivalent: approximate routing infers residency from placement
history, while precise routing uses cache state reported by the engines. P2P
improved both. The highest successful throughput came when it could pull from
the reported cache holder.</p>

















<table><thead><tr><th>Across three repeat comparisons</th><th style="text-align:right">Average improvement</th></tr></thead><tbody><tr><td>Successful requests per second</td><td style="text-align:right"><strong>+9.6%</strong></td></tr><tr><td>Input-token throughput</td><td style="text-align:right"><strong>+11.8%</strong></td></tr></tbody></table>
<p>Successful throughput improved in every repeat. Tail latency varied, so the
repeatable result is higher capacity.</p>

























<table><thead><tr><th>Mechanism check</th><th>Result</th></tr></thead><tbody><tr><td>Approximate routing with P2P</td><td>77.7 GiB submitted; no failed transfer rounds</td></tr><tr><td>Precise routing with P2P</td><td>39.4 GiB submitted; no failed transfer rounds</td></tr><tr><td>Both configurations without P2P</td><td>Zero peer transfers</td></tr><tr><td>Prefill queue p90 across repeats</td><td>12.8-13.7 requests at baseline; 8.0-9.0 with precise routing and P2P</td></tr></tbody></table>
<p>The byte counts come from P2P submission records.</p>
<p>A separate GLM test isolates P2P under identical placement:</p>























<table><thead><tr><th>Metric</th><th style="text-align:right">Without P2P</th><th style="text-align:right">With P2P</th><th style="text-align:right">Change</th></tr></thead><tbody><tr><td>Mean TTFT</td><td style="text-align:right">7.85 s</td><td style="text-align:right"><strong>2.56 s</strong></td><td style="text-align:right"><strong>-67%</strong></td></tr><tr><td>Throughput</td><td style="text-align:right">3.80 req/s</td><td style="text-align:right"><strong>10.10 req/s</strong></td><td style="text-align:right"><strong>2.7x</strong></td></tr></tbody></table>
<p>The result reproduced in a separately built fleet.</p>
<p>A smaller <code>Llama-3.1-8B</code> shared-prefix pool provides the clean P2P-only A/B.
At 8 requests per second, P2P reduced median request latency by 43%. Near
saturation, it raised the fleet ceiling by 22% and peak token throughput by
32%. The gain grew with load because the no-pull control consumed capacity
recomputing cross-pod misses:</p>






























<table><thead><tr><th style="text-align:right">Offered rate</th><th style="text-align:right">Without P2P</th><th style="text-align:right">With P2P</th></tr></thead><tbody><tr><td style="text-align:right">4 req/s</td><td style="text-align:right">1.12 s p50</td><td style="text-align:right">0.93 s p50</td></tr><tr><td style="text-align:right">8 req/s</td><td style="text-align:right">2.49 s p50</td><td style="text-align:right"><strong>1.41 s p50 (-43%)</strong></td></tr><tr><td style="text-align:right">12 req/s</td><td style="text-align:right">12.2 s p50, 9.9 req/s achieved</td><td style="text-align:right">2.1 s p50, 11.6 req/s achieved</td></tr><tr><td style="text-align:right">16 req/s</td><td style="text-align:right">21.3 s p50, 10.3 req/s achieved</td><td style="text-align:right"><strong>7.8 s p50, 12.6 req/s achieved (+22%)</strong></td></tr></tbody></table>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Setup: 4 aggregated H200 pods; identical load-balanced placement on both sides</summary><div><div class="collapsibleContent_i85q">
<!-- -->
<p>A pool of 64 shared 16K prefixes, larger than any single pod's cache. Both
runs use the same load-balanced placement; the treatment additionally enables
P2P KV cache sharing.</p>
</div></div></details>
<h4 class="anchor anchorTargetStickyNavbar_Vzrq" id="document-qa-when-locality-becomes-a-queue">Document Q&amp;A: When Locality Becomes a Queue<a href="https://llm-d.ai/blog/p2p-kv-cache-sharing-llm-d#document-qa-when-locality-becomes-a-queue" class="hash-link" aria-label="Direct link to Document Q&amp;A: When Locality Becomes a Queue" title="Direct link to Document Q&amp;A: When Locality Becomes a Queue" translate="no">​</a></h4>
<p>This experiment compares precise affinity with load-aware placement plus P2P
when active sessions queue behind their document owners.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Setup: gpt-oss-120b on 16 aggregated H200 pods; precise affinity versus load-aware placement with P2P</summary><div><div class="collapsibleContent_i85q">
<!-- -->
<p>The baseline uses precise prefix affinity. The candidate combines load-aware
placement with P2P using a 2,048-token pull threshold. Both use the same
precise cache-location data.</p>
</div></div></details>
<p>The workload used 192 distinct 48K-token documents, six turns per document,
and 128 active conversations.</p>






























<table><thead><tr><th>Metric</th><th style="text-align:right">Precise affinity</th><th style="text-align:right">Load-aware placement with P2P</th></tr></thead><tbody><tr><td>Median TTFT</td><td style="text-align:right"><strong>0.3 s</strong></td><td style="text-align:right">0.6 s</td></tr><tr><td>p99 TTFT</td><td style="text-align:right">25.2 s</td><td style="text-align:right"><strong>16.6 s</strong></td></tr><tr><td>Throughput</td><td style="text-align:right">baseline</td><td style="text-align:right"><strong>+35%</strong></td></tr><tr><td>Client timeouts on a cold fleet</td><td style="text-align:right">48</td><td style="text-align:right"><strong>0</strong></td></tr></tbody></table>
<p>Affinity wins the cheapest local hit. Load-aware placement with P2P improves
tail latency and throughput when document owners become queueing hotspots.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="3-preserve-session-history-across-pd-roles">3. Preserve Session History Across P/D Roles<a href="https://llm-d.ai/blog/p2p-kv-cache-sharing-llm-d#3-preserve-session-history-across-pd-roles" class="hash-link" aria-label="Direct link to 3. Preserve Session History Across P/D Roles" title="Direct link to 3. Preserve Session History Across P/D Roles" translate="no">​</a></h3>
<p>Multi-turn P/D sessions create a locality break that placement cannot
eliminate. The decoder generates the newest KV history, but a prefill worker
handles the next turn. Without a peer transfer, the prefiller rebuilds history
that already exists on another serving role.</p>
<p>The small-model run established the mechanism before the larger workload
showed a user-visible payoff:</p>




















<table><thead><tr><th>Model</th><th style="text-align:right">Session history moved</th><th>Result</th></tr></thead><tbody><tr><td><code>Llama-3.1-8B</code></td><td style="text-align:right">477K-1.65M tokens</td><td>Reclaimed prefill capacity; TTFT stayed near parity</td></tr><tr><td><code>Qwen3-30B-A3B-Thinking</code></td><td style="text-align:right">1.23M tokens</td><td>Lower TTFT and higher throughput</td></tr></tbody></table>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Setup: 2 prefill and 4 decode pods; identical placement, the P2P side adds the offload tier and the pull</summary><div><div class="collapsibleContent_i85q">
<!-- -->
<p>One H200 per pod. Both runs use NIXL for the P/D handoff and identical
placement. The P2P run adds the CPU offload tier and enables peer retrieval
using a 1,024-token pull threshold.</p>
<p>The <a href="https://github.com/llm-d/llm-d/tree/main/guides/agentic-serving" target="_blank" rel="noopener noreferrer" class="">agentic-serving workload</a>
uses 24 conversations, 10K-100K-token system prompts, 4-40 turns, and
1-20-second tool-call gaps. Prompts average 61.9K tokens.</p>
</div></div></details>























<table><thead><tr><th>Metric</th><th style="text-align:right">Without P2P</th><th style="text-align:right">With P2P</th><th style="text-align:right">Change</th></tr></thead><tbody><tr><td>Median TTFT</td><td style="text-align:right">6.83 s</td><td style="text-align:right"><strong>1.09 s</strong></td><td style="text-align:right"><strong>6.3x lower</strong></td></tr><tr><td>Throughput</td><td style="text-align:right">0.82 req/s</td><td style="text-align:right"><strong>1.24 req/s</strong></td><td style="text-align:right"><strong>+50%</strong></td></tr></tbody></table>
<div margin:="">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/p2p-kv-cache/agentic-pd.png" alt="Grouped bars showing lower median and p95 TTFT and higher throughput for agentic P/D with P2P" height:="" class="img_ev3q">
  <p margintop:=""><em>Moving session history across serving roles reduces repeated prefill work.</em></p>
</div>
<p>P2P did not improve the first prefill of a cold context because no reusable KV
existed yet. It removes repeated work, not the first computation.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="where-p2p-should-stay-inactive">Where P2P Should Stay Inactive<a href="https://llm-d.ai/blog/p2p-kv-cache-sharing-llm-d#where-p2p-should-stay-inactive" class="hash-link" aria-label="Direct link to Where P2P Should Stay Inactive" title="Direct link to Where P2P Should Stay Inactive" translate="no">​</a></h2>
<p>The negative controls define when P2P should remain quiet:</p>

























<table><thead><tr><th>Situation</th><th>Expected behavior</th></tr></thead><tbody><tr><td>Placement already finds a local hit</td><td>No peer transfer</td></tr><tr><td>KV is restored from the same endpoint's CPU tier</td><td>Local restore, not P2P</td></tr><tr><td>The routing index has restarted</td><td>No peer source until new cache state arrives</td></tr><tr><td>The prefix has not been seen before</td><td>Compute it once; reuse it later</td></tr></tbody></table>
<p>These controls are why enabling P2P is not enough evidence. A valid benchmark
must show that placement created a useful remote source and, when causal
attribution matters, that matching blocks actually moved.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-operational-rule">The Operational Rule<a href="https://llm-d.ai/blog/p2p-kv-cache-sharing-llm-d#the-operational-rule" class="hash-link" aria-label="Direct link to The Operational Rule" title="Direct link to The Operational Rule" translate="no">​</a></h2>
<p>Calibrate before enabling pulls broadly. Measure recompute versus transfer on
a warmed peer pair, choose a threshold above the crossover, and verify
transferred bytes rather than inferring success from timing alone. The first
connection between two peers may pay a one-time session-establishment cost
that steady-state pulls do not, so a single cold probe prices the transient
rather than the data path.</p>
<div class="theme-admonition theme-admonition-warning admonition_xJq3 alert alert--warning"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"></path></svg></span>Silent prerequisite</div><div class="admonitionContent_BuS1"><p>Every peer must use identical block-size and hash-seed settings. A mismatch
produces different block hashes and silently degrades P2P to zero matching
transfers.</p></div></div>
<p>The <a href="https://github.com/llm-d/llm-d/tree/main/guides/p2p-kv-cache-sharing" target="_blank" rel="noopener noreferrer" class="">P2P KV Cache Sharing guide</a>
carries the deployment manifests, CPU-tier sizing, compatibility rules,
verification gates, calibration workload, and complete benchmark reports.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="whats-next">What's Next<a href="https://llm-d.ai/blog/p2p-kv-cache-sharing-llm-d#whats-next" class="hash-link" aria-label="Direct link to What's Next" title="Direct link to What's Next" translate="no">​</a></h2>
<p>The results above establish the basic economics and two production-shaped
payoff cases. The next step is to measure P2P under fleet changes and traffic
patterns that create locality breaks dynamically:</p>
<ul>
<li class=""><strong>Hot-prefix skew.</strong> Drive a non-uniform prefix distribution that
concentrates work on a few cache owners, then measure per-worker prefill
balance and p99 TTFT with load-aware placement and P2P.</li>
<li class=""><strong>Scale-out warmup.</strong> Add a cold replica under steady shared-prefix traffic
and compare how quickly it reaches useful TTFT and cache-hit levels with and
without peer pulls.</li>
<li class=""><strong>Restart and preemption recovery.</strong> Restart a prefill fleet under live
multi-turn sessions, where every conversation must recover its context at
once. Without pulls this is a synchronized recompute storm; with them, the
decode tier serves the history back. Measure whether the per-pull saving
compounds into the fleet mean under that synchronized pressure.</li>
<li class=""><strong>Prefetch ahead of arrival.</strong> Trigger the pull from local or remote CPU
when a session's next request is predictable, so the transfer overlaps idle
time instead of the request's critical path.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="local-hits-first-portable-reuse-when-locality-breaks">Local Hits First, Portable Reuse When Locality Breaks<a href="https://llm-d.ai/blog/p2p-kv-cache-sharing-llm-d#local-hits-first-portable-reuse-when-locality-breaks" class="hash-link" aria-label="Direct link to Local Hits First, Portable Reuse When Locality Breaks" title="Direct link to Local Hits First, Portable Reuse When Locality Breaks" translate="no">​</a></h2>
<p>The transfer does not create compute or network capacity. It decouples
placement from cache locality, allowing the llm-d router to optimize for load
or topology without automatically paying the full recompute cost. The crossover
measurement prices each transfer; the fleet experiments show how that price
compounds into the tail latency and throughput users feel.</p>
<p><strong>Keep the request with the cache when that is the best placement. When load
or topology requires a different worker, copy the KV instead of recomputing
it.</strong></p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="source-material">Source Material<a href="https://llm-d.ai/blog/p2p-kv-cache-sharing-llm-d#source-material" class="hash-link" aria-label="Direct link to Source Material" title="Direct link to Source Material" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://github.com/llm-d/llm-d/tree/main/guides/p2p-kv-cache-sharing" target="_blank" rel="noopener noreferrer" class="">P2P KV Cache Sharing guide and benchmark reports</a></li>
<li class=""><a href="https://llm-d.ai/blog/kvcache-wins-you-can-see" target="_blank" rel="noopener noreferrer" class="">KV-Cache Wins You Can See</a></li>
<li class=""><a href="https://llm-d.ai/blog/native-kv-cache-offloading-to-any-file-system-with-llm-d" target="_blank" rel="noopener noreferrer" class="">Native KV Cache Offloading to Any Filesystem with llm-d</a></li>
</ul>]]></content:encoded>
            <author>liran.schour@gmail.com (Liran Schour)</author>
            <category>blog posts</category>
            <category>KV Cache</category>
        </item>
        <item>
            <title><![CDATA[Scaling Vision-Heavy Kimi-VL with Heterogeneous E/PD on llm-d and SGLang]]></title>
            <link>https://llm-d.ai/blog/scaling-vision-heavy-kimi-vl-with-heterogeneous-epd</link>
            <guid>https://llm-d.ai/blog/scaling-vision-heavy-kimi-vl-with-heterogeneous-epd</guid>
            <pubDate>Wed, 05 Aug 2026 09:00:00 GMT</pubDate>
            <description><![CDATA[Benchmarking disaggregated VLM serving of Kimi-VL-A3B-Instruct with 4 Intel Arc Pro B60 vision encoder and 1 NVIDIA H200 language model worker, delivering 2.4x-2.8x higher throughput and 69%-80% lower TTFT than collocated serving.]]></description>
            <content:encoded><![CDATA[<p>Vision-language model (VLM) inference involves several stages: vision encoding, language model prefill, and language model decode. Each stage has different compute and memory characteristics, making heterogeneous disaggregation a natural fit. This gives us the flexibility to place different stages to different accelerator resources based on their compute and memory characteristics.</p>
<p>In this post, we evaluate a vision-heavy Kimi-VL serving workload on llm-d and SGLang. We place vision encoding stage in 4 Intel Arc Pro B60 (Intel B60) GPUs while keeping prefill and decode stage on 1 NVIDIA H200 GPU. Compared with the collocated baseline, the measured heterogeneous E/PD configuration achieved 2.4x-2.8x higher throughput and reduced mean Time To First Token (TTFT) by roughly 69%-80% under load.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="context-and-prior-work">Context and Prior Work<a href="https://llm-d.ai/blog/scaling-vision-heavy-kimi-vl-with-heterogeneous-epd#context-and-prior-work" class="hash-link" aria-label="Direct link to Context and Prior Work" title="Direct link to Context and Prior Work" translate="no">​</a></h2>
<p><a href="https://github.com/llm-d/llm-d" target="_blank" rel="noopener noreferrer" class="">llm-d</a> is an inference orchestration stack for Kubernetes that supports inference engines including SGLang and vLLM. Encoder/prefill/decode (E/P/D) disaggregation separates VLM inference into independently deployable stages. In the E/PD configuration, vision encoders run on dedicated workers while prefill and decode remain together. llm-d has supported E/PD and E/P/D disaggregation since version 0.8.1.</p>
<p><a href="https://www.lmsys.org/blog/2026-01-12-epd/" target="_blank" rel="noopener noreferrer" class="">Previous SGLang E/PD report</a> demonstrated throughput and TTFT improvements. This experiment extends that work to a heterogeneous hardware configuration, with a focus on whether dedicated vision encoder workers can reduce contention between vision encoding and language model execution on the prefill/decode worker.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="architecture-overview">Architecture Overview<a href="https://llm-d.ai/blog/scaling-vision-heavy-kimi-vl-with-heterogeneous-epd#architecture-overview" class="hash-link" aria-label="Direct link to Architecture Overview" title="Direct link to Architecture Overview" translate="no">​</a></h2>
<p>The following sequence shows the request path for heterogeneous E/PD serving on llm-d and SGLang.</p>
<p><img decoding="async" loading="lazy" alt="Sequence diagram showing a multimodal request routed by llm-d to an SGLang prefill/decode worker, which dispatches media to Intel XPU encode workers" src="https://llm-d.ai/assets/images/figure1-request-flow-8ca13f0cf120f3d76d0e9b63dd41e540.png" width="1522" height="1043" class="img_ev3q"></p>
<p><em>Figure 1: Request flow for heterogeneous SGLang E/PD serving. llm-d selects the prefill/decode endpoint; SGLang owns encoder dispatch and embedding transfer.</em></p>
<p>The components have the following responsibilities:</p>
<ul>
<li class=""><strong>Client:</strong> Sends an OpenAI-compatible multimodal request containing text and images. The client does not need to know whether encoding is collocated or disaggregated.</li>
<li class=""><strong>Gateway / Envoy:</strong> Receives the request, asks the llm-d Endpoint Picker (EPP) to select a prefill/decode worker, and forwards the original request to that endpoint.</li>
<li class=""><strong>llm-d Router EPP:</strong> Selects the prefill/decode worker using routing signals such as queue depth and KV-cache utilization. It does not select or manage the SGLang encode workers.</li>
<li class=""><strong>SGLang prefill/decode worker:</strong> Runs in language-only mode on the NVIDIA GPU. It identifies media in the request, dispatches the media to configured encoder URLs, receives embeddings, and runs prefill and decode.</li>
<li class=""><strong>SGLang encode workers:</strong> Run in encoder-only mode on Intel XPUs. They process media shards and return visual embeddings through SGLang's <code>zmq_to_scheduler</code> transfer path.</li>
</ul>
<p>For this benchmark, SGLang distributed each request’s four images across four encoder workers, resulting in one image per worker.</p>
<p>This differs from llm-d's E-disaggregation integration with vLLM, where the llm-d router selects both the prefill/decode endpoint and the encode endpoint. In the current SGLang integration, llm-d selects only the prefill/decode endpoint, and SGLang manages the vision encoder worker pool.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="test-configuration">Test Configuration<a href="https://llm-d.ai/blog/scaling-vision-heavy-kimi-vl-with-heterogeneous-epd#test-configuration" class="hash-link" aria-label="Direct link to Test Configuration" title="Direct link to Test Configuration" translate="no">​</a></h2>
<table><thead><tr><th style="text-align:left">Category</th><th style="text-align:left">Configuration</th></tr></thead><tbody><tr><td style="text-align:left">Hardware</td><td style="text-align:left">1x NVIDIA H200 GPU (141 GB), 4x Intel B60 GPUs (24 GB each)</td></tr><tr><td style="text-align:left">Model</td><td style="text-align:left"><code>moonshotai/Kimi-VL-A3B-Instruct</code>, 16B total parameters, 2.8B active parameters</td></tr><tr><td style="text-align:left">Dataset</td><td style="text-align:left">Random multimodal dataset</td></tr><tr><td style="text-align:left">Input</td><td style="text-align:left">128 random text tokens and four 1080p images per request</td></tr><tr><td style="text-align:left">Output</td><td style="text-align:left">128 random output tokens</td></tr><tr><td style="text-align:left">Offered request rate</td><td style="text-align:left">0.2-2.0 requests per second</td></tr><tr><td style="text-align:left">Maximum concurrency</td><td style="text-align:left">8</td></tr></tbody></table>
<p>We compared two deployment topologies:</p>
<ul>
<li class=""><strong>Collocated baseline:</strong> One llm-d model server runs SGLang on 1 H200, with encoding, prefill, and decode all on the same GPU.</li>
<li class=""><strong>4E1PD:</strong> One llm-d model server runs the SGLang prefill/decode worker on one H200. Four additional llm-d model servers each run 1 SGLang vision encoder worker on 1 Intel B60.</li>
</ul>
<p><img decoding="async" loading="lazy" alt="Deployment diagram showing llm-d routing to 1 NVIDIA H200 prefill/decode worker connected to 4 Intel B60 encode workers" src="https://llm-d.ai/assets/images/figure2-deployment-8550b90b89810ad539e7733b65a44e83.png" width="1262" height="692" class="img_ev3q"></p>
<p><em>Figure 2: The 4E1PD test environment uses 1 H200 for prefill/decode and 4 Intel B60 GPUs for encoding.</em></p>
<div class="theme-admonition theme-admonition-note admonition_xJq3 alert alert--secondary"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>Benchmark scope</div><div class="admonitionContent_BuS1"><p>These results cover one model, one vision-heavy synthetic workload, and the hardware topology above. They demonstrate the effect of moving vision encoder off the prefill/decode GPU; they are not a general comparison of accelerator platforms. The 2 configurations do not use the same total accelerator resources. The experiment evaluates the effect of augmenting the collocated deployment with 4 dedicated encoder workers.</p></div></div>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="how-to-reproduce">How to Reproduce<a href="https://llm-d.ai/blog/scaling-vision-heavy-kimi-vl-with-heterogeneous-epd#how-to-reproduce" class="hash-link" aria-label="Direct link to How to Reproduce" title="Direct link to How to Reproduce" translate="no">​</a></h2>
<ol>
<li class="">Use llm-d <a href="https://github.com/llm-d/llm-d/releases/tag/v0.8.1" target="_blank" rel="noopener noreferrer" class="">v0.8.1</a> or later. Follow the <a href="https://github.com/llm-d/llm-d/tree/v0.8.1/guides/multimodal-serving/aggregation" target="_blank" rel="noopener noreferrer" class="">v0.8.1 aggregated multimodal serving guide</a> as the deployment pattern for the collocated baseline, modifying the manifests to run SGLang with <code>Kimi-VL-A3B-Instruct</code>.</li>
<li class="">Follow the <a href="https://github.com/llm-d/llm-d/blob/main/guides/multimodal-serving/e-disaggregation/profiles/sglang-xpu-encode-gpu-pd.md" target="_blank" rel="noopener noreferrer" class="">heterogeneous SGLang E/PD guide</a> to deploy four encode workers and one prefill/decode worker.</li>
<li class="">Run the following SGLang benchmark against both deployments. Set <code>IP</code> to the proxy address from the guide and vary <code>rate</code> from 0.2 to 2.0.</li>
</ol>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">python3 </span><span class="token parameter variable" style="color:hsl(221, 87%, 60%)">-m</span><span class="token plain"> sglang.bench_serving </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --served-model-name moonshotai/Kimi-VL-A3B-Instruct </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token parameter variable" style="color:hsl(221, 87%, 60%)">--backend</span><span class="token plain"> sglang-oai-chat </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token parameter variable" style="color:hsl(221, 87%, 60%)">--host</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"</span><span class="token string variable" style="color:hsl(221, 87%, 60%)">${IP}</span><span class="token string" style="color:hsl(119, 34%, 47%)">"</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --ready-check-timeout-sec </span><span class="token number" style="color:hsl(35, 99%, 36%)">0</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --dataset-name image </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --num-prompts </span><span class="token number" style="color:hsl(35, 99%, 36%)">128</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --random-input-len </span><span class="token number" style="color:hsl(35, 99%, 36%)">128</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --random-output-len </span><span class="token number" style="color:hsl(35, 99%, 36%)">128</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --image-count </span><span class="token number" style="color:hsl(35, 99%, 36%)">4</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --image-resolution 1080p </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --request-rate </span><span class="token string" style="color:hsl(119, 34%, 47%)">"</span><span class="token string variable" style="color:hsl(221, 87%, 60%)">${rate}</span><span class="token string" style="color:hsl(119, 34%, 47%)">"</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --apply-chat-template </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token parameter variable" style="color:hsl(221, 87%, 60%)">--seed</span><span class="token plain"> </span><span class="token number" style="color:hsl(35, 99%, 36%)">0</span><span class="token plain"> </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --disable-tqdm </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">\</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  --max-concurrency </span><span class="token number" style="color:hsl(35, 99%, 36%)">8</span><br></div></code></pre></div></div>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="results">Results<a href="https://llm-d.ai/blog/scaling-vision-heavy-kimi-vl-with-heterogeneous-epd#results" class="hash-link" aria-label="Direct link to Results" title="Direct link to Results" translate="no">​</a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="throughput">Throughput<a href="https://llm-d.ai/blog/scaling-vision-heavy-kimi-vl-with-heterogeneous-epd#throughput" class="hash-link" aria-label="Direct link to Throughput" title="Direct link to Throughput" translate="no">​</a></h3>
<p><img decoding="async" loading="lazy" alt="Throughput comparison between collocated serving and the heterogeneous 4E1PD deployment across request rates" src="https://llm-d.ai/assets/images/figure3-throughput-810cd3b145ade609b4741689d4cd06b6.png" width="1602" height="918" class="img_ev3q"></p>
<p><em>Figure 3: Actual request throughput as the offered request rate increases.</em></p>
<p>The collocated deployment saturates at approximately 0.31-0.33 requests per second. The 4E1PD deployment sustains approximately 0.79-0.89 requests per second at higher offered rates, providing 2.4-2.8x higher throughput.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="time-to-first-tokenttft">Time to First Token(TTFT)<a href="https://llm-d.ai/blog/scaling-vision-heavy-kimi-vl-with-heterogeneous-epd#time-to-first-tokenttft" class="hash-link" aria-label="Direct link to Time to First Token(TTFT)" title="Direct link to Time to First Token(TTFT)" translate="no">​</a></h3>
<p><img decoding="async" loading="lazy" alt="Mean time to first token comparison between collocated serving and the heterogeneous 4E1PD deployment" src="https://llm-d.ai/assets/images/figure4-mean-ttft-dc191b105396ecbed330ddc13940c8ce.png" width="1602" height="918" class="img_ev3q"></p>
<p><em>Figure 4: Mean TTFT across offered request rates.</em></p>
<p>Under load, mean TTFT for the collocated deployment remains around 10-12 seconds. The 4E1PD deployment remains mostly around 3-4 seconds, a reduction of roughly 69-80%.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="time-per-output-tokentpot">Time per Output Token(TPOT)<a href="https://llm-d.ai/blog/scaling-vision-heavy-kimi-vl-with-heterogeneous-epd#time-per-output-tokentpot" class="hash-link" aria-label="Direct link to Time per Output Token(TPOT)" title="Direct link to Time per Output Token(TPOT)" translate="no">​</a></h3>
<p><img decoding="async" loading="lazy" alt="Mean time per output token comparison between collocated serving and the heterogeneous 4E1PD deployment" src="https://llm-d.ai/assets/images/figure5-mean-tpot-0db8e3590015124c0146751a8da4109f.png" width="1602" height="918" class="img_ev3q"></p>
<p><em>Figure 5: Mean time per output token (TPOT) across offered request rates.</em></p>
<p>Mean TPOT also improves. Under load, the collocated deployment ranges from approximately 160-216 ms per token, while 4E1PD remains mostly around 75-100 ms per token.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="performance-and-cost-efficiency-analysis">Performance and Cost-Efficiency Analysis<a href="https://llm-d.ai/blog/scaling-vision-heavy-kimi-vl-with-heterogeneous-epd#performance-and-cost-efficiency-analysis" class="hash-link" aria-label="Direct link to Performance and Cost-Efficiency Analysis" title="Direct link to Performance and Cost-Efficiency Analysis" translate="no">​</a></h2>
<p>All 3 measured metrics improved in the heterogeneous configuration. The results are consistent with dedicated vision encoder workers reducing contention between vision encoding and language-model execution.</p>
<p>We can see that disaggregating dedicated vision encoder workers from language model worker greatly increases Requests Per Second(RPS) from around 0.31-0.33 to 0.8-0.9 while reducing mean TTFT from around 10-12 seconds to 3-4 seconds under load.</p>
<p>As an illustrative sensitivity check, we applied publicly reported July 2026 acquisition-price estimates to the tested accelerator topology. Under those assumptions, the 4 vision encoder devices add approximately 6–8% to the accelerator-only acquisition cost while the measured request capacity increases by 2.4x–2.8×. This calculation is not a comparison of accelerator platforms and should not be treated as a total-cost-of-ownership estimate. It excludes host systems, power, cooling, networking, software, support, utilization, and operational costs.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="conclusion-and-future-work">Conclusion and Future Work<a href="https://llm-d.ai/blog/scaling-vision-heavy-kimi-vl-with-heterogeneous-epd#conclusion-and-future-work" class="hash-link" aria-label="Direct link to Conclusion and Future Work" title="Direct link to Conclusion and Future Work" translate="no">​</a></h2>
<p>This experiment shows that heterogeneous E/PD can improve serving performance for vision-heavy VLM workloads. It also illustrates a broader opportunity: heterogeneous accelerator resources can be assigned to different inference stages when their execution characteristics are complementary. It gives us more flexibility to optimize the VLM workload in cluster scale from a holistic view.</p>
<p>We are benchmarking more models and workloads. We are also working toward automated evaluation of disaggregation strategies, with the goal of selecting configurations that can maximize performance as well as cost efficiency. We look forward to sharing more findings in future posts.</p>]]></content:encoded>
            <author>chcost@us.ibm.com (Carlos Costa)</author>
            <category>blog posts</category>
            <category>Inference</category>
            <category>Heterogeneous</category>
            <category>Multimodal</category>
            <category>Disaggregation</category>
            <category>VLM</category>
            <category>SGLang</category>
        </item>
        <item>
            <title><![CDATA[Serving GLM-5.2 for Agentic Workloads on llm-d]]></title>
            <link>https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d</link>
            <guid>https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d</guid>
            <pubDate>Wed, 22 Jul 2026 09:00:00 GMT</pubDate>
            <description><![CDATA[Cost-efficient, responsive GLM-5.2 agentic inference on H200 with llm-d, using KV-cache-aware routing, tiered prefix-cache offloading, and multi-token prediction.]]></description>
            <content:encoded><![CDATA[<p>llm-d's <a href="https://github.com/llm-d/llm-d/tree/main/guides" target="_blank" rel="noopener noreferrer" class="">well-lit paths</a> are tested, benchmarked recipes for serving large language models in production. The <a href="https://github.com/llm-d/llm-d/blob/main/guides/agentic-serving/glm-5-2-h200.md" target="_blank" rel="noopener noreferrer" class="">agentic-serving path</a> starts with the workload and combines the capabilities it needs into a deployment for each accelerator. This post applies that pattern to GLM-5.2-FP8 on H200, using the 219 production Claude Code sessions in SemiAnalysis's Weka trace corpus.</p>
<p>GLM-5.2 is a 744B-parameter (39B active) mixture-of-experts model with 78 layers. Its Multi-head Latent Attention (MLA) stores one compressed latent instead of separate KV heads, so tensor parallelism cannot shard it: <code>TP=8</code> keeps eight copies of the KV cache. Tensor-parallel all-reduce is also expensive across nodes: every layer performs the column-parallel, row-parallel, and all-reduce sequence twice. llm-d's Wide-EP path avoids both costs with data-parallel attention and expert-parallel MoE, making the KV budget viable for long-context agentic serving.</p>
<p>At a measured output rate of roughly 37-41 tokens per second per user, a 64-GPU llm-d deployment works out to $0.05 per million input tokens and $3.55 per million output tokens at an H200 rental rate of $2.71 per GPU-hour. Z.ai's public GLM-5.2 row lists $1.40 input and $4.40 output; Claude Opus 4.8 lists $5 input and $25 output. These figures assume sustained load and assign prefill rental to input and decode rental to output.</p>
<details class="details_lb9f alert alert--info details_b_Ee alert alert--success" data-collapsed="true"><summary><strong>TL;DR: workload, measured gains, cost, and guide</strong></summary><div><div class="collapsibleContent_i85q"><ul>
<li class="">
<p><strong>The workload is mostly reading.</strong> Across 219 production Claude Code sessions, the median main-agent request carries 195K input tokens and returns 317 output tokens. Among main-agent turns, 96% reuse at least 90% of their input, and more than half of all requests belong to sub-agent groups.</p>
</li>
<li class="">
<p><strong>Serving this workload takes six llm-d capabilities.</strong> MLA compresses KV, wide expert parallelism makes room for it, prefix-aware routing finds it again, CPU offloading keeps more of it, separate prefill and decode pools let each side optimize its own work, and optional MTP reduces decode steps. All six are open in the llm-d stack.</p>
</li>
<li class="">
<p><strong>More concurrent requests increase total output without materially slowing an active stream.</strong> On the 64-GPU reference with three prefill instances and one decoder, output rises 71%, from 3,679 to 6,281 tok/s, between concurrency 64 and 128, while median time between output tokens moves from 15.5 to 19.1 ms. Input makes up 98.6% of all tokens served, so prefill capacity is the limit.</p>
</li>
<li class="">
<p><strong>Routing avoids redundant prefill.</strong> Prefix-aware routing captures 96-97% of the reuse the workload makes available. In a separate paused-conversation run, turns with a cached prefix reach first token 2.8x faster than first turns without one.</p>
</li>
<li class="">
<p><strong>CPU offloading keeps active prefixes reusable after HBM fills.</strong> In matched 24-GPU runs at concurrency 32, offloading raises output 13%, cuts median time to first token 32%, and cuts median turn completion 27%, while median time between output tokens is unchanged. At concurrency 128, baseline output remains near 951 tok/s while offloading reaches 2,776 tok/s.</p>
</li>
<li class="">
<p><strong>Multi-Token Prediction lets the same 32 GPUs serve at least eight times as many concurrent requests without dropping below 30 output tokens per second per user.</strong> With CPU offloading enabled in both runs, MTP holds that rate through 128 concurrent requests and produces 5,647 tok/s; without MTP, it holds only through 16 requests and 561 tok/s.</p>
</li>
<li class="">
<p><strong>At sustained load, self-hosted GPU rental accounts for a fraction of the per-token cost of a managed API.</strong> The two 64-GPU layouts work out to $0.05-$0.08 per million input tokens and $1.92-$3.55 per million output tokens, versus $1.40 and $4.40. These figures cover GPU rental only, not the full cost of operating an API service.</p>
</li>
<li class="">
<p><strong>Run it.</strong> The <a href="https://github.com/llm-d/llm-d/blob/main/guides/agentic-serving/glm-5-2-h200.md" target="_blank" rel="noopener noreferrer" class="">GLM-5.2 H200 guide</a> provides the serving pattern and composable MTP, CPU-offloading, and context-length components.</p>
</li>
</ul></div></div></details>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-shape-of-agentic-traffic">The shape of agentic traffic<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#the-shape-of-agentic-traffic" class="hash-link" aria-label="Direct link to The shape of agentic traffic" title="Direct link to The shape of agentic traffic" translate="no">​</a></h2>
<p>A coding agent's turn is mostly reading: a repository-scale context in, a tool call or a short diff out, then the whole context again next turn, slightly longer. The <a href="https://huggingface.co/datasets/semianalysisai/cc-traces-weka-with-subagents-051926" target="_blank" rel="noopener noreferrer" class="">Weka trace corpus</a> published by SemiAnalysis contains 219 production Claude Code sessions and 78,099 model requests. Each session captures interactive repository work: a main agent grows and reuses a working context across tool calls, pauses while tools run, and delegates work to Task-tool sub-agents that execute concurrently. The corpus preserves request timing, input and output lengths, per-request KV-block hashes, and the original sub-agent fan-out.</p>
<p>Read the percentiles across each row, not down the column: the p90 input length and p90 pause do not belong to the same request or session. The wall-clock gap is the time between main-agent calls, not generation latency. Input-length growth is the increase from the previous main-agent turn, not a cache miss.</p>
<table><thead><tr><th style="text-align:left"><strong>Main-agent metric</strong></th><th style="text-align:left"><strong>p50</strong></th><th style="text-align:left"><strong>p90</strong></th><th style="text-align:left"><strong>p99</strong></th></tr></thead><tbody><tr><td style="text-align:left">Input tokens per request</td><td style="text-align:left">195K</td><td style="text-align:left">521K</td><td style="text-align:left">849K</td></tr><tr><td style="text-align:left">Output tokens per response</td><td style="text-align:left">317</td><td style="text-align:left">1,705</td><td style="text-align:left">7,551</td></tr><tr><td style="text-align:left">Input-length growth from prior turn</td><td style="text-align:left">632</td><td style="text-align:left">3,735</td><td style="text-align:left">148K</td></tr><tr><td style="text-align:left">Wall-clock gap between turns</td><td style="text-align:left">2 s</td><td style="text-align:left">24 s</td><td style="text-align:left">11.4 min</td></tr><tr><td style="text-align:left">Turns per session</td><td style="text-align:left">107</td><td style="text-align:left">354</td><td style="text-align:left">992</td></tr></tbody></table>
<div class="theme-admonition theme-admonition-note admonition_xJq3 alert alert--secondary"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>note</div><div class="admonitionContent_BuS1"><p>Input and output counts use different tokenizers. The corpus uses <code>o200k</code> for input because those tokens determine the per-request KV block hashes; output counts come directly from Anthropic's API. The 195K-to-317 ratio therefore mixes units.</p></div></div>
<figure class="glm-figure glm-figure--wide"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/token-distributions.png" alt="Input token, prefix overlap, and think-time distributions for Claude Code production traces"><figcaption><p>Left: input and output token distributions across 37.7K main-agent requests. Center: cumulative share of turns by prefix overlap with their best recent predecessor. Right: wall-clock gaps between consecutive main-agent requests.</p></figcaption></figure>
<p><strong>Most GPU work happens before the first output token.</strong> The median main-agent request carries 195K input tokens and returns 317 output tokens, so serving is dominated by processing context. Output then arrives in short bursts between tool calls. Responsiveness depends on processing each context quickly and streaming its response steadily.</p>
<figure class="glm-figure glm-figure--wide"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/model-call-vs-user-output.png" alt="One user-visible result can contain many model calls, tool executions, and sub-agent requests"><figcaption><p>The 317-token median covers one model call. A result the user sees may require many such calls, plus tool calls and sub-agent runs, before the final response appears.</p></figcaption></figure>
<p><strong>Nearly everything has been read before.</strong> A main-agent request is only 632 tokens longer than the preceding request at the median. When each request is matched to its best earlier turn, 96% reuse at least 90% of their input as a verbatim prefix; median reuse is 99.6%. A GPU cache hit avoids both recomputation and transfer. CPU or remote hits still have to move KV back to the GPU. Anthropic’s one-tenth price for cache-read input reflects the same reuse economics.</p>
<p><strong>Sessions pause, then burst.</strong> Main-agent calls are two seconds apart at the median and eleven minutes apart at p99, while the median session lasts an hour. Cached state must survive those gaps to remain useful. Sub-agents add a second pressure: 40,367 of 78,099 requests arrive in groups, with seven requests per group at the median and 51 at p90. The serving layer receives that concurrency without advance notice.</p>
<p>One production session combines all three properties:</p>
<figure class="glm-figure glm-figure--wide"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/production-session-lineage.png" alt="A production Claude Code session with growing main-agent context and distributed sub-agent work"><figcaption><p>A continuous 151.7-minute segment from one production session: 38 streaming main-agent requests and 5,527 sub-agent requests. The main-agent context grows to 754K tokens, while sub-agent work spans the full segment.</p></figcaption></figure>
<p>Prefix resets, where a turn shares less than half its input with any of its previous eight main-agent turns, occur on 2.8% of turns corpus-wide. Context compactions, where a context above 500K tokens returns below 30K, occur on 0.03% of turns. These are expected production pressures alongside sub-agent divergence and cache eviction under load. In the load benchmarks, measured reuse is governed by the admitted request distribution and cache churn, so routing on a single session-level prefix is insufficient.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="how-llm-d-serves-this-workload">How llm-d serves this workload<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#how-llm-d-serves-this-workload" class="hash-link" aria-label="Direct link to How llm-d serves this workload" title="Direct link to How llm-d serves this workload" translate="no">​</a></h2>
<p>The serving path starts with the context: fit it in memory, keep it reusable across turns, then handle context processing and token generation separately. MLA and wide expert parallelism make room in HBM. CPU offloading keeps prefixes available as HBM fills, and KV-cache-aware routing sends later turns back to them. MTP reduces decode work, while separate prefill and decode pools let long reads and token generation scale independently. The sections below follow that path, then show how to tune and scale those pools for this workload.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="topology-notation">Topology notation<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#topology-notation" class="hash-link" aria-label="Direct link to Topology notation" title="Direct link to Topology notation" translate="no">​</a></h3>
<figure class="glm-figure glm-figure--wide"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/topology-layouts.png" alt="Measured prefill and decode topologies with DEP notation"><figcaption><p>Measured prefill and decode topologies and their naming.</p></figcaption></figure>
<p>Topology names describe the number and width of the serving instances. <code>xPyD</code> means <code>x</code> prefill instances and <code>y</code> decode instances. <code>DEP16</code> means <code>TP=1</code>, <code>DP=16</code>, and expert parallelism across 16 GPUs. <code>DEP8</code> uses the same layout across eight GPUs. The benchmark sections state the GPU total when it matters.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="what-the-performance-results-cover">What the performance results cover<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#what-the-performance-results-cover" class="hash-link" aria-label="Direct link to What the performance results cover" title="Direct link to What the performance results cover" translate="no">​</a></h3>
<p>The workload analysis uses SemiAnalysis's 219-session <a href="https://huggingface.co/datasets/semianalysisai/cc-traces-weka-with-subagents-051926" target="_blank" rel="noopener noreferrer" class=""><code>cc-traces-weka-with-subagents-051926</code></a> corpus. The performance tests use the 393-trace <a href="https://huggingface.co/datasets/semianalysisai/cc-traces-weka-062126" target="_blank" rel="noopener noreferrer" class=""><code>cc-traces-weka-062126</code></a> release, which applies additional trace-quality filters. Limited-input-length runs admit traces that fit a 142,000-token context limit; full-input-length runs admit longer contexts. The workload statistics and performance results therefore cover different request populations. Absolute throughput is comparable only within the same test.</p>
<div class="theme-admonition theme-admonition-note admonition_xJq3 alert alert--secondary"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>Deployment and benchmark details</div><div class="admonitionContent_BuS1"><p>The <a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#appendix-deployment-and-benchmark-details" class="">appendix</a> lists the full model configuration, software stack, measured topologies, and settings for each benchmark.</p></div></div>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="fitting-repository-scale-sessions-in-memory">Fitting repository-scale sessions in memory<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#fitting-repository-scale-sessions-in-memory" class="hash-link" aria-label="Direct link to Fitting repository-scale sessions in memory" title="Direct link to Fitting repository-scale sessions in memory" translate="no">​</a></h2>
<p><strong>Multi-Head Latent Attention (MLA) keeps the KV cache small enough for repository-scale contexts.</strong></p>
<p>GLM-5.2 stores about 44 KB of KV state per token. In the measured 64-GPU <code>3P1D</code> layout, that gives about 47.2M prefill-cache tokens and 17.3M decode-cache tokens beside the model's weights. It stores 576 FP8 elements per layer per token: a 512-element latent plus 64 RoPE elements. Across 78 layers, that is 0.045 GB per 1K tokens. A counterfactual with 64 KV heads and 256-dimensional keys and values would use about 57x more KV memory; eight KV heads at those dimensions would use about 7x more.</p>
<figure class="glm-figure glm-figure--compact"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/kv-footprint.png" alt="GLM-5.2 MLA KV footprint compared with GQA and MHA counterfactuals"><figcaption><p>Per-token KV footprint from the architecture math (FP8, 78 layers): MLA’s 576 stored elements per layer, compared with counterfactual GQA using 8 KV heads and MHA using 64 KV heads, both with 256-dimensional keys and values.</p></figcaption></figure>
<p>At concurrency 128, the 64-GPU <code>3P1D</code> full-input-length run carries 14.1M logical tokens in flight, indicating the live request demand the cache must serve.</p>
<p>KV is allocated in 64-token blocks. Full-input-length runs set <code>gpu-memory-utilization</code> to 93.5% on prefill and 95% on decode. Depending on topology, each <code>DEP16</code> prefill rank holds about 958K-990K KV tokens; each decoder rank holds about 1.078M. Across the 64-GPU <code>3P1D</code> layout, that is about 47.2M prefill-cache tokens and 17.3M decode-cache tokens. These measured allocations include the three-token MTP head.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="wide-expert-parallelism">Wide expert parallelism<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#wide-expert-parallelism" class="hash-link" aria-label="Direct link to Wide expert parallelism" title="Direct link to Wide expert parallelism" translate="no">​</a></h2>
<p><strong>Wide expert parallelism spreads model weights across GPUs, leaving more memory for KV.</strong></p>
<p>In the full-input-length runs, KV uses about 40-41 GiB on each prefill GPU and 45 GiB on each decode GPU. At <code>TP=1</code>, each GPU holds about 65 GiB of weights.</p>
<p>The <a href="https://github.com/llm-d/llm-d/blob/main/guides/agentic-serving/glm-5-2-h200.md" target="_blank" rel="noopener noreferrer" class="">guide's default layouts</a> use single-node <code>DEP8</code> prefill instances and a two-node <code>DEP16</code> decode pool, with <code>LeaderWorkerSet</code> resources and DP-aware scheduling. The measured <code>3P1D</code> reference uses two-node <code>DEP16</code> prefill instances. DeepEP sends tokens to the GPUs holding their experts over NVLink and InfiniBand, and <code>deep_gemm</code> runs the expert computation.</p>
<p>Width determines how much KV remains on each rank. In the limited-input-length sweep, the <code>DEP8</code> prefill rank holds about 182K KV tokens and <code>DEP16</code> about 990K. The narrower layout therefore reaches the CPU-backed cache sooner.</p>
<figure class="glm-figure glm-figure--compact"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/tokens-in-flight.png" alt="Logical tokens in active requests from concurrency 16 through 128"><figcaption><p>Logical tokens in active requests rise from 1.45M at c16 to 3.35M at c32, 7.09M at c64, and 14.09M at c128 on the 64-GPU <code>3P1D</code> full-input-length run.</p></figcaption></figure>
<figure class="glm-figure glm-figure--compact"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/hbm-breakdown.png" alt="Measured per-GPU HBM allocation by topology"><figcaption><p>Per-GPU HBM accounting by topology. Total device memory is measured; weights and KV allocation come from the serving configuration, and the remainder groups runtime and communication allocations.</p></figcaption></figure>
<p>The aggregate <code>TP=8</code> topology fits in one node and avoids the wide-EP communication buffers, but it gives up KV capacity.</p>
<p>With decode-context parallelism disabled, vLLM copies the same MLA cache onto all eight ranks: 598K logical tokens with a 25 GiB copy per rank, or roughly 200 GiB of physical KV per node. Expert weights use 89.5 GiB per GPU, versus 65.1 GiB in the wide layout.</p>
<p>On the same hardware, aggregate <code>TP=8</code> holds 598K KV tokens per node; <code>DEP8</code> holds 1.77M, and a <code>DEP16</code> node-share holds about 5.2M. The aggregate layout trades that 3× to 9× session-capacity gap for a single-node scheduling unit without the NVSHMEM heap or all-to-all fabric traffic.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="routing-turns-back-to-their-cache">Routing turns back to their cache<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#routing-turns-back-to-their-cache" class="hash-link" aria-label="Direct link to Routing turns back to their cache" title="Direct link to Routing turns back to their cache" translate="no">​</a></h2>
<p><strong>Prefix-aware routing sends each turn back to a replica that already has its context.</strong></p>
<p>With MTP and CPU offloading enabled, GPU memory supplies about 90-92% of reusable prefill prefixes across the <code>DEP16</code> <code>1P1D</code> and <code>2P1D</code> runs through concurrency 128. The llm-d Router schedules prefill and decode differently:</p>
<ul>
<li class="">
<p>Prefill placement looks at how much of a request's prefix is already in GPU or CPU memory, how many requests are queued, and how full the KV cache is. It sends the turn to the replica that offers the best balance of cache reuse and load.</p>
</li>
<li class="">
<p>Decode placement balances GPU and CPU cache locality against the number of active requests.</p>
</li>
</ul>
<p>The optimized-baseline configuration applies separate prefill and decode filters, and the router sees prefixes in both GPU and CPU memory. The load sweep keeps the corpus’s overlap pattern but uses shorter inputs, around 50K tokens at the median. Because each new suffix is a larger fraction of the request, at most 93.9–94.4% of the input can be reused.</p>
<p>Decode-local reuse is lower because NIXL moves KV from prefill to decode.</p>
<p>The paused-conversation run shows the latency effect: first turns without a cached prefix take 7.46 s median time to first token at about 20K input tokens; later turns with a cached prefix take 2.68 s on inputs up to four times longer. This is an observed workload result, not a matched cache-only control.</p>
<figure class="glm-figure glm-figure--standard"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/routing-cache.png" alt="Prefill GPU reuse in limited-input DEP8 1P1D and decode-local hit rate in DEP16 1P1D"><figcaption><p>Left: in the limited-input <code>DEP8</code> <code>1P1D</code> run at concurrency 64, the router reaches a 91.4% prefill GPU hit rate against a 93.9% reusable-prefix ceiling, capturing 97% of the available reuse. Right: in the <code>DEP16</code> <code>1P1D</code> run, decode-local hit rate is 51.3% at concurrency 64 and 44.6% at 128 because NIXL moves KV to the decode pool.</p></figcaption></figure>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="tiered-prefix-cache">Tiered prefix cache<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#tiered-prefix-cache" class="hash-link" aria-label="Direct link to Tiered prefix cache" title="Direct link to Tiered prefix cache" translate="no">​</a></h2>
<p><strong>CPU offloading keeps evicted prefixes reusable instead of rebuilding them.</strong></p>
<p>On the 24-GPU <code>1P1D</code> <code>DEP8/DEP16</code> layout at concurrency 32, it raises output 13%, cuts median time to first token 32%, and cuts median turn completion 27%, while median time between output tokens is unchanged.</p>
<figure class="glm-figure glm-figure--wide"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/offloading-attribution.png" alt="CPU offloading compared with a matched baseline on a 24-GPU topology"><figcaption><p>24-GPU <code>1P1D</code> with <code>DEP8</code> prefill and <code>DEP16</code> decode; MTP is disabled in both runs. At concurrency 32, input distributions match within 1%. At concurrency 128, baseline output remains near 951 tok/s while CPU offloading reaches 2,776 tok/s; the fixed-duration stages complete different request slices, so the endpoint is a capacity comparison rather than a request-identical A/B. Higher output is better; lower latency is better.</p></figcaption></figure>
<p>Tool calls leave session KV idle, so the serving system may evict it from HBM before the next turn. CPU offloading keeps that KV in a per-rank DRAM pool and restores it when the conversation resumes. <code>MultiConnector</code> handles two paths: <code>OffloadingConnector</code> moves KV between GPU and CPU, while NIXL moves it between prefill and decode. The CPU tier evicts least-recently-used entries first. The increasing-load sweeps allocate 100 GiB per prefill rank; the paused-conversation run uses 150 GiB. Local NVMe sits behind CPU memory and receives no reads in these measurements.</p>
<p>The increasing-load sweep measures the capacity ceiling; the paused-conversation runs measure whether session state survives the gaps between turns.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="when-hbm-fills">When HBM fills<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#when-hbm-fills" class="hash-link" aria-label="Direct link to When HBM fills" title="Direct link to When HBM fills" translate="no">​</a></h3>
<p>Offloading does little until HBM fills. On the compact 16-GPU <code>DEP8</code> topology, with MTP disabled in both runs, output is effectively unchanged at concurrency 16. At concurrency 128, offloading raises output 27% and cuts median turn completion 36%. Each stage runs for a fixed time, so the two runs may finish different requests. This compares how much work each configuration can handle, not the same requests one by one.</p>
<p>The dedicated 64-GPU <code>3P1D</code> run shows the other regime: CPU memory accepts roughly 5 TB of writes over 24 minutes but serves no restores because the active prefixes still fit in HBM. CPU offloading adds capacity under HBM pressure; before that pressure, stores add modest overhead.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="paused-conversations">Paused conversations<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#paused-conversations" class="hash-link" aria-label="Direct link to Paused conversations" title="Direct link to Paused conversations" translate="no">​</a></h3>
<p>The paused-conversation test places two <code>DEP8</code> prefill instances beside one <code>DEP16</code> decoder, for 32 GPUs total. Each <code>DEP8</code> rank has about one-third of a <code>DEP16</code> rank's KV capacity—220K versus 650K tokens—because it holds twice as much expert weight.</p>
<p>With 100–400 ongoing conversations and production-measured pauses of 2.1 s at the median and 25.8 s at p90, live session data reaches 1.4–5.6× GPU cache capacity. CPU memory holds the excess. As conversations resume, restore traffic rises from 3.5 to 22.4 GB/s.</p>
<p>At 400 conversations, every reused prefix is restored from CPU memory, totaling 9.7 TB in one stage, while the time between output tokens remains 34–37 ms. Restoring saved context is faster than recomputing it: 8.4 s versus 14.8 s median across the run, and 23.0 s versus 26.2 s at 400 conversations.</p>
<p>At 400 ongoing conversations on the mixed-width <code>2P1D</code> topology and load, median time to first token reaches 124.5 s without CPU offloading versus 22.2 s with it. The p90 approaches six minutes, while the time between output tokens stays flat in both configurations. Pauses make recomputation expensive: each eviction forces the entire prefix to be rebuilt before the conversation can resume.</p>
<figure class="glm-figure glm-figure--standard"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/natural-cache-pressure.png" alt="Paused-conversation cache pressure with and without CPU offloading"><figcaption><p>With the GPU cache at its natural size, 100-400 ongoing conversations and production-measured pauses exceed GPU capacity by 1.4x to 5.6x. CPU memory supplies the missing capacity without increasing the time between output tokens.</p></figcaption></figure>
<div class="theme-admonition theme-admonition-note admonition_xJq3 alert alert--secondary"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>note</div><div class="admonitionContent_BuS1"><p>At higher scales and longer pauses, disk offloading is expected to bring similar gains at different granularities.</p></div></div>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="restore-versus-recompute">Restore versus recompute<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#restore-versus-recompute" class="hash-link" aria-label="Direct link to Restore versus recompute" title="Direct link to Restore versus recompute" translate="no">​</a></h3>
<p>A controlled comparison on the mixed-width <code>2P1D</code> topology isolates the cost of a cache miss. The GPU KV cache is limited to roughly 230K tokens per rank, slightly above its natural allocation, and CPU offloading is switched on or off for the same workload. At concurrency 32, nothing is evicted and the configurations match within 2%. At higher load, both GPU caches fall to single-digit hit rates; the only meaningful difference is whether a miss restores saved context or recomputes it.</p>
<figure class="glm-figure glm-figure--standard"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/cache-miss-ttft.png" alt="Queue-inclusive client TTFT and throughput for restore versus recompute"><figcaption><p>At the same workload and GPU-cache limit, offloading restores evicted context while the baseline recomputes it. Client TTFT includes time waiting in the prefill queue.</p></figcaption></figure>
<p>With CPU offloading, a miss takes about 59 ms to restore, and median time to first token remains 8.3 s at concurrency 128 with full throughput. Without offloading, a miss requires recomputing about 45K tokens. The server still produces a first token in about 5.7 s once work starts, but the client waits 59 s because 97 requests are queued for prefill. Throughput falls 78%, and the system completes 4.5x fewer turns. The time between output tokens remains 31-36 ms in both configurations because prefill and decode run on separate GPU pools.</p>
<figure class="glm-figure glm-figure--compact"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/latency-stack.png" alt="Client TTFT split into server processing and prefill queue time"><figcaption><p>Queue-inclusive TTFT separates server processing from time waiting for prefill, which dominates the result without offloading.</p></figcaption></figure>
<p>Across the run, engine counters record 12.7 TB of KV, or 283M tokens, restored at 26 ms per GB. At concurrency 128, the CPU cache restores KV at 22.7 GB/s while the topology processes 474K prompt tokens per second.</p>
<p>The cache restores 222M tokens while serving 217M prompt tokens. That ratio exceeds 100% because the limited GPU cache can evict a block that was just restored, forcing it to be loaded again. The churn suggests that a retention policy better than LRU could reduce data movement.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="adding-prefill-capacity">Adding prefill capacity<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#adding-prefill-capacity" class="hash-link" aria-label="Direct link to Adding prefill capacity" title="Direct link to Adding prefill capacity" translate="no">​</a></h3>
<p>The narrowest layout queues the most prefill work. At concurrency 128, <code>1P1D</code> reaches 3,867 tok/s with 7.9 seconds median time to first token. Adding a second prefill instance raises output 23% to 4,770 tok/s and cuts the median wait for first token 38% to 4.9 seconds. A third prefill instance adds 3% output and brings the median wait to 4.0 seconds. All three runs use one fixed <code>DEP16</code> decoder and a 100 GiB CPU tier per rank.</p>
<figure class="glm-figure glm-figure--wide"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/prefill-width.png" alt="Prefill width improves output and time to first token at concurrency 128"><figcaption><p>Concurrency 128 with one fixed <code>DEP16</code> decoder. The second prefill instance removes most of the queueing pressure; the third adds less capacity with the decoder unchanged.</p></figcaption></figure>
<p>Adding prefill instances keeps more KV in HBM and reduces restore traffic; P/D disaggregation lets that input capacity scale independently of decode.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="speculative-decoding">Speculative Decoding<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#speculative-decoding" class="hash-link" aria-label="Direct link to Speculative Decoding" title="Direct link to Speculative Decoding" translate="no">​</a></h2>
<p><strong>Multi-Token Prediction (MTP) gets more output tokens from each decode step.</strong></p>
<p>On the matched 32-GPU <code>1P1D</code> <code>DEP16</code> topology, it raises aggregate output 1.6-2.0x and average end-to-end output per user 1.6-1.8x through concurrency 128.</p>
<p>Long contexts limit how many requests fit in a decode batch, while MoE layers run best with larger batches. MTP adds useful token work to each decode step without adding more requests.</p>
<p>At concurrency 64, median turn completion falls 34% and p90 falls 44%. The 32-GPU <code>1P1D</code> comparison keeps CPU offloading enabled in both runs, so the measured difference comes from MTP. The configuration drafts three extra tokens per decode step.</p>
<figure class="glm-figure glm-figure--standard"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/matched-frontier.png" alt="Matched 32-GPU topology comparing CPU offloading with MTP and CPU offloading"><figcaption><p>Matched 32-GPU <code>1P1D</code> <code>DEP16</code> deployments with CPU offloading. Each curve follows concurrency 16 through 128. MTP moves the frontier right and up: users receive tokens faster while the deployment produces more total output.</p></figcaption></figure>
<figure class="glm-figure glm-figure--compact"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/mtp-capacity-at-30-tpsu.png" alt="MTP capacity at an average output-rate floor of 30 tokens per second per user"><figcaption><p>Highest measured concurrency that sustains at least 30 average tok/s/user. MTP meets the target through c128 and serves 5,647 tok/s; CPU offloading alone meets it only at c16 and serves 561 tok/s. That is at least 8x the concurrency and 10.1x the aggregate output. The target is an average output-rate floor, not a TTFT or tail-latency bound.</p></figcaption></figure>
<p>Each MTP step emits about 2.95 tokens, including the normal token and accepted drafts. Draft acceptance stays between 64.0% and 70.5% across both input-length sweeps; by draft position, it is about 80%, 65%, and 52%. Acceptance stays similar across runs, so throughput differences are more likely to come from topology, queueing, and request mix.</p>
<p>The table compares the two configurations at the same concurrency. Across c32-c128, MTP cuts median time between output tokens by about 52%. Time to first token does not improve; MTP speeds decode, not prefill. Each fixed-duration stage may complete a different request slice.</p>
<table><thead><tr><th style="text-align:left"><strong>Concurrency</strong></th><th style="text-align:left"><strong>TTFT p50 (offloading / MTP)</strong></th><th style="text-align:left"><strong>ITL p50 (offloading / MTP)</strong></th><th style="text-align:left"><strong>Output throughput (offloading / MTP)</strong></th><th style="text-align:left"><strong>E2E output / user (offloading / MTP)</strong></th></tr></thead><tbody><tr><td style="text-align:left">32</td><td style="text-align:left">1.1 s / 1.3 s</td><td style="text-align:left">28.6 / 13.5 ms</td><td style="text-align:left">1,145 / 2,159 tok/s</td><td style="text-align:left">28.7 / 51.5 tok/s/user</td></tr><tr><td style="text-align:left">64</td><td style="text-align:left">1.3 s / 1.6 s</td><td style="text-align:left">30.7 / 14.7 ms</td><td style="text-align:left">2,178 / 3,788 tok/s</td><td style="text-align:left">25.9 / 45.1 tok/s/user</td></tr><tr><td style="text-align:left">128</td><td style="text-align:left">1.6 s / 2.4 s</td><td style="text-align:left">35.1 / 17.1 ms</td><td style="text-align:left">3,505 / 5,647 tok/s</td><td style="text-align:left">21.6 / 35.0 tok/s/user</td></tr></tbody></table>
<figure class="glm-figure glm-figure--wide"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/full-frontier.png" alt="User-visible and per-GPU throughput across limited- and full-input-length runs"><figcaption><p>Left: limited-input-length runs with a 142K benchmark admission cap. Right: full-input-length runs. Each line follows one topology through concurrency 128; hollow points have median time to first token above 10 seconds. Moving right means higher user-visible output speed; moving up means more output per decode GPU. Absolute throughput is comparable only within a panel.</p></figcaption></figure>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="splitting-prefill-from-decode">Splitting prefill from decode<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#splitting-prefill-from-decode" class="hash-link" aria-label="Direct link to Splitting prefill from decode" title="Direct link to Splitting prefill from decode" translate="no">​</a></h2>
<p><strong>Separate prefill and decode pools let input processing and generation tune and scale independently.</strong></p>
<p>In the 64-GPU <code>3P1D</code> <code>DEP16</code> sweep, output rises 71% from concurrency 64 to 128 while median time to first token moves from 1.71 to 2.18 seconds.</p>
<p>Over the same range, median time between output tokens moves from 15.5 to 19.1 ms.</p>
<p>There is no matched aggregate control, so this sweep measures scaling within the P/D layout rather than a controlled P/D-versus-aggregate gain. Prefill uses <code>deep_gemm</code> with <code>deepep_high_throughput</code>; decode uses <code>deepep_low_latency</code>; NIXL moves KV between the pools. Both pools use wide expert parallelism over InfiniBand.</p>
<p>IBM users exercised GLM-5.2 tool calling through the P/D deployment. That path requires <code>glm45</code>, <code>glm47</code>, and automatic tool choice on both prefill and decode; configuring parsing only on decode breaks tool-calling requests.</p>
<figure class="glm-figure glm-figure--wide"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/pool-throughput.png" alt="Input and output throughput across the 64-GPU reference sweep"><figcaption><p>Across concurrency 16 to 128, input throughput rises from 86K to 431K tok/s and output from 1,167 to 6,281 tok/s. Active prefill work grows faster proportionally than decode, so prefill capacity increasingly sets the wait for first token. Decode capacity continues to set streaming speed and full-turn completion.</p></figcaption></figure>
<p>The full-input-length reference sweep enables native MTP, CPU KV offloading, and disaggregated routing. It uses <code>max-model-len=auto</code> and keeps <code>DEP16</code> across the prefill and decode pools. The 64-GPU <code>3P1D</code> reference uses three two-node prefill instances and one two-node decoder across eight nodes. Between concurrency 64 and 128, median input length is about 47K-57K tokens and p99 is above 347K:</p>
<table><thead><tr><th style="text-align:left"><strong>Concurrency</strong></th><th style="text-align:left"><strong>Requests</strong></th><th style="text-align:left"><strong>TTFT p50 / p90</strong></th><th style="text-align:left"><strong>ITL p50 / p90</strong></th><th style="text-align:left"><strong>E2E lat. p50</strong></th><th style="text-align:left"><strong>Output throughput</strong></th></tr></thead><tbody><tr><td style="text-align:left">64</td><td style="text-align:left">3,543</td><td style="text-align:left">1.71 s / 6.36 s</td><td style="text-align:left">15.5 ms / 18.9 ms</td><td style="text-align:left">9.6 s</td><td style="text-align:left">3,679 tok/s (57/GPU)</td></tr><tr><td style="text-align:left">128</td><td style="text-align:left">6,242</td><td style="text-align:left">2.18 s / 15.82 s</td><td style="text-align:left">19.1 ms / 23.1 ms</td><td style="text-align:left">14.0 s</td><td style="text-align:left">6,281 tok/s (98/GPU)</td></tr></tbody></table>
<figure class="glm-figure glm-figure--standard"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/reference-latency.png" alt="Reference 64-GPU sweep latency from concurrency 16 through 128"><figcaption><p>Across concurrency 16 to 128, median TTFT stays between 1.5 and 2.2 seconds, while p90 rises from 4.3 to 15.8 seconds. Median ITL rises from 11.7 to 19.1 ms, and p90 rises from 14.4 to 23.1 ms.</p></figcaption></figure>
<p>The output rate hides most of the work. At concurrency 128, each GPU serves 6,839 total tokens per second, and 98.6% are input. For this workload, the cluster is primarily buying prefill capacity.</p>
<p>Faster decode shifts the bottleneck toward prefill.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="sizing-prefill-and-decode-capacity">Sizing prefill and decode capacity<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#sizing-prefill-and-decode-capacity" class="hash-link" aria-label="Direct link to Sizing prefill and decode capacity" title="Direct link to Sizing prefill and decode capacity" translate="no">​</a></h2>
<p><strong>For this workload, decode replicas raise output; prefill replicas shorten the wait before generation.</strong></p>
<p>At concurrency 128, one more decoder raises output 21%, while one more prefill replica cuts median time to first token 21% and restore traffic 94%. The full-input-length sweep compares <code>DEP16</code> layouts with MTP and CPU offloading enabled; limited-input-length results are comparable only within that separate test.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="adding-prefill-or-decode-capacity">Adding prefill or decode capacity<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#adding-prefill-or-decode-capacity" class="hash-link" aria-label="Direct link to Adding prefill or decode capacity" title="Direct link to Adding prefill or decode capacity" translate="no">​</a></h3>
<p>The full-input-length sweep keeps every instance at <code>DEP16</code> and compares <code>1P1D</code>, <code>2P2D</code>, <code>3P1D</code>, and <code>3P2D</code> with native MTP and CPU KV offloading enabled.</p>
<p>At concurrency 128, keeping three prefill replicas fixed and adding a second decoder raises output from 6,281 to 7,598 tok/s (+21%) and end-to-end output per user from 36.6 to 44.2 tok/s/user (+21%). Median turn completion falls from 14.0 to 11.5 seconds, while median time between output tokens falls from 19.1 to 15.5 ms. Median time to first token remains near 2.1 seconds.</p>
<p>Prefill width changes a different part of the turn. With two decoders fixed, moving from <code>2P2D</code> to <code>3P2D</code> cuts median time to first token from 2.70 to 2.12 seconds and CPU-to-GPU restore traffic from 759 to 45 GiB; median time between output tokens stays near 15.4 ms. In this sweep, at the same 64-GPU budget, <code>2P2D</code> produces 8% more output and completes the median turn 10% sooner, while <code>3P1D</code> lowers median time to first token 19% and restore traffic 63%.</p>
<figure class="glm-figure glm-figure--wide"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/full-isl.png" alt="User-visible and per-GPU throughput across full-input DEP16 topologies"><figcaption><p>Each line follows one full-input <code>DEP16</code> topology through concurrency 128. Solid lines use two decoders; dashed lines use one. Moving right means higher user-visible output speed; moving up means more work per GPU.</p></figcaption></figure>
<p>Each stage runs for a fixed time, so comparisons between layouts may include different completed requests.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="where-the-bottleneck-moves">Where the bottleneck moves<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#where-the-bottleneck-moves" class="hash-link" aria-label="Direct link to Where the bottleneck moves" title="Direct link to Where the bottleneck moves" translate="no">​</a></h3>
<p><strong>Decode and prefill width remove different queues.</strong> The limited-input-length sweep keeps native MTP and CPU KV offloading enabled while widening one side of the deployment at a time.</p>
<p>At concurrency 128, widening the <code>DEP8</code> decoder to <code>DEP16</code> raises output from 1,501 to 3,233 tok/s and cuts the decode queue from 39 to 3 requests. The narrow prefill pool still has 137 requests waiting and restores 7,229 GiB of KV from CPU memory.</p>
<p>Widening prefill from <code>DEP8</code> to <code>DEP16</code> moves the active KV set back into HBM. Per-rank prefill capacity rises from about 182K to 990K KV tokens, CPU restore traffic falls from 7,229 to 50 GiB, and median time to first token falls from 20.9 to 2.38 seconds. Output reaches 5,647 tok/s.</p>
<p>A second <code>DEP16</code> prefill instance removes the remaining restore traffic. At concurrency 128, <code>2P1D</code> reaches 6,647 output tok/s and 1.59 seconds median time to first token. The 32-GPU <code>1P1D</code> topology delivers 85% of that output with one-third fewer GPUs; the 48-GPU <code>2P1D</code> topology buys lower latency and more prefill headroom. Against the 48-GPU baseline with both features disabled, the optimized 32-GPU layout produces 54% more output, delivers 51% more end-to-end output per user, and completes the median turn 18% sooner while using one-third fewer GPUs; median time to first token is 2.38 versus 1.26 seconds. The fixed-duration stages do not complete the same request slice, so these are operating-point comparisons rather than request-identical A/Bs.</p>
<figure class="glm-figure glm-figure--wide"><img src="https://llm-d.ai/img/blogs/glm52-agentic-serving/width-efficiency.png" alt="Capacity and queue movement across limited-input-length layouts at concurrency 128"><figcaption><p>At concurrency 128, widening decode removes the decode queue but drives more work through a prefill pool that is still too small. Widening prefill moves the active KV set back into HBM; a second prefill replica buys the remaining headroom. Higher output is better; lower TTFT and restore traffic are better.</p></figcaption></figure>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="what-it-costs-at-an-interactivity-target">What it costs at an interactivity target<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#what-it-costs-at-an-interactivity-target" class="hash-link" aria-label="Direct link to What it costs at an interactivity target" title="Direct link to What it costs at an interactivity target" translate="no">​</a></h2>
<p><strong>At sustained load, self-hosted GPU rental accounts for a fraction of the per-token cost of a managed API.</strong></p>
<p>At concurrency 128, the 64-GPU <code>3P1D</code> topology with MTP and CPU offloading serves 431K input and 6,281 output tokens per second, delivering 36.6 end-to-end output tokens per second per user. The 64-GPU <code>2P2D</code> topology serves 489K input and 6,781 output tokens per second, delivering 40.9 end-to-end output tokens per second per user. End-to-end throughput includes queueing and prefill, so it is the user-visible rate.</p>
<p>Using the same assumed $2.71 per GPU-hour rental rate, <code>3P1D</code> implies $0.08/M input and $1.92/M output, while <code>2P2D</code> implies $0.05/M input and $3.55/M output. Both layouts rent 64 GPUs. <code>2P2D</code> assigns more of them to decode, favoring streaming throughput and full-turn completion; <code>3P1D</code> assigns more to prefill, favoring time to first token and lower CPU restore traffic.</p>
<p>Input tokens are logical tokens: cached prompt tokens count at their full prompt length, not by the bytes restored from cache.</p>
<p><a href="https://docs.z.ai/guides/overview/pricing" target="_blank" rel="noopener noreferrer" class="">Z.ai</a> lists its GLM-5.2 API at $1.40 per million input tokens, $0.26 cached input, and $4.40 per million output tokens. <a href="https://platform.claude.com/docs/en/about-claude/pricing" target="_blank" rel="noopener noreferrer" class="">Anthropic</a> lists Claude Opus 4.8 at $5 input and $25 output, with cache reads at $0.50 per million tokens. At the stated rental rate, self-hosted <code>2P2D</code>'s $3.55/M output is about 81% of Z.ai's public GLM-5.2 rate and about one-seventh of the Opus rate. Its $0.05/M input cost is 3.5% of Z.ai's list rate and about 20% of its cached-input rate. Input accounts for 98.6% of served tokens at this operating point. Prefill accounts for half of GPU rental in <code>2P2D</code> and three-quarters in <code>3P1D</code>.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="cost-basis-and-limits">Cost basis and limits<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#cost-basis-and-limits" class="hash-link" aria-label="Direct link to Cost basis and limits" title="Direct link to Cost basis and limits" translate="no">​</a></h3>
<p>These figures assume that the cluster sustains the measured load 24/7. Lower utilization raises effective cost in inverse proportion. The prices cover GPU rental only; storage, egress, engineering, support, and taxes are excluded. The input/output split assigns each P/D pool's cost to the tokens it processes; another allocation changes the two columns, not total cluster cost. API rates include managed operations, autoscaling, service commitments, and provider margin. Spot rates also carry interruption and availability risk. The comparison describes token economics at a fixed operating point, not full total cost of ownership or an API-equivalent service.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="conclusion">Conclusion<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#conclusion" class="hash-link" aria-label="Direct link to Conclusion" title="Direct link to Conclusion" translate="no">​</a></h2>
<p>Agentic serving depends on input reuse as much as decode speed. On the 64-GPU <code>3P1D</code> reference, increasing concurrency from 64 to 128 raises output 71%, from 3,679 to 6,281 tok/s, while median time between output tokens moves from 15.5 to 19.1 ms. Because there is no matched aggregate control, this demonstrates scaling within P/D rather than a measured P/D-versus-aggregate gain.</p>
<p>Each optimization removes a different bottleneck. Wide expert parallelism makes room for long contexts, while routing and CPU memory keep them reusable. Separate prefill and decode pools keep long reads from disrupting generation; MTP reduces decode steps; and additional prefill replicas add capacity where the workload queues. In this sweep, at the same 64-GPU budget, <code>2P2D</code> produces more output and finishes turns sooner, while <code>3P1D</code> reaches first token sooner and restores less KV from CPU memory.</p>
<p>At high concurrency in the measured layouts, queueing on the fixed <code>DEP16</code> decoder limits how much generation speed reaches each user. Adding decode capacity is the next sizing question.</p>
<p>The agentic-serving cookbooks include <a href="https://github.com/llm-d/llm-d/blob/main/guides/agentic-serving/nemotron-3-ultra-550b-h200.md" target="_blank" rel="noopener noreferrer" class="">Nemotron-3-Ultra-550B on H200</a>, with P/D disaggregation and CPU KV offloading, and <a href="https://github.com/llm-d/llm-d/blob/main/guides/agentic-serving/qwen3-coder-480b-tpu.md" target="_blank" rel="noopener noreferrer" class="">Qwen3-Coder-480B on TPU v7</a>, with routing and CPU offloading. The <a href="https://github.com/llm-d/llm-d/blob/main/guides/agentic-serving/glm-5-2-h200.md" target="_blank" rel="noopener noreferrer" class="">GLM-5.2 H200 configuration</a> follows the same agentic-serving pattern.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="where-this-goes-next">Where this goes next<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#where-this-goes-next" class="hash-link" aria-label="Direct link to Where this goes next" title="Direct link to Where this goes next" translate="no">​</a></h2>
<p>For GLM-5.2, KV capacity is the main deployment constraint. The cache hierarchy can extend beyond CPU DRAM and local NVMe to distributed DRAM and network storage. Each tier adds capacity but also restore latency, so it helps only while loading saved KV remains cheaper than recomputing it. The right boundary depends on the workload: active streams are latency-sensitive, while paused agent sessions can move state to a cheaper tier and restore it before work resumes. The deployment policy should choose the cheapest tier that still beats recomputation.</p>
<p>The open problem is serving a complete agent program, not isolated requests. That means replaying think time, tool calls, sub-agent fan-out, and the dependency graph that connects them, then measuring how routing, prefix retention, and prefill/decode sizing affect the time a user waits for a result.</p>
<p>Next, compare P/D with a matched aggregate topology, test wider decode pools at high concurrency, and validate tool calls under MTP.</p>
<p>The Agentic Inference SIG develops this work in the open. Join <a href="https://llm-d.slack.com/archives/C0ALHNZJCFJ" target="_blank" rel="noopener noreferrer" class="">#sig-agentic-inference</a> on the llm-d Slack or a community meeting; bring traces.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="get-involved-with-llm-d">Get Involved with llm-d<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#get-involved-with-llm-d" class="hash-link" aria-label="Direct link to Get Involved with llm-d" title="Direct link to Get Involved with llm-d" translate="no">​</a></h2>
<ul>
<li class="">
<p>Explore the llm-d Community Quickstart → <a class="" href="https://llm-d.ai/community">Start here</a></p>
</li>
<li class="">
<p>Join our Slack → <a class="" href="https://llm-d.ai/slack">Get your invite</a></p>
</li>
<li class="">
<p>Explore the code → <a href="https://github.com/llm-d" target="_blank" rel="noopener noreferrer" class="">GitHub organization</a></p>
</li>
<li class="">
<p>Attend meetings → all open; add our <a class="" href="https://llm-d.ai/community#public-meeting-calendar">public calendar</a></p>
</li>
</ul>
<hr>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="appendix-deployment-and-benchmark-details">Appendix: Deployment and benchmark details<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#appendix-deployment-and-benchmark-details" class="hash-link" aria-label="Direct link to Appendix: Deployment and benchmark details" title="Direct link to Appendix: Deployment and benchmark details" translate="no">​</a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="model-and-software-stack">Model and software stack<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#model-and-software-stack" class="hash-link" aria-label="Direct link to Model and software stack" title="Direct link to Model and software stack" translate="no">​</a></h3>
<p>GLM-5.2 is a 744B-parameter mixture-of-experts model with 39B active parameters and 78 layers. Each token uses only a subset of its experts, but the full FP8 weight set still has to be distributed across GPUs. Multi-head Latent Attention reduces the KV state stored for each token, and the model's multi-token prediction head drafts up to three additional tokens per decode step.</p>
<p>The measured deployment runs on Kubernetes and uses CoreWeave CKS with InfiniBand:</p>
<table><thead><tr><th style="text-align:left"><strong>Layer</strong></th><th style="text-align:left"><strong>Component</strong></th><th style="text-align:left"><strong>Role</strong></th></tr></thead><tbody><tr><td style="text-align:left">Model server</td><td style="text-align:left">vLLM</td><td style="text-align:left">FP8 inference, MLA KV cache, agentic parsers</td></tr><tr><td style="text-align:left">Routing</td><td style="text-align:left">llm-d EPP</td><td style="text-align:left">Prefix-cache-aware routing and P/D scheduling</td></tr><tr><td style="text-align:left">KV transfer</td><td style="text-align:left">NIXL</td><td style="text-align:left">KV movement between prefill and decode over InfiniBand</td></tr><tr><td style="text-align:left">Tiered prefix cache</td><td style="text-align:left">CPU DRAM cache + NVMe storage evictor</td><td style="text-align:left">CPU-backed KV capacity below HBM; NVMe is provisioned but inactive in these measurements</td></tr><tr><td style="text-align:left">MoE compute</td><td style="text-align:left">DeepEP + <code>deep_gemm</code></td><td style="text-align:left">Expert parallelism across GPUs</td></tr><tr><td style="text-align:left">Attention</td><td style="text-align:left">FlashMLA Sparse</td><td style="text-align:left">Attention backend</td></tr><tr><td style="text-align:left">Multi-node pods</td><td style="text-align:left"><code>LeaderWorkerSet</code></td><td style="text-align:left">Manages each multi-node replica as one Kubernetes unit</td></tr><tr><td style="text-align:left">Benchmarking</td><td style="text-align:left">AIPerf</td><td style="text-align:left">Load sweeps against the gateway</td></tr></tbody></table>
<p>The measured benchmarks use disaggregated prefill and decode layouts. Aggregate <code>TP=8</code> appears only in the memory-profile comparison.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="topology-inventory">Topology inventory<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#topology-inventory" class="hash-link" aria-label="Direct link to Topology inventory" title="Direct link to Topology inventory" translate="no">​</a></h3>
<p>The full-input-length sweep uses <code>DEP16</code> throughout and scales both pools. <code>1P1D</code> uses 32 GPUs, <code>2P2D</code> and <code>3P1D</code> each use 64, and <code>3P2D</code> uses 80. The two 64-GPU layouts spend the same hardware budget differently: <code>2P2D</code> adds decode capacity, while <code>3P1D</code> adds prefill capacity. Comparing <code>3P1D</code> with <code>3P2D</code> isolates the effect of adding a decoder.</p>
<p>The limited-input-length sweep changes instance width before adding another instance. A <code>DEP8/DEP8</code> <code>1P1D</code> layout uses 16 GPUs. Widening only the decoder to <code>DEP16</code> uses 24 GPUs; widening prefill too uses 32. Adding a second <code>DEP16</code> prefill instance produces the 48-GPU <code>2P1D</code> layout.</p>
<p>The paused-conversation test uses another 32-GPU <code>2P1D</code> layout: two <code>DEP8</code> prefill instances and one <code>DEP16</code> decoder. The topology name counts instances; their widths determine the GPU total.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="benchmark-setup">Benchmark setup<a href="https://llm-d.ai/blog/serving-glm-5-2-agentic-workloads-on-llm-d#benchmark-setup" class="hash-link" aria-label="Direct link to Benchmark setup" title="Direct link to Benchmark setup" translate="no">​</a></h3>
<p>Each benchmark admits only requests below its admission limit. The limited-input-length runs filter the trace at 142,000 tokens; the full-input-length runs admit longer contexts. The server sets <code>max-model-len</code> automatically in both, with GPU-memory utilization at 93.5% for prefill and 95% for decode.</p>
<p>In AIPerf, concurrency is the number of simulated clients, each keeping one request active. <code>tok/s/user</code> is throughput per simulated client, not per person or complete agent task. End-to-end turn completion covers queueing, processing, and generation from request submission through the final output token.</p>
<p>The load sweep increases concurrency with completions near the corpus median of about 317 output tokens. The offloading A/B keeps matched 16- and 32-GPU topologies fixed and switches CPU offloading on or off. The paused-conversation test uses shorter completions and production-measured pauses across 100-400 ongoing conversations.</p>
<p>The cache-limit test isolates restore versus recompute. The offloading width sweep changes the number of <code>DEP16</code> prefill instances while keeping one <code>DEP16</code> decoder fixed. The limited-input-length sizing sweep widens decode and then prefill with MTP and CPU offloading enabled. The full-input-length sweep changes the number of <code>DEP16</code> prefill and decode instances. Absolute throughput should be compared only within the same test.</p>]]></content:encoded>
            <author>rajjoshi@redhat.com (Raj Joshi)</author>
            <author>chcost@us.ibm.com (Carlos Costa)</author>
            <category>GLM-5.2</category>
            <category>Agentic Inference</category>
            <category>KV Cache</category>
            <category>Storage</category>
            <category>Scheduling</category>
            <category>Speculative Decoding</category>
        </item>
        <item>
            <title><![CDATA[RL Post-Training: Co-Operative Time-Slicing with llm-d]]></title>
            <link>https://llm-d.ai/blog/rl-post-training-co-operative-time-slicing</link>
            <guid>https://llm-d.ai/blog/rl-post-training-co-operative-time-slicing</guid>
            <pubDate>Sun, 28 Jun 2026 16:41:00 GMT</pubDate>
            <description><![CDATA[Introducing Co-operative Time-Slicing to eliminate idle accelerators in distributed RL post-training loops.]]></description>
            <content:encoded><![CDATA[<p>In Reinforcement Learning (RL) post-training for Large Language Models using algorithms like GRPO, optimizing the ratio of generator (sampler) to trainer throughput is the single largest driver of infrastructure Total Cost of Ownership (TCO). Because typical RL post-training loops alternate sequentially between generation and optimization phases, GPU and TPU clusters sit completely idle for 40% to 60% of their lifecycle.</p>
<p>Today, llm-d introduces a new well-lit path for Co-operative Time-Slicing: the Snapshot Agent. Rather than forcing physical hardware to wait on upstream phases or sit idle during blocking operations, this platform-level capability dynamically interleaves independent RL jobs onto shared hardware blocks, driving aggregate accelerator duty cycles from the 40% baseline up to 70%+ efficiency without altering underlying model convergence or accuracy.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="key-takeaways">Key Takeaways<a href="https://llm-d.ai/blog/rl-post-training-co-operative-time-slicing#key-takeaways" class="hash-link" aria-label="Direct link to Key Takeaways" title="Direct link to Key Takeaways" translate="no">​</a></h2>
<ul>
<li class=""><strong>Near Zero Idle Accelerators</strong>: Co-operative time-slicing multiplexes concurrent RL jobs onto shared GPU and TPU hardware, reclaiming stranded compute capacity and boosting duty cycles from ~40% up to 70%+.</li>
<li class=""><strong>No Model Degradation</strong>: Because active jobs retain exclusive access to physical accelerators during their compute windows, there is no loss in token generation throughput or training step convergence.</li>
<li class=""><strong>Low Code Changes</strong>: A lightweight two-call client API (<code>acquire</code> and <code>yield</code>) integrates seamlessly into existing RL loops, while the Snapshot Agent automatically handles CUDA context evacuation and restoration to host DRAM under the hood.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="the-core-efficiency-problem-with-rl-loops">The Core Efficiency Problem with RL Loops<a href="https://llm-d.ai/blog/rl-post-training-co-operative-time-slicing#the-core-efficiency-problem-with-rl-loops" class="hash-link" aria-label="Direct link to The Core Efficiency Problem with RL Loops" title="Direct link to The Core Efficiency Problem with RL Loops" translate="no">​</a></h2>
<p>Distributed RL post-training is a fragmented "stop-and-wait" loop. The pipeline operates as a cycle between generation and optimization. While generation is running, optimization accelerators sit idle and vice versa.</p>
<div margin:="">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/time-slicing/rl_time-slice_1.webp" alt="Figure1 : Stop-and-Wait RL loop" height:="" class="img_ev3q">
</div>
<p>Traditional cloud infrastructure is designed for continuous, steady-state workloads. This alternating architecture introduces two systemic inefficiencies at scale:</p>
<ul>
<li class=""><strong>The Idle Accelerators</strong>: Because these phases occur sequentially, expensive GPU and TPU clusters sit completely idle (0% utilization) for 40% to 60% of their lifecycle. Trainers sit idle waiting for sampling rollouts to finish; samplers sit idle during gradient updates and weight distribution. This deadtime represents millions in wasted capital annually.</li>
<li class=""><strong>The Context is Locked-In</strong>: RL trainers and samplers hold their accelerator allocations for the entirety of their runtime even during idle phases because the CUDA context and all device memory remain resident. Standard schedulers treat these pods as static, siloed allocations rather than aligning to the alternating, phase-level states of the live RL loop.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="introducing-co-operative-time-slicing-rl-job-interleaving">Introducing Co-operative Time-Slicing (RL Job Interleaving)<a href="https://llm-d.ai/blog/rl-post-training-co-operative-time-slicing#introducing-co-operative-time-slicing-rl-job-interleaving" class="hash-link" aria-label="Direct link to Introducing Co-operative Time-Slicing (RL Job Interleaving)" title="Direct link to Introducing Co-operative Time-Slicing (RL Job Interleaving)" translate="no">​</a></h2>
<p>To eliminate idle accelerators during RL jobs, the <strong>llm-d</strong> project introduces Co-operative Time-Slicing. Rather than forcing hardware to wait on upstream phases, the infrastructure dynamically interleaves independent RL jobs onto shared hardware blocks, driving aggregate accelerator duty cycles up to 70% without altering the underlying model convergence or accuracy.</p>
<p>When Job A pauses its training phase to run reward evaluation on the CPU or distribute updated weights, the infrastructure time-slices the physical accelerators, swapping in the active sampling or training phase of Job B.</p>
<div margin:="">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/time-slicing/rl_time-slice_2.webp" alt="Figure2 : RL steps scheduling before and after time-slicing" height:="" class="img_ev3q">
</div>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="high-level-architecture-overview">High Level Architecture Overview<a href="https://llm-d.ai/blog/rl-post-training-co-operative-time-slicing#high-level-architecture-overview" class="hash-link" aria-label="Direct link to High Level Architecture Overview" title="Direct link to High Level Architecture Overview" translate="no">​</a></h2>
<p>The Accelerator Time-Slicing Platform architecture is divided into three distinct operational boundaries—<strong>Workload-scoped</strong>, <strong>Cluster-scoped</strong>, and <strong>Node-scoped</strong>—to isolate developer code, cluster coordination, and physical hardware management. This layout maps how user-space runtime requests are translated into cluster-level lock queues and executed as node-level process context swaps.</p>
<div margin:="">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/time-slicing/rl_time-slice_3.webp" alt="Figure3 : High-level component diagram for time-slicing" height:="" class="img_ev3q">
</div>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="1-workload-scoped-layer-application-runtime">1. Workload-Scoped Layer (Application Runtime)<a href="https://llm-d.ai/blog/rl-post-training-co-operative-time-slicing#1-workload-scoped-layer-application-runtime" class="hash-link" aria-label="Direct link to 1. Workload-Scoped Layer (Application Runtime)" title="Direct link to 1. Workload-Scoped Layer (Application Runtime)" translate="no">​</a></h3>
<p>This top layer encapsulates the containerized user training environment, such as a dedicated RayCluster or standalone Kubernetes pod configuration. It isolates the modeling code from infrastructure complexity:</p>
<ul>
<li class=""><strong>RL Loop Actor Process</strong>: The central coordinator of the training loop. RL code imports the TimeSlice Client, which explicitly signals phase boundaries to the control plane using simple <code>acquire()</code> and <code>yield()</code> functions.</li>
<li class=""><strong>ML Framework Worker Process</strong>: The background compute worker running the core training stack (e.g., PyTorch, vLLM). It maintains the live CUDA context, model weights, and allocations inside its virtual memory address space.</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="2-cluster-scoped-layer-control--orchestration-plane">2. Cluster-Scoped Layer (Control &amp; Orchestration Plane)<a href="https://llm-d.ai/blog/rl-post-training-co-operative-time-slicing#2-cluster-scoped-layer-control--orchestration-plane" class="hash-link" aria-label="Direct link to 2. Cluster-Scoped Layer (Control &amp; Orchestration Plane)" title="Direct link to 2. Cluster-Scoped Layer (Control &amp; Orchestration Plane)" translate="no">​</a></h3>
<p>This middle layer governs cluster-wide state, scheduling policies, and queue coordination across multi-tenant workloads:</p>
<ul>
<li class=""><strong>Workload Scheduler</strong>: Native Kubernetes scheduling infrastructure configured with Dynamic Resource Allocation (DRA). It uses custom DeviceClass parameters to enforce device oversubscription, instructing the cluster that it is safe to co-schedule multiple trainer/sampler pods onto the same physical hardware footprint.</li>
<li class=""><strong>Accelerator Orchestrator</strong>: The central coordination engine of the platform. It dynamically discovers group topology based on user-defined labels, maintains FIFO lock queues per group to coordinate access to the accelerators, and fans out atomic snapshot or restore commands to the Snapshot Agent on target nodes.</li>
<li class=""><strong>Workload Placement Optimizer</strong>: A future component that runs alongside the orchestrator. It automatically profiles workload execution patterns and configures time-sliceable job groups dynamically without manual user labeling.</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="3-node-scoped-layer-hardware--data-plane-isolation">3. Node-Scoped Layer (Hardware &amp; Data Plane Isolation)<a href="https://llm-d.ai/blog/rl-post-training-co-operative-time-slicing#3-node-scoped-layer-hardware--data-plane-isolation" class="hash-link" aria-label="Direct link to 3. Node-Scoped Layer (Hardware &amp; Data Plane Isolation)" title="Direct link to 3. Node-Scoped Layer (Hardware &amp; Data Plane Isolation)" translate="no">​</a></h3>
<p>This bottom layer acts on the physical node boundary to enforce absolute memory isolation between oversubscribed pods:</p>
<ul>
<li class=""><strong>Snapshot Agent DaemonSet</strong>: A privileged daemon running on every accelerator node, exposing a gRPC interface that handles snapshot and restore calls from the Orchestrator or directly from an RL service. It performs accelerator state saves and restores.</li>
<li class=""><strong>Pluggable Save Backend</strong>: A modular interface that translates agent commands into host process manipulation. The v1 implementation uses a <code>cuda-checkpoint</code> binary and NVML cgroup tracking to discover compute processes, freeze execution, and serialize the entire active CUDA context directly to host DRAM.</li>
<li class=""><strong>Physical Accelerator Hardware Pool</strong>: The underlying physical GPU/TPU cluster infrastructure where oversubscribed execution steps alternate seamlessly without OOM risks or framework-level interference.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="end-to-end-control-and-data-flow-for-time-slicing">End-to-End Control and Data Flow for Time-Slicing<a href="https://llm-d.ai/blog/rl-post-training-co-operative-time-slicing#end-to-end-control-and-data-flow-for-time-slicing" class="hash-link" aria-label="Direct link to End-to-End Control and Data Flow for Time-Slicing" title="Direct link to End-to-End Control and Data Flow for Time-Slicing" translate="no">​</a></h2>
<ol>
<li class="">The user's RL training loop reaches a natural pause point—such as the end of a rollout generation phase or a training step, a logical boundary where it is safe to give up the physical accelerator. At this boundary, the job invokes the TimeSlice client library to request hardware access for its next operational phase.</li>
<li class="">The client library dispatches an Acquire RPC to the Accelerator Orchestrator, explicitly identifying the active <code>job_id</code> and the targeted group of hardware nodes it requires. This remote procedure call synchronously blocks, forcing the workload thread to wait until the platform layer determines it is safe to proceed.</li>
<li class="">If another independent RL job currently holds the execution lock on the designated accelerator pool, the Accelerator Orchestrator places the incoming request into a First-In, First-Out (FIFO) queue assigned to that node group, preserving the strict order of request arrival.</li>
<li class="">When the active job finishes and yields control, the orchestrator begins a coordinated swap. It communicates with the node-local Snapshot Agent to trigger a memory snapshot of the yielding job's active accelerator state, serializing its entire live CUDA context and moving the data off the physical accelerator into host DRAM.</li>
<li class="">With the physical accelerator hardware now successfully evacuated and free of memory residency, the orchestrator evaluates the queue state, pops the next pending job from the front of the FIFO line, and initiates the control transfer.</li>
<li class="">The orchestrator coordinates with the destination node's Snapshot Agent a second time, executing a restore operation. The agent deserializes the incoming job's cached state, lifting its model weights and execution context out of host DRAM and streaming them back onto the accelerator's high-bandwidth memory (VRAM).</li>
<li class="">Once the physical memory restore completes successfully, the orchestrator grants the execution lock to the new job and returns a success status to the blocked Acquire call. The worker process immediately unblocks and resumes execution exactly where it left off, requiring zero rewrites or modifications to its core modeling logic.</li>
<li class="">The job that previously yielded its compute window now sits warm in host memory. Its process state remains active, completely bypassing container cold-start overhead and standing ready to be re-streamed onto the accelerators just as efficiently when its turn comes back around in the scheduling queue.</li>
</ol>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="early-benchmarks">Early Benchmarks<a href="https://llm-d.ai/blog/rl-post-training-co-operative-time-slicing#early-benchmarks" class="hash-link" aria-label="Direct link to Early Benchmarks" title="Direct link to Early Benchmarks" translate="no">​</a></h2>
<p>To validate the infrastructure’s ability to reclaim stranded compute capacity without impacting algorithmic convergence, early tests evaluated the platform-native time-slicing system using a representative Reinforcement Learning (RL) workload:</p>
<ul>
<li class=""><strong>Hardware Configuration</strong>: 1x NVIDIA H100 SXM5 (80GB) node (8 GPUs per node), interconnected via NVLink and InfiniBand networking.</li>
<li class=""><strong>Model &amp; Workload Configuration</strong>: Qwen2.5-7B-Instruct fine-tuned using veRL with GRPO (Group Relative Policy Optimization). Each job ran with a rollout batch size of 512, maximum prompt length of 1024 tokens, and maximum response length of 1024 tokens. Samplers ran via vLLM with tensor parallelism of 4, while trainers utilized PyTorch FSDP (Fully Sharded Data Parallel).</li>
<li class=""><strong>Baseline Measurement Method</strong>: The 40% baseline GPU duty cycle was measured during standard standalone (non-interleaved) execution over 5 continuous training epochs using NVIDIA DCGM (Data Center GPU Manager) and Prometheus metrics. During standalone execution, GPUs remain completely idle (0% compute utilization) during reward computation on CPU, rollout buffer processing, and inter-node weight synchronization.</li>
</ul>
<p>During the test, co-scheduling and interleaving two independent sampler workloads on a single node elevated the actual hardware duty cycle from a baseline of 40% to 70%, with a possible theoretical peak of ~95% under idealized phase alignments. The theoretical peak of ~95% is derived under complementary phase alignment where Job A is executing CPU-bound reward evaluation or weight transfer while Job B executes GPU-bound sampling or gradient computation; the remaining ~5% accounts for irreducible PCIe Gen5 host-to-device memory snapshot and restore serialization overheads. Because the active job maintains exclusive access to the GPU during its compute window, there is zero degradation to token generation or training step throughput.</p>
<div margin:="">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/time-slicing/rl_time-slice_4.webp" alt="Figure4 : Baseline RL run without time-slicing" height:="" class="img_ev3q">
</div>
<div margin:="">
  <img decoding="async" loading="lazy" src="https://llm-d.ai/img/blogs/time-slicing/rl_time-slice_5.webp" alt="Figure5 : RL run with time-slicing" height:="" class="img_ev3q">
</div>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="limitations-and-workload-caveats">Limitations and Workload Caveats<a href="https://llm-d.ai/blog/rl-post-training-co-operative-time-slicing#limitations-and-workload-caveats" class="hash-link" aria-label="Direct link to Limitations and Workload Caveats" title="Direct link to Limitations and Workload Caveats" translate="no">​</a></h3>
<p>While Co-operative Time-Slicing significantly improves hardware utilization for alternating RL workflows, several real-world factors can influence net efficiency gains:</p>
<ul>
<li class=""><strong>Phase Alignment Dependencies</strong>: Achieving peak efficiency (&gt;90%) relies on complementary phase timing between interleaved jobs. If two co-scheduled jobs request GPU compute simultaneously, one job must wait in the FIFO queue, which can introduce queuing tail latency. Future releases will address this via the intelligent Workload Placement Optimizer.</li>
<li class=""><strong>Host DRAM &amp; PCIe Bandwidth</strong>: Evacuating a multi-gigabyte CUDA context to host memory requires sufficient available host DRAM per node to cache inactive job states. Additionally, context switch times are bounded by PCIe transfer bandwidth between GPU VRAM and system memory; workloads with massive static memory footprints will experience slightly higher transition overheads.</li>
<li class=""><strong>Co-operative Signaling Requirement</strong>: The current architecture relies on cooperative scheduling where jobs explicitly invoke <code>acquire()</code> and <code>yield()</code> at natural phase boundaries. Ill-behaved workloads that fail to yield control cannot be preempted without aborting the active CUDA process.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="simple-developer-experience-client-side">Simple Developer Experience (Client-Side)<a href="https://llm-d.ai/blog/rl-post-training-co-operative-time-slicing#simple-developer-experience-client-side" class="hash-link" aria-label="Direct link to Simple Developer Experience (Client-Side)" title="Direct link to Simple Developer Experience (Client-Side)" translate="no">​</a></h2>
<p>Researchers should be able to focus on core modeling logic rather than wrestling with low-level CUDA context switching or custom scheduling loops. In llm-d, RL job multiplexing can be enabled by wrapping the accelerator phases in existing loops with a simple Python decorator:</p>
<div class="language-python codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-python codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token keyword" style="color:hsl(301, 63%, 40%)">from</span><span class="token plain"> timeslice </span><span class="token keyword" style="color:hsl(301, 63%, 40%)">import</span><span class="token plain"> TimeSliceOrchestratorClient</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">orchestrator </span><span class="token operator" style="color:hsl(221, 87%, 60%)">=</span><span class="token plain"> TimeSliceOrchestratorClient</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">(</span><span class="token plain">target</span><span class="token operator" style="color:hsl(221, 87%, 60%)">=</span><span class="token string" style="color:hsl(119, 34%, 47%)">"orchestrator:50051"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token decorator annotation punctuation" style="color:hsl(119, 34%, 47%)">@orchestrator</span><span class="token decorator annotation punctuation" style="color:hsl(119, 34%, 47%)">.</span><span class="token decorator annotation punctuation" style="color:hsl(119, 34%, 47%)">on_accelerators</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">(</span><span class="token plain">group_id</span><span class="token operator" style="color:hsl(221, 87%, 60%)">=</span><span class="token string" style="color:hsl(119, 34%, 47%)">"trainer-group"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token keyword" style="color:hsl(301, 63%, 40%)">def</span><span class="token plain"> </span><span class="token function" style="color:hsl(221, 87%, 60%)">train_phase</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">(</span><span class="token plain">model</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"> trajectories</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">)</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token keyword" style="color:hsl(301, 63%, 40%)">return</span><span class="token plain"> model</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">.</span><span class="token plain">update</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">(</span><span class="token plain">trajectories</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token decorator annotation punctuation" style="color:hsl(119, 34%, 47%)">@orchestrator</span><span class="token decorator annotation punctuation" style="color:hsl(119, 34%, 47%)">.</span><span class="token decorator annotation punctuation" style="color:hsl(119, 34%, 47%)">on_accelerators</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">(</span><span class="token plain">group_id</span><span class="token operator" style="color:hsl(221, 87%, 60%)">=</span><span class="token string" style="color:hsl(119, 34%, 47%)">"sampler-group"</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token keyword" style="color:hsl(301, 63%, 40%)">def</span><span class="token plain"> </span><span class="token function" style="color:hsl(221, 87%, 60%)">generate_phase</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">(</span><span class="token plain">model</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"> prompts</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">)</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token keyword" style="color:hsl(301, 63%, 40%)">return</span><span class="token plain"> model</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">.</span><span class="token plain">generate</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">(</span><span class="token plain">prompts</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token comment" style="color:hsl(230, 4%, 64%)"># Standard sequential loop — interleaved with other jobs under the hood</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token keyword" style="color:hsl(301, 63%, 40%)">for</span><span class="token plain"> epoch </span><span class="token keyword" style="color:hsl(301, 63%, 40%)">in</span><span class="token plain"> </span><span class="token builtin" style="color:hsl(119, 34%, 47%)">range</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">(</span><span class="token plain">EPOCHS</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">)</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    trajectories </span><span class="token operator" style="color:hsl(221, 87%, 60%)">=</span><span class="token plain"> generate_phase</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">(</span><span class="token plain">policy</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"> dataset</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    rewards </span><span class="token operator" style="color:hsl(221, 87%, 60%)">=</span><span class="token plain"> compute_rewards</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">(</span><span class="token plain">trajectories</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">)</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    train_phase</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">(</span><span class="token plain">policy</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">,</span><span class="token plain"> rewards</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">)</span><br></div></code></pre></div></div>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="current-release-and-future-outlook">Current Release and Future Outlook<a href="https://llm-d.ai/blog/rl-post-training-co-operative-time-slicing#current-release-and-future-outlook" class="hash-link" aria-label="Direct link to Current Release and Future Outlook" title="Direct link to Current Release and Future Outlook" translate="no">​</a></h2>
<p>Today, llm-d releases the Snapshot Agent along with an <a href="https://github.com/llm-d-incubation/llm-d-rl-time-slicing/blob/main/guides/snapshot-agent/README.md" target="_blank" rel="noopener noreferrer" class="">Integration Guide</a> for integrating it into managed multi-tenant RL services to support full fine-tuning. Additionally, there is a new  <a href="https://github.com/llm-d-incubation/llm-d-rl-time-slicing/tree/main/guides/rl-frameworks/slime" target="_blank" rel="noopener noreferrer" class="">Slime Integration Guide</a> demonstrating how time-slicing can help optimize RL jobs built with the Slime framework</p>
<p>Here's what comes next:</p>
<ul>
<li class=""><strong>Expanding the Snapshot Agent</strong>: Upcoming backends will enable ultra-fast snapshots and selective checkpointing that saves only specific memory regions such as LoRA adapter weights. Together, these unlock faster context switches for full fine-tuning workloads and open up new use cases such as multi-tenant RL services that time-slice between tenants by swapping only adapter state.</li>
<li class=""><strong>Accelerator Orchestrator and Timeslice Client</strong>: The Orchestrator coordinates time-slicing across multiple jobs, managing cooperative lock queues and driving context switches at phase boundaries. Alongside it, a lightweight client library will allow any RL application to integrate using a two-call API: <code>acquire()</code> before the accelerator phase and <code>yield()</code> after.</li>
<li class=""><strong>Framework Integrations</strong>: Future well-lit paths will integrate with slime, veRL, and other popular RL training frameworks, making it easy for researchers to adopt time-slicing without leaving their existing training stack.</li>
<li class=""><strong>Simplified Onboarding and Intelligent Job Placement</strong>: Ongoing work will simplify platform deployment and introduce a component that automatically identifies time-sliceable workloads and makes intelligent job placement decisions, eliminating the need for users to manually identify and group compatible workloads.</li>
<li class=""><strong>Expanding Accelerator Support</strong>: In line with llm-d's hardware-agnostic mission, the platform is designed to span multiple accelerator architectures, starting with GPUs and expanding to TPUs and beyond.</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="help-shape-the-future-of-sig-rl">Help Shape the Future of SIG-RL<a href="https://llm-d.ai/blog/rl-post-training-co-operative-time-slicing#help-shape-the-future-of-sig-rl" class="hash-link" aria-label="Direct link to Help Shape the Future of SIG-RL" title="Direct link to Help Shape the Future of SIG-RL" translate="no">​</a></h3>
<p>Building robust, highly optimized RL infrastructure requires tight collaboration with the engineers and researchers running these workloads at scale.</p>
<p>If you are currently wrestling with low GPU utilization, synchronization stalls, or complex scheduling logic in your post-training pipelines, the community welcomes your feedback and contributions:</p>
<ul>
<li class=""><strong>Use Time-Slicing for your RL jobs</strong>: Try out the reference implementations in the <a href="https://github.com/llm-d-incubation/llm-d-rl-time-slicing/tree/main" target="_blank" rel="noopener noreferrer" class="">time-slicing repository</a>.</li>
<li class=""><strong>Explore the Code</strong>: Visit the repositories under the llm-d GitHub organization.</li>
<li class=""><strong>Join the Discussion</strong>: Join the <code>#sig-rl</code> channel in the <a href="https://llm-d.slack.com/" target="_blank" rel="noopener noreferrer" class="">llm-d Slack</a>.</li>
<li class=""><strong>Contribute</strong>: Share your reference implementations, benchmarks, and edge cases to help refine this well-lit path.</li>
</ul>]]></content:encoded>
            <author>poonaml@google.com (Poonam Lamba)</author>
            <category>blog posts</category>
            <category>Updates</category>
            <category>llm-d release news</category>
            <category>RL</category>
        </item>
        <item>
            <title><![CDATA[llm-d v0.8: From Platform to Control Plane]]></title>
            <link>https://llm-d.ai/blog/llm-d-v0.8-from-platform-to-control-plane</link>
            <guid>https://llm-d.ai/blog/llm-d-v0.8-from-platform-to-control-plane</guid>
            <pubDate>Wed, 24 Jun 2026 09:00:00 GMT</pubDate>
            <description><![CDATA[llm-d v0.8 graduates Flow Control, Batch Gateway, and multi-modal serving to production, extends beyond Kubernetes with RL/Slurm support, and aligns with upstream vLLM — sharpening the project's identity as an inference control plane for any environment.]]></description>
            <content:encoded><![CDATA[<p>If v0.7 was about making features deployable — standalone mode, Kustomize, documentation from scratch — then v0.8 is the payoff. Flow Control, Batch Gateway, and multi-modal serving graduate from experimental to production. The routing layer reaches beyond Kubernetes into RL training loops. And the image pipeline simplifies from a growing matrix of custom builds to upstream vLLM images with llm-d as the control plane on top. Three axes define this release: graduating capabilities that were introduced in v0.7 to production readiness, extending llm-d into non-Kubernetes environments for reinforcement learning and Slurm-based research, and aligning the project's identity around what it actually is — an inference control plane, not a fork of any engine underneath it.</p>
<p>The scope of what llm-d orchestrates has broadened considerably. A single deployment can now serve interactive chat, batch processing, multi-modal requests, and agentic multi-step workflows — with routing intelligence that understands the differences between them. SGLang joins vLLM as a first-class inference engine across most well-lit paths, and the first <a href="https://github.com/llm-d/llm-d/tree/release-0.8/guides/agentic-serving" target="_blank" rel="noopener noreferrer" class="">agentic serving guide</a> lands as a new workload-level well-lit path. Forty-eight new contributors joined the project since v0.6, more than doubling v0.7's twenty-three, reflecting broadening adoption across the industry.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="delivering-on-promises-feature-graduation">Delivering on Promises: Feature Graduation<a href="https://llm-d.ai/blog/llm-d-v0.8-from-platform-to-control-plane#delivering-on-promises-feature-graduation" class="hash-link" aria-label="Direct link to Delivering on Promises: Feature Graduation" title="Direct link to Delivering on Promises: Feature Graduation" translate="no">​</a></h2>
<p><strong>Flow Control</strong> moves from experimental to production. The centralized request queuing and admission control system introduced in v0.7 now ships with production guides for multi-tenant deployments. Flow Control classifies incoming requests by a FlowKey combining Fairness ID and Priority, maintains separate in-memory queues per flow, and dispatches based on priority bands, tenant fairness cycling, and request ordering. The result is no-regret scheduling: under saturation, the router holds requests rather than committing them to already-overloaded backend queues. The defaults still mimic first-come-first-served behavior, so existing deployments see no change until operators opt into multi-tenant policy.</p>
<p><strong>Batch Gateway</strong> graduates to production with enterprise storage backend hardening. The OpenAI-compatible <code>/v1/batches</code> and <code>/v1/files</code> API handles up to 50,000 requests per batch job, with pluggable storage across PostgreSQL or Redis/Valkey for metadata, Redis/Valkey for queue and event streams, and S3 or filesystem for input/output files. Batch traffic coexists with interactive serving on shared infrastructure through integration with Flow Control backpressure, so operators no longer need to maintain separate clusters for offline workloads.</p>
<p><strong>Multi-modal serving</strong> — image and text models like LLaVA and Qwen-VL — gains production guides with end-to-end testing, including disaggregated prefill/decode paths for multi-modal inputs. The inference simulator now supports multi-modal payloads, making it possible to validate routing behavior without provisioning GPU hardware.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="upstream-not-fork-aligning-with-vllm">Upstream, Not Fork: Aligning with vLLM<a href="https://llm-d.ai/blog/llm-d-v0.8-from-platform-to-control-plane#upstream-not-fork-aligning-with-vllm" class="hash-link" aria-label="Direct link to Upstream, Not Fork: Aligning with vLLM" title="Direct link to Upstream, Not Fork: Aligning with vLLM" translate="no">​</a></h2>
<p>One of the most consequential changes in v0.8 is also one of the simplest to describe: llm-d no longer builds its own vLLM images for most platforms.</p>
<p>The default GPU image is now <code>vllm/vllm-openai:v0.23.0</code> — the upstream release, unmodified. AMD ROCm moves to <code>vllm/vllm-openai-rocm</code>. Intel XPU moves to the prebuilt upstream vLLM XPU image. The custom <code>llm-d-cuda-gb200</code>, <code>llm-d-xpu</code>, and <code>llm-d-rocm</code> images are removed. The <code>llm-d-cuda</code> image remains available for advanced builds that require custom wheels (DeepGEMM, DeepEP), but it is no longer the default path.</p>
<p>This is not just a packaging simplification — it is a statement about what llm-d is. The project is a control plane that wraps inference engines, not a distribution that replaces them. When vLLM ships a release, llm-d users get it directly. When operators need to pin a specific vLLM commit for a hotfix, they build that image themselves and point llm-d at it. The control plane — the router, the endpoint picker, the KV cache management layer, the autoscaler — is where llm-d's value lives.</p>
<p>The component renames in this release reflect the same thinking. <code>llm-d-inference-scheduler</code> becomes <code>llm-d-router-endpoint-picker</code>. <code>llm-d-routing-sidecar</code> becomes <code>llm-d-router-disagg-sidecar</code>. The names now describe function rather than aspiration: these are components of the llm-d Router, not a standalone scheduling system.</p>
<p>HPU (Intel Gaudi) support is removed in this release. The upstream vLLM project does not currently maintain Gaudi images, and maintaining a custom build path for a single accelerator ran counter to the upstream-first direction. If upstream vLLM adds Gaudi support, llm-d will pick it up automatically.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="beyond-kubernetes-rl-slurm-and-file-discovery">Beyond Kubernetes: RL, Slurm, and File Discovery<a href="https://llm-d.ai/blog/llm-d-v0.8-from-platform-to-control-plane#beyond-kubernetes-rl-slurm-and-file-discovery" class="hash-link" aria-label="Direct link to Beyond Kubernetes: RL, Slurm, and File Discovery" title="Direct link to Beyond Kubernetes: RL, Slurm, and File Discovery" translate="no">​</a></h2>
<p>Every previous llm-d release assumed Kubernetes. v0.8 breaks that assumption.</p>
<p>The <strong>FileDiscovery plugin</strong> enables llm-d's routing layer to discover inference endpoints through filesystem-based service discovery rather than the Kubernetes API. Operators write endpoint addresses to a file; the router watches it. This unlocks llm-d on Slurm clusters, bare-metal research labs, and any environment where Kubernetes is not present or not wanted.</p>
<p>This matters most for <strong>reinforcement learning workflows</strong>. RL training loops require high-throughput inference for rollout generation — the model being trained serves thousands of inference requests per training step. These workloads typically run on Slurm, not Kubernetes, and they need the inference scheduler to be embedded in the training loop rather than running as a separate service.</p>
<p>This is where the "From Platform to Control Plane" thesis lands concretely. llm-d's routing intelligence — prefix cache locality, saturation awareness, flow control — is useful anywhere inference happens, not just inside a Kubernetes cluster.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="intelligent-routing-for-the-agentic-era">Intelligent Routing for the Agentic Era<a href="https://llm-d.ai/blog/llm-d-v0.8-from-platform-to-control-plane#intelligent-routing-for-the-agentic-era" class="hash-link" aria-label="Direct link to Intelligent Routing for the Agentic Era" title="Direct link to Intelligent Routing for the Agentic Era" translate="no">​</a></h2>
<p>Workloads are getting more complex. A single user session might involve a chain of inference calls — retrieval, reasoning, tool use, synthesis — each with different latency requirements, context dependencies, and failure modes. v0.8 adds routing intelligence designed for this reality.</p>
<p><strong>Agentic workload routing</strong> enables the router to understand multi-step inference patterns. Combined with <strong>Responses API support</strong>, llm-d can now serve OpenAI-compatible agentic endpoints where the model orchestrates tool calls and multi-turn reasoning. The router tracks session affinity and prefix cache state across the steps of an agentic workflow, keeping related requests on the same backend where prior KV cache is resident.</p>
<p><strong>DP-Aware scheduling</strong> graduates from its initial experimental form with <strong>WideEP</strong> support for DeepSeek-class MoE models. In expert-parallel deployments, different experts run on different GPU groups; the router needs to understand this topology to place requests on the correct data-parallel replica. The <a href="https://github.com/llm-d/llm-d/tree/release-0.8/guides/wide-ep-lws" target="_blank" rel="noopener noreferrer" class="">WideEP guide</a> has been migrated to the main example path with nightly CI coverage on GKE and CKS.</p>
<p><strong>Predicted latency scheduling</strong> receives a complete rewrite with a new production-ready guide. The latency predictor provides model-specific latency estimates that the endpoint picker uses for routing decisions, moving beyond queue-depth heuristics to predictions grounded in actual model serving characteristics. Nightly CI now validates that the predictor is serving real predictions rather than falling back to heuristics — asserting that the optimization path operators configured is actually running.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="engine-agnostic-sglang-as-a-first-class-backend">Engine-Agnostic: SGLang as a First-Class Backend<a href="https://llm-d.ai/blog/llm-d-v0.8-from-platform-to-control-plane#engine-agnostic-sglang-as-a-first-class-backend" class="hash-link" aria-label="Direct link to Engine-Agnostic: SGLang as a First-Class Backend" title="Direct link to Engine-Agnostic: SGLang as a First-Class Backend" translate="no">​</a></h2>
<p>v0.8 makes llm-d engine-agnostic. SGLang joins vLLM as a supported inference backend across the <a href="https://github.com/llm-d/llm-d/tree/release-0.8/guides/optimized-baseline" target="_blank" rel="noopener noreferrer" class="">optimized baseline</a>, <a href="https://github.com/llm-d/llm-d/tree/release-0.8/guides/precise-prefix-cache-routing" target="_blank" rel="noopener noreferrer" class="">precise prefix cache routing</a>, <a href="https://github.com/llm-d/llm-d/tree/release-0.8/guides/tiered-prefix-cache" target="_blank" rel="noopener noreferrer" class="">tiered prefix cache</a>, and <a href="https://github.com/llm-d/llm-d/tree/release-0.8/guides/pd-disaggregation" target="_blank" rel="noopener noreferrer" class="">P/D disaggregation</a> well-lit paths. The only guide not yet covered is wide expert parallelism.</p>
<p>The prefix cache scorer, previously vLLM-only, now works with SGLang backends with optimal configuration and benchmark numbers. This makes llm-d's most impactful routing optimization — prefix-cache-aware request placement — available regardless of which engine runs underneath. Combined with the upstream vLLM image alignment described above, the message is clear: llm-d is a control plane for inference engines, not a wrapper around any single one.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="multi-tier-kv-cache-and-hybrid-model-support">Multi-Tier KV Cache and Hybrid Model Support<a href="https://llm-d.ai/blog/llm-d-v0.8-from-platform-to-control-plane#multi-tier-kv-cache-and-hybrid-model-support" class="hash-link" aria-label="Direct link to Multi-Tier KV Cache and Hybrid Model Support" title="Direct link to Multi-Tier KV Cache and Hybrid Model Support" translate="no">​</a></h2>
<p>KV cache management continues to be one of llm-d's deepest areas of investment. v0.8 extends the multi-tier architecture introduced in previous releases with two significant additions.</p>
<p><strong>HMA-aware KV offloading</strong> adds support for hybrid model architectures that mix attention mechanisms — full attention, sliding-window, Mamba/SSM, and linear attention — in the same model. These architectures, exemplified by Jamba and emerging hybrid designs, allocate KV cache differently across layer types. The KV cache management layer now understands the Hybrid Memory Allocator (HMA) in vLLM, enabling offloading from GPU HBM to CPU DRAM to persistent storage while respecting the heterogeneous memory layout. For a deep dive into HMA-aware offloading, see the companion <a class="" href="https://llm-d.ai/blog/serving-hybrid-models-at-scale-in-llm-d">blog post on serving hybrid models at scale</a>.</p>
<p>The <strong>Mooncake connector</strong> adds Alibaba's KV cache transfer engine as a NIXL backend for both P/D disaggregation transfers and <a href="https://github.com/llm-d/llm-d/tree/release-0.8/guides/tiered-prefix-cache" target="_blank" rel="noopener noreferrer" class="">tiered offloading</a>. Combined with the existing UCX and UCCL backends, this gives operators three transfer engines to choose from based on their network fabric and deployment constraints. For comprehensive benchmarks comparing these backends across RoCE, InfiniBand, and TCP, see the <a class="" href="https://llm-d.ai/blog/networking-for-distributed-inference-llm-d">networking for distributed inference</a> blog post.</p>
<p>Storage events enable reactive tier management — the KV cache layer can respond to storage-level signals (capacity pressure, eviction notifications) rather than relying solely on proactive policies. This is a foundation for more sophisticated tiered caching strategies in future releases.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="new-well-lit-paths-and-ecosystem-reach">New Well-Lit Paths and Ecosystem Reach<a href="https://llm-d.ai/blog/llm-d-v0.8-from-platform-to-control-plane#new-well-lit-paths-and-ecosystem-reach" class="hash-link" aria-label="Direct link to New Well-Lit Paths and Ecosystem Reach" title="Direct link to New Well-Lit Paths and Ecosystem Reach" translate="no">​</a></h2>
<p>Each release expands the set of tested, documented deployment patterns — what we call well-lit paths. v0.8 adds several that reflect the project's broadening ecosystem.</p>
<p><strong>TensorRT-LLM</strong> receives a <a href="https://github.com/llm-d/llm-d/tree/release-0.8/guides/optimized-baseline/modelserver/gpu/trtllm" target="_blank" rel="noopener noreferrer" class="">full recipe and optimized baseline guide</a>. Alongside SGLang, this extends llm-d's engine coverage to three inference backends. The recipe uses <code>trtllm-serve</code> with llm-d's router handling prefix-cache-aware scheduling on top.</p>
<p><strong>DeepSeek-V4 on GB200 NVL72</strong> gets a <a href="https://github.com/llm-d/llm-d/tree/release-0.8/guides/wide-ep-lws/modelserver/gpu/vllm-deepseek-v4" target="_blank" rel="noopener noreferrer" class="">dedicated deployment guide</a>, running a frontier MoE model on NVIDIA's latest hardware with WideEP expert parallelism. The guide includes API server scaling (bumped from 1 to 4 replicas) and NVSHMEM configuration for the GB200's NVLink domain.</p>
<p><strong>Envoy AI Gateway</strong> installation instructions <a href="https://github.com/llm-d/llm-d/tree/release-0.8/guides/recipes/gateway/envoy-ai-gateway" target="_blank" rel="noopener noreferrer" class="">land as a new guide</a>, offering an alternative gateway layer alongside Istio and kgateway/agentgateway. This reflects the project's philosophy of providing pluggable infrastructure components rather than mandating a specific stack.</p>
<p>The <strong>Workload Variant Autoscaler (WVA)</strong> CRD migrates to the <code>llm-d.ai</code> API group, with improved observability and a replicas rebalancing guide. Infrastructure dependencies update to Istio 1.29.4, kgateway/agentgateway v2.3.3, and Gateway API Inference Extension v1.5.0, with the GAIE Helm charts now published from the llm-d-router OCI registry.</p>
<p>P/D disaggregation guides expand with <a href="https://github.com/llm-d/llm-d/tree/release-0.8/guides/pd-disaggregation" target="_blank" rel="noopener noreferrer" class="">GKE RDMA/DRA/DRANET configurations</a> for high-performance KV cache transfer, and preflight networking checks that validate RDMA bindings and NIC configuration before vLLM starts serving traffic.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="what-this-means-for-you">What This Means for You<a href="https://llm-d.ai/blog/llm-d-v0.8-from-platform-to-control-plane#what-this-means-for-you" class="hash-link" aria-label="Direct link to What This Means for You" title="Direct link to What This Means for You" translate="no">​</a></h2>
<p><strong>Platform teams</strong> running llm-d in production can now graduate Flow Control and Batch Gateway from experimental flags to production configuration. The shift to upstream vLLM images simplifies the image pipeline — no more tracking llm-d-specific builds for each accelerator platform. The WVA CRD migration to <code>llm-d.ai</code> is a breaking change that requires updating existing autoscaling configurations, but it aligns the resource model with the project's long-term API surface.</p>
<p><strong>ML researchers</strong> working on reinforcement learning can now use llm-d's routing intelligence without Kubernetes, bringing prefix-cache-aware scheduling into Slurm-based training loops, where it directly reduces the wall-clock time of RL rollout generation. If your RL pipeline spends time on inference and you want cache-aware routing without re-architecting onto Kubernetes, this is built for you.</p>
<p><strong>Agentic application architects</strong> building multi-step inference workflows get native routing support for session affinity, Responses API compatibility, and prefix cache awareness across the steps of an agent chain. Combined with SGLang support in the prefix cache scorer, the agentic routing path is no longer tied to a single inference engine.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="what-is-next">What Is Next?<a href="https://llm-d.ai/blog/llm-d-v0.8-from-platform-to-control-plane#what-is-next" class="hash-link" aria-label="Direct link to What Is Next?" title="Direct link to What Is Next?" translate="no">​</a></h2>
<p>The <a href="https://github.com/llm-d/llm-d/issues/1945" target="_blank" rel="noopener noreferrer" class="">v0.9 milestone</a> targets early August and continues the trajectory this release established.</p>
<p><strong>Agentic inference patterns</strong> are a primary focus. v0.8 introduced agentic routing and Responses API support; v0.9 aims to make the agentic story end-to-end — from request classification through multi-step orchestration to session-level observability. The goal is that operators deploying agentic workloads on llm-d get routing intelligence that understands the structure of agent chains, not just individual requests.</p>
<p><strong>RL workflow maturity</strong> The initial integration demonstrated feasibility; v0.9 targets usable end-to-end RL workflows with deeper scheduler integration, more sophisticated cache management for rollout patterns, and broader framework support.</p>
<p><strong>Scaling and hardening</strong> turns attention to the control plane itself. As llm-d deployments grow — more pods, more models, higher QPS — the router and endpoint picker need to scale horizontally without becoming bottlenecks. v0.9 addresses this directly with EPP horizontal scaling and smarter autoscaling policies.</p>
<p><strong>Continued accelerator and runtime expansion</strong> includes broader SGLang CI coverage, AMD ecosystem growth, and ongoing upstream alignment. The direction is clear: llm-d supports every runtime and accelerator that upstream vLLM and SGLang support, with the control plane adapting to each platform's characteristics rather than requiring platform-specific builds.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="community-and-contribution">Community and Contribution<a href="https://llm-d.ai/blog/llm-d-v0.8-from-platform-to-control-plane#community-and-contribution" class="hash-link" aria-label="Direct link to Community and Contribution" title="Direct link to Community and Contribution" translate="no">​</a></h2>
<p>Forty-eight new contributors joined the project since v0.6, more than doubling the contributor base added in v0.7. The project's velocity continues to accelerate, with the v0.8 cycle delivering feature graduation, ecosystem expansion, and a clearer architectural identity simultaneously.</p>
<p>To get started with llm-d v0.8:</p>
<ul>
<li class=""><strong>Documentation</strong>: <a href="https://llm-d.ai/" target="_blank" rel="noopener noreferrer" class="">llm-d.ai</a></li>
<li class=""><strong>Guides</strong>: <a href="https://github.com/llm-d/llm-d/tree/main/docs/well-lit-paths" target="_blank" rel="noopener noreferrer" class="">Well-lit paths</a> for optimized baseline, prefix-cache routing, P/D disaggregation, batch gateway, flow control, and more</li>
<li class=""><strong>Release notes</strong>: <a href="https://github.com/llm-d/llm-d/releases/tag/v0.8.0" target="_blank" rel="noopener noreferrer" class="">v0.8.0 on GitHub</a></li>
<li class=""><strong>Slack community</strong>: Join the conversation at <a href="https://llm-d.ai/slack" target="_blank" rel="noopener noreferrer" class="">llm-d.ai/slack</a></li>
</ul>
<p>Follow <a href="https://twitter.com/llm_d" target="_blank" rel="noopener noreferrer" class="">@llm_d</a> on Twitter/X, <a href="https://bsky.app/profile/llm-d.bsky.social" target="_blank" rel="noopener noreferrer" class="">llm-d on Bluesky</a>, or <a href="https://www.linkedin.com/company/llm-d/" target="_blank" rel="noopener noreferrer" class="">llm-d on LinkedIn</a> for updates. Check <a href="https://llm-d.ai/community/events" target="_blank" rel="noopener noreferrer" class="">llm-d.ai/community/events</a> for upcoming community events and <a href="https://www.youtube.com/@llm-d" target="_blank" rel="noopener noreferrer" class="">llm-d on YouTube</a> for talks and demos. Come build with us.</p>]]></content:encoded>
            <category>Releases</category>
            <category>Announcements</category>
            <category>llm-d release news</category>
        </item>
        <item>
            <title><![CDATA[Networking for Distributed Inference in llm-d]]></title>
            <link>https://llm-d.ai/blog/networking-for-distributed-inference-llm-d</link>
            <guid>https://llm-d.ai/blog/networking-for-distributed-inference-llm-d</guid>
            <pubDate>Tue, 23 Jun 2026 09:00:00 GMT</pubDate>
            <description><![CDATA[How llm-d transfers the KV Cache between prefill and decode workers — NIXL's pluggable backend architecture, the new UCCL backend, head-to-head benchmarks of UCCL/UCX/Mooncake over RDMA and TCP, and preflight tooling for catching networking misconfigurations before serving traffic.]]></description>
            <content:encoded><![CDATA[<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="networking-the-critical-path-in-pd-disaggregation">Networking: The Critical Path in P/D Disaggregation<a href="https://llm-d.ai/blog/networking-for-distributed-inference-llm-d#networking-the-critical-path-in-pd-disaggregation" class="hash-link" aria-label="Direct link to Networking: The Critical Path in P/D Disaggregation" title="Direct link to Networking: The Critical Path in P/D Disaggregation" translate="no">​</a></h2>
<p>llm-d's prefill-decode disaggregation unlocks significant efficiency gains by separating compute-heavy prefill from memory-bandwidth-heavy decode onto dedicated GPU pools. But it introduces a hard dependency on the network: the KV Cache must be transferred from prefill to decode <em>before the first token can be generated</em>. This transfer time lands directly on the Time to First Token (TTFT) — making networking a first-order concern for end-to-end inference latency.</p>
<p>This post dives into llm-d's networking stack — how it works today and how it's evolving in collaboration with NVIDIA.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="overview">Overview<a href="https://llm-d.ai/blog/networking-for-distributed-inference-llm-d#overview" class="hash-link" aria-label="Direct link to Overview" title="Direct link to Overview" translate="no">​</a></h2>
<p>llm-d relies on <a href="https://developer.nvidia.com/blog/enhancing-distributed-inference-performance-with-the-nvidia-inference-transfer-library/" target="_blank" rel="noopener noreferrer" class="">NIXL (NVIDIA Inference Xfer Library)</a> to perform KV Cache transfers between prefill and decode workers. NIXL exposes a unified API for transfers, abstracting the underlying transfer library behind — UCX over RDMA network, libfabric over AWS EFA, and other backends. This lets vLLM initiate transfers without worrying about the specifics of the network fabric or the transport (RDMA, TCP, etc.). Building on NIXL gives llm-d several properties out of the box:</p>
<ul>
<li class=""><strong>Unified abstraction</strong>: a single API that works across diverse accelerators (CUDA, ROCm, XPUs), network fabrics/protocols (InfiniBand, RoCE, EFA, TCP), memory types (GPU VRAM, CPU DRAM), and storage types (local SSD, remote storage such as HF3FS, S3, etc.) — making llm-d easily portable across cloud providers and on-premises deployments.</li>
<li class=""><strong>Modular and extensible</strong>: NIXL's plugin architecture lets new transport and device backends be added without modifying the core library or llm-d, so that llm-d can support evolving deployment scenarios.</li>
</ul>
<p>On top of NIXL, llm-d adds cluster-level services that bridge what NIXL can provide in terms of transfer library, and end-to-end AI inference performance:</p>
<ul>
<li class=""><strong>Tuning across the stack</strong>: each backend (UCX, UCCL, libfabric, ...) auto-tunes for its target environment, but a real deployment still depends on RDMA parameters, NIC affinity, GPU topology, multi-rail configuration, MTU, etc. llm-d provides validated defaults and enables per-deployment customization of the NIXL backends.</li>
<li class=""><strong>Observability</strong>: llm-d provides a unified dashboard collecting NIXL's telemetry (transfer-time, transfer throughput, etc.) and application-level performance (TTFT, E2E latency, etc.) enabling operators to detect and diagnose failures.</li>
<li class=""><strong>Per-cluster verification</strong>: performance characteristics differ across GPU platforms (NVIDIA H200, AMD MI300X, Intel Gaudi), interconnects (NVLink, PCIe, InfiniBand, Ethernet), and NICs (ConnectX-7, Broadcom, AWS EFA). llm-d provides preflight checks and benchmark tooling so each cluster can establish and track its own baseline.</li>
</ul>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="design-of-nixl-and-future-roadmap">Design of NIXL and Future Roadmap<a href="https://llm-d.ai/blog/networking-for-distributed-inference-llm-d#design-of-nixl-and-future-roadmap" class="hash-link" aria-label="Direct link to Design of NIXL and Future Roadmap" title="Direct link to Design of NIXL and Future Roadmap" translate="no">​</a></h2>
<p>The earlier <a href="https://developer.nvidia.com/blog/enhancing-distributed-inference-performance-with-the-nvidia-inference-transfer-library/" target="_blank" rel="noopener noreferrer" class="">NIXL blog post</a> covers the general NIXL model: agents register memory or storage regions, exchange the metadata needed for access, and issue nonblocking transfers through a unified descriptor API. This post focuses on the backend side of that architecture, and in particular on how the UCCL backend brings UCCL P2P into NIXL for GPU memory transfers used in distributed inference. The same backend architecture also supports storage plugins for use cases such as checkpointing and KV cache offload/reload, across file, block, or object storage.</p>
<p>NIXL backends are platform-specific implementations behind a common southbound plugin interface. This lets each backend use the native capabilities of its target environment, instead of forcing every transport into a least-common-denominator path: Libfabric can optimize around OFI/EFA-style cloud RDMA deployments, Azure Blob can map NIXL transfers onto Azure object storage, and UCCL can bring its software-controlled GPU networking stack into NIXL.</p>
<p>A backend mainly declares its capabilities, such as supported memory types, local or remote transfer support, and notification support, then implements clean primitives for registration, metadata serialization/loading, connection handling where needed, and prepare/post (start)/check/release transfer operations. NIXL handles the surrounding agent machinery: plugin discovery and loading, descriptor validation, metadata encapsulation and exchange, backend selection, and the asynchronous request lifecycle. NIXL also provides default agent-level telemetry independent of the selected backend, including registration sizes, transfer bytes and request counts, post and completion timing, and error counts. Additional observability capabilities are being discussed, such as notifying users when NIXL observes sustained performance degradation or exposing more infrastructure-level signals alongside NIXL metrics.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="how-does-llm-d-work-with-nixl">How does llm-d work with NIXL<a href="https://llm-d.ai/blog/networking-for-distributed-inference-llm-d#how-does-llm-d-work-with-nixl" class="hash-link" aria-label="Direct link to How does llm-d work with NIXL" title="Direct link to How does llm-d work with NIXL" translate="no">​</a></h2>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="nixl-pd-connector">NIXL PD Connector<a href="https://llm-d.ai/blog/networking-for-distributed-inference-llm-d#nixl-pd-connector" class="hash-link" aria-label="Direct link to NIXL PD Connector" title="Direct link to NIXL PD Connector" translate="no">​</a></h3>
<p><code>NixlConnector</code> is the core KV-cache transfer connector in vLLM's disaggregated serving architecture. It operates in a <strong>pull-based model</strong>: the decode worker (D) fetches KV cache blocks directly from the prefill worker's (P) GPU memory via one-sided RDMA p2p READs.</p>
<p>At the request level, a routing proxy coordinates P and D. Connections between P and D are established <strong>lazily</strong> (as shown in Figure 1): the first time D sees an unknown P engine it performs a background handshake that exchanges metadata over ZMQ, validates a compatibility hash, and bootstraps the RDMA path — without blocking the engine loop. New instances are paired automatically following the same mechanism, with no centralized service-discovery plane required.</p>
<p><img decoding="async" loading="lazy" alt="Timeline diagram of how prefill and decode coordinate with routing proxy and transfer KV Cache" src="https://llm-d.ai/assets/images/figure1-pd-coordination-e9ed1f0779e6af44231e89e1f4f2097c.png" width="770" height="632" class="img_ev3q">
<em>Figure 1: Timeline diagram of how prefill and decode coordinate with routing proxy and transfer KV Cache.</em></p>
<p>Once connected, D posts an asynchronous NIXL READ and returns immediately. On completion, NIXL notifies P to free the blocks. Transfers are <em>zero-copy</em> — NIXL reads directly from P's KV cache into D's KV cache with no staging buffers, so zero extra bytes are moved regardless of the parallelism configuration. The connector works out of the box with vLLM optimizations such as prefix caching (D skips blocks it already holds, avoiding RDMA transfers entirely on a full cache hit), chunked prefill, data parallelism, and CPU host-buffer offloading.</p>
<p>Several additional features are built on top of this core flow:</p>
<ul>
<li class=""><strong>Heterogeneous tensor parallelism.</strong> P and D can run with different TP sizes, giving operators an extra scaling knob to independently tune each phase. Each D worker dynamically computes which remote TP rank(s) to read from and fetches the appropriate tensor slice, with no intermediate copies or extra bytes transferred. Different KV block sizes across P and D are also supported.</li>
<li class=""><strong>Hybrid Memory Allocator (HMA) support.</strong> <code>NixlConnector</code> integrates with vLLM's hybrid memory allocator, enabling disaggregated serving for architectures that mix attention and SSM layers (e.g. Jamba, Mamba-based hybrids). Attention KV cache blocks and SSM convolutional state are each transferred directly between the corresponding memory regions with no extra copies or staging.</li>
<li class=""><strong>Fault tolerance.</strong> P holds KV blocks under a configurable lease (<code>kv_lease_duration</code>) with periodic heartbeat extensions from D, so blocks are freed automatically if D crashes — preventing memory stranding without a liveness protocol. D-side KV load failures (e.g. a crashed P instance) are handled by the <code>kv_load_failure_policy</code>: <code>fail</code> (default) returns an error immediately, while <code>recompute</code> falls back to local prefill on D. On scale-down, vLLM's abort path sends NIXL notifications to free remote blocks; on scale-up, lazy handshake means new pods become available without any coordinated rollout.</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="uccl-backend-for-nixl">UCCL Backend for NIXL<a href="https://llm-d.ai/blog/networking-for-distributed-inference-llm-d#uccl-backend-for-nixl" class="hash-link" aria-label="Direct link to UCCL Backend for NIXL" title="Direct link to UCCL Backend for NIXL" translate="no">​</a></h3>
<p>UCX supports the current use-case of KV Cache transfers across heterogeneous hardware, but the growing diversity of transports and accelerators makes broad hardware support increasingly challenging. <a href="https://github.com/uccl-project/uccl" target="_blank" rel="noopener noreferrer" class="">UCCL (Unified Collective Communication Library)</a> is a new communication library designed to provide efficient, portable GPU networking for AI inference and training, including support for some emerging hardware platforms outside UCX's current scope. In llm-d v0.5, we have integrated our contribution of the UCCL backend into the NIXL transport library and we have been evolving it over the months to provide feature-parity with UCX such as dynamic transport selection, local (intra-node) transfers and performance optimizations.</p>
<p>UCCL exposes a point-to-point (P2P) transfer engine designed for KV cache and weight-transfer style traffic. This is the engine that the NIXL backend builds on, providing SM-free data movement and GPU-NIC topology awareness. It additionally provides a host-resident transport that runs fine-grained flow splitting, path selection, congestion control, and loss recovery in software while keeping bulk data on the GPUDirect/RDMA path. UCCL also provides a unified abstraction over vendor-specific collectives (NCCL, RCCL, etc.) and expert parallelism (EP), but those are outside the scope of this NIXL backend.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="performance-comparison-of-various-transport-backends-in-nixl">Performance Comparison of various Transport Backends in NIXL<a href="https://llm-d.ai/blog/networking-for-distributed-inference-llm-d#performance-comparison-of-various-transport-backends-in-nixl" class="hash-link" aria-label="Direct link to Performance Comparison of various Transport Backends in NIXL" title="Direct link to Performance Comparison of various Transport Backends in NIXL" translate="no">​</a></h2>
<p>We evaluate three NIXL transport backends — <strong>UCCL</strong>, <strong>UCX</strong>, and <strong>Mooncake</strong> — across three network transports: 100G RoCE, 400G NVIDIA Quantum-2 InfiniBand fabric, and 100G TCP. <a href="https://github.com/kvcache-ai/Mooncake" target="_blank" rel="noopener noreferrer" class="">Mooncake</a> is a KV cache transfer engine developed by Moonshot AI, designed for disaggregated LLM inference. It is supported as a backend plugin by NIXL. Mooncake exposes a high-performance transfer layer over RDMA and TCP, and serves as the transfer backbone in Moonshot's production Kimi serving infrastructure.</p>
<p>We used <a href="https://github.com/ai-dynamo/nixl/tree/main/benchmark/nixlbench" target="_blank" rel="noopener noreferrer" class="">nixlbench</a> as the benchmark, which includes measurement of the latency of bulk tensor transfers across GPU nodes, a workload representative of KV-cache migration in distributed LLM inference (prefill–decode disaggregation).</p>
<p>We tested transfers spanning 1–8 GB of total payload, reflecting KV Cache volumes typical of medium-to-long context workloads. For RoCE and TCP transfers, we used two nodes with NVIDIA H100 GPUs, ConnectX-7 NICs (one rail per GPU at 100 Gb/s, partitioned via SR-IOV for the 100 Gb/s configurations). RoCE and TCP modes use the same NICs; only the configured transport differs. For InfiniBand, we used two nodes with NVIDIA H200 GPUs connected using a NVIDIA Quantum-2 400 Gb/s InfiniBand network.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="rdma-transport-roce--infiniband">RDMA Transport (RoCE &amp; InfiniBand)<a href="https://llm-d.ai/blog/networking-for-distributed-inference-llm-d#rdma-transport-roce--infiniband" class="hash-link" aria-label="Direct link to RDMA Transport (RoCE &amp; InfiniBand)" title="Direct link to RDMA Transport (RoCE &amp; InfiniBand)" translate="no">​</a></h3>
<p>For RDMA, we test batch sizes of 1,000 and 10,000. In nixlbench, batch size controls the number of memory descriptors posted per transfer while the total payload size is the same — so a larger batch means each block is smaller, and the per-block transfer overhead is amortized over fewer bytes. This setup is representative of how vLLM handles KV cache: PagedAttention allocates the KV cache in fixed-size paged blocks, and a single sequence's KV cache can be spread across many non-contiguous pages on the GPU.</p>
<p><img decoding="async" loading="lazy" alt="NIXL RDMA: 100G vs 400G Network Comparison — bandwidth and latency for UCCL, UCX, and Mooncake at batch sizes 1000 and 10000" src="https://llm-d.ai/assets/images/figure2-rdma-100g-vs-400g-b2b133c1c8fe2a72018d2373b60cd91e.png" width="3094" height="2032" class="img_ev3q">
<em>Figure 2: GPU-to-GPU Transfer throughput and latency comparison of UCCL, UCX and Mooncake backend of NIXL over 100G (solid lines), and 400G (dotted lines) InfiniBand RDMA networks.</em></p>
<p><strong>100G RoCE network.</strong> On the 100GbE RoCE network, UCCL, UCX, and Mooncake all converge to roughly 12.0–12.2 GB/s — within 3% of the 12.5 GB/s theoretical line rate (without considering packet header overheads) for both batch sizes as shown in Figure 2. At this network speed, we can easily saturate the link and the choice of backend is effectively invisible in the bandwidth numbers, with only minor differences in latency.</p>
<p><strong>400G InfiniBand network.</strong> When we move to the 400 Gb/s fabric and keep blocks relatively large (1–8 MB, batch of 1000), UCCL and UCX both achieve ~49.5 GB/s (≈99% of the 50 GB/s line rate). We had to patch Mooncake to fix its topology detection in this cluster to ensure that it picks the right interface. Mooncake saturates at ~42 GB/s, roughly 84% of line rate — the gap is consistent with its higher per-block posting latency for read operations (~2–17 ms of accumulated post time per batch, versus ~12 µs and ~283 µs for UCCL and UCX respectively). The posting latency blocks the reader (decode worker) in its critical path, thus increasing the overall transfer time.</p>
<p>With the total transfer size fixed and the batch increased to 10,000, each individual block is much smaller and the per-block software overhead — descriptor preparation, posting, completion handling — is invoked far more frequently, and the raw network time per block shrinks to a few microseconds. The backends separate clearly:</p>
<ul>
<li class="">Both UCX and UCCL maintain ~49.5 GB/s across all transfer sizes, essentially matching their moderate-batch behavior and saturating the 400G link.</li>
<li class="">Mooncake stays flat around ~38–42 GB/s, limited by the same per-block post latency that capped it at moderate batch sizes.</li>
</ul>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="tcp-transport">TCP Transport<a href="https://llm-d.ai/blog/networking-for-distributed-inference-llm-d#tcp-transport" class="hash-link" aria-label="Direct link to TCP Transport" title="Direct link to TCP Transport" translate="no">​</a></h3>
<p>TCP bandwidth is inherently lower than RDMA: it is two-sided, typically incurs extra memory copies and potentially CPU and kernel (e.g. Linux) involvement in the data path. However, in some deployments it remains the only option due to deployment constraints. Hence, a viable transport option remains crucial in these deployments. The three backends behave very differently here. For GPU-to-GPU transfers, UCCL provides reasonable efficiency by achieving approximately 4.7–4.9 GB/s (~39 Gbps out of 100G), while UCX manages 0.55 GB/s (~4.4 Gbps) and Mooncake does not support GPU-to-GPU TCP transfers. We provide the reasons in the next subsection.</p>
<p><strong>GPU-to-GPU.</strong> This scenario of GPU-to-GPU transfers over TCP transport is where UCCL stands out the most. UCCL transfers 1 GB in 211 ms (avg) with a P99 of 217 ms — stable and consistent. UCX takes 1.8 s for the same transfer, nearly 9× slower, degrading further to 14.4 s at 8 GB (Figure 3). While UCX does not provide specific optimizations for GPU-to-GPU transfers over TCP, UCCL leverages NCCL's CUDA kernels in their send/recv APIs, which chunk a single transfer into multiple transfers for GPU-to-CPU and pipeline the network transfer over TCP. We observed that the Mooncake backend lacked support for GPU-to-GPU transfers over TCP.</p>
<p><img decoding="async" loading="lazy" alt="NIXL TCP GPU-to-GPU bandwidth and latency comparison between UCCL and UCX over 100G TCP" src="https://llm-d.ai/assets/images/figure3-tcp-gpu-to-gpu-60d53c9f828d8f52bc4ef9cb071e5543.png" width="2048" height="807" class="img_ev3q">
<em>Figure 3: GPU-to-GPU Transfer latency comparison of the UCCL, UCX and Mooncake backends of NIXL over 100G TCP Network.</em></p>
<p><strong>CPU-to-CPU.</strong> We also perform data transfers of buffers located in host memory because many KV cache management strategies offload cached context to host memory for later reuse, making the CPU-to-CPU path a part of the data transfer. This also isolates the TCP transport overhead from the intra-node (GPU-to-CPU) transfer overhead.</p>
<p>At 1 GB, UCCL completes in 216 ms, UCX in 263 ms (22% slower), and Mooncake in 298 ms (38% slower) as shown in Figure 4. The relative ordering is consistent across all transfer sizes: UCCL sustains ~4.9 GB/s, UCX ~4 GB/s and Mooncake ~3.5 GB/s. We notice UCX occasionally spikes in P99 latency for larger transfers.</p>
<p><img decoding="async" loading="lazy" alt="NIXL TCP CPU-to-CPU bandwidth and latency comparison between UCCL, UCX, and Mooncake over 100G TCP" src="https://llm-d.ai/assets/images/figure4-tcp-cpu-to-cpu-2c485ed7dd1dbff56451fa6efe298ffc.png" width="2048" height="807" class="img_ev3q">
<em>Figure 4: CPU-to-CPU Transfer latency comparison of the UCCL, UCX and Mooncake backends of NIXL over 100G TCP Network.</em></p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="verifying-networking-in-a-deployed-llm-d-cluster">Verifying Networking in a Deployed llm-d Cluster<a href="https://llm-d.ai/blog/networking-for-distributed-inference-llm-d#verifying-networking-in-a-deployed-llm-d-cluster" class="hash-link" aria-label="Direct link to Verifying Networking in a Deployed llm-d Cluster" title="Direct link to Verifying Networking in a Deployed llm-d Cluster" translate="no">​</a></h2>
<p>The benchmarking numbers above represent what the fabric <em>can</em> deliver. In a real deployment, the bandwidth llm-d actually sees is determined by a long chain of choices outside NIXL: pod scheduling, kernel and driver versions, and environment configuration. A small misconfiguration in any of these can silently cost half the bandwidth — and the symptom typically shows up as elevated TTFT, not as an obvious networking error. To close the gap between benchmark conditions and production behavior, llm-d operators need a way to validate the actual network path <em>before</em> vLLM starts serving traffic. To make this easier, we are building tooling that lets operators validate the network health directly from within the pods where llm-d will actually run, with minimal extra setup. This section describes the current flow.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="pre-flight-checks">Pre-flight Checks<a href="https://llm-d.ai/blog/networking-for-distributed-inference-llm-d#pre-flight-checks" class="hash-link" aria-label="Direct link to Pre-flight Checks" title="Direct link to Pre-flight Checks" translate="no">​</a></h3>
<p>To run tests before vLLM is started by llm-d, we use a "preflight" check script. The script gates execution of vLLM by running just before it starts: if all preflight checks succeed, the vLLM process inside the pod starts as before. The preflight checks are designed to run quickly so they do not materially delay llm-d model execution (at most a few seconds added).</p>
<p>However, if there are problems with Kubernetes pod networking or GPU configuration, the script may exit with a non-zero status, alarming the user, preventing vLLM from running and causing the pod to terminate so that Kubernetes can reschedule it — hopefully onto a node whose hardware resources satisfy the preflight requirements. This works by modifying the pod container startup to invoke our preflight script just before vLLM starts (it uses <code>&amp;&amp;</code> to stop <code>vllm serve</code> if any preflight check fails):</p>
<div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token key atrule" style="color:hsl(35, 99%, 36%)">containers</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">-</span><span class="token plain"> </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">args</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">      </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">-</span><span class="token plain"> </span><span class="token string" style="color:hsl(119, 34%, 47%)">"... python3 llm-d-preflight-checks.py &amp;&amp; vllm serve /model-cache/models/…"</span><br></div></code></pre></div></div>
<p>The preflight script can also pause execution if more complex networking tests are needed. In this mode, GPU memory is fully available for testing because vLLM has not started running. This behavior is controlled by the <code>LLMD_PREFLIGHT_CHECKS</code> environment variable:</p>
<div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-yaml codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token key atrule" style="color:hsl(35, 99%, 36%)">env</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">  </span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">-</span><span class="token plain"> </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">name</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> LLMD_PREFLIGHT_CHECKS</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain">    </span><span class="token key atrule" style="color:hsl(35, 99%, 36%)">value</span><span class="token punctuation" style="color:hsl(119, 34%, 47%)">:</span><span class="token plain"> pause</span><br></div></code></pre></div></div>
<p>You can see how the components work together as shown in this diagram:</p>
<img src="https://llm-d.ai/img/blogs/networking-distributed-inference/figure5-preflight-methodology.png" alt="Preflight check methodology: vLLM startup waits for preflight-check.py to finish" style="width:50%;height:auto;display:block;margin:0 auto">
<p><em>Figure 5: Methodology of running pre-flight checks: vLLM startup is waiting for <code>preflight-check.py</code> to finish.</em></p>
<p>Once networking tests are finished, we can signal the pods that preflight checks are complete and execution should resume into vLLM. To end the pause, we send an HTTP POST request to the <code>/exit</code> endpoint exposed by the preflight checks script.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="how-to-try-out-runtime-networking-tests">How to try out runtime networking tests<a href="https://llm-d.ai/blog/networking-for-distributed-inference-llm-d#how-to-try-out-runtime-networking-tests" class="hash-link" aria-label="Direct link to How to try out runtime networking tests" title="Direct link to How to try out runtime networking tests" translate="no">​</a></h3>
<p>The preflight check script is packaged as a skill that can be invoked from AI coding agents via <code>/llm-d-preflight-checks</code> in the <a href="https://github.com/llm-d/llm-d-pd-utils" target="_blank" rel="noopener noreferrer" class="">llm-d/llm-d-pd-utils repository</a>. We are also working to make the preflight scripts option available as an option in the llm-d Helm charts (see issue <a href="https://github.com/llm-d/llm-d/issues/1580" target="_blank" rel="noopener noreferrer" class="">#1580</a>).</p>
<p>To automate testing, we provide scripts and an AI skill that walk through running tests in llm-d pods: <code>run-tests.sh</code> and the <code>/llm-d-networking-tests</code> skill in the same repository. If you have questions about the tests or preflight checks, join the <a class="" href="https://llm-d.ai/slack">llm-d Slack</a> and help us improve the skills and scripts.</p>
<p>To install skills, clone the <code>llm-d-pd-utils</code> GitHub repo and then copy skills into your agent's skill directory, for example for Claude Code:</p>
<div class="language-bash codeBlockContainer_Ckt0 theme-code-block" style="--prism-background-color:hsl(230, 1%, 98%);--prism-color:hsl(230, 8%, 24%)"><div class="codeBlockContent_QJqH"><pre tabindex="0" class="prism-code language-bash codeBlock_bY9V thin-scrollbar" style="background-color:hsl(230, 1%, 98%);color:hsl(230, 8%, 24%)"><code class="codeBlockLines_e6Vv"><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token assign-left variable" style="color:hsl(221, 87%, 60%)">AGENT_SKILLS_DIR</span><span class="token operator" style="color:hsl(221, 87%, 60%)">=~</span><span class="token plain">/.claude/skills/</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token function" style="color:hsl(221, 87%, 60%)">git</span><span class="token plain"> clone https://github.com/llm-d/llm-d-pd-utils.git /tmp/llmd-skills-repo</span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token function" style="color:hsl(221, 87%, 60%)">cp</span><span class="token plain"> </span><span class="token parameter variable" style="color:hsl(221, 87%, 60%)">-r</span><span class="token plain"> /tmp/llmd-skills-repo/skills/* </span><span class="token variable" style="color:hsl(221, 87%, 60%)">$AGENT_SKILLS_DIR</span><span class="token plain"></span><br></div><div class="token-line" style="color:hsl(230, 8%, 24%)"><span class="token plain"></span><span class="token function" style="color:hsl(221, 87%, 60%)">rm</span><span class="token plain"> </span><span class="token parameter variable" style="color:hsl(221, 87%, 60%)">-rf</span><span class="token plain"> /tmp/llmd-skills-repo</span><br></div></code></pre></div></div>
<p>Example prompts to use with AI coding agents to run networking tests using the llm-d P/D guide:</p>
<ol>
<li class="">Follow the <a href="https://github.com/llm-d/llm-d/tree/main/guides/pd-disaggregation" target="_blank" rel="noopener noreferrer" class="">llm-d P/D disaggregation guide</a> to install llm-d for quick testing with two P and one D, and use <code>/llm-d-preflight-checks</code> to enable the preflight checks script. If necessary, modify pods to add the preflight checks script and the env variable <code>LLMD_PREFLIGHT_CHECKS</code> with <code>pause</code>.</li>
<li class="">Run <code>/llm-d-networking-tests</code> on those pods.</li>
<li class="">Unpause all pods that have preflight checks scripts running by using the <code>/llm-d-preflight-checks</code> skill, and verify that vLLM is started.</li>
</ol>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="summary">Summary<a href="https://llm-d.ai/blog/networking-for-distributed-inference-llm-d#summary" class="hash-link" aria-label="Direct link to Summary" title="Direct link to Summary" translate="no">​</a></h2>
<p>Networking is a first-class citizen for disaggregated LLM inference. As models grow larger and context windows extend to hundreds of thousands of tokens, the KV Cache transfer between prefill and decode stages becomes a significant factor in end-to-end latency. The llm-d platform provides a robust and extensible foundation for this through the following: integration with NIXL, addition of the UCCL backend for cloud-specific transports (GPUDirect TCP-X and TCP), and introduction of cluster-level preflight and runtime tests.</p>
<p>Key takeaways from our ongoing efforts:</p>
<ul>
<li class=""><strong>Measurement is the foundation</strong>: Before optimizing, we need to understand where we stand. Tools like nixlbench and baseline fabric measurements are essential for establishing performance targets and identifying bottlenecks.</li>
<li class=""><strong>Backend diversity matters</strong>: Different deployments — cloud vs. on-premises, InfiniBand vs. RoCE vs. EFA — benefit from different transport backends. NIXL's plugin architecture enables this flexibility, and the addition of UCCL alongside UCX, Mooncake and the libfabric backend gives operators more choices.</li>
<li class=""><strong>Considering KV Cache Management</strong>: KV Cache management strategies that involve CPU memory offloading require efficient heterogeneous transfer paths, which are an active area of development.</li>
<li class=""><strong>Observability needs investment</strong>: Correlating network-level and application-level metrics across the distributed inference pipeline is key to diagnosing performance issues in production. Additionally, studying the network traffic patterns of distributed inference would help in designing better scheduling policies for <a href="https://vllm.ai/blog/mooncake-store#performance" target="_blank" rel="noopener noreferrer" class="">large-scale agentic workloads</a>.</li>
<li class=""><strong>Verification belongs in the deployment loop</strong>: A correctly configured networking stack cannot be assumed — it must be validated. The preflight checks and networking test tooling we are building for llm-d let operators catch misconfigured NICs, bad RDMA bindings, and environment drifts <em>before</em> vLLM starts serving traffic, turning silent TTFT regressions into visible, actionable failures.</li>
</ul>
<p>Networking is key to distributed inference and through the collaboration between the llm-d community and NVIDIA, we are working on performance improvements, better observability, and tooling that makes deployments easier to validate and tune — and we invite the broader community to join us in this effort.</p>]]></content:encoded>
            <author>pravein.govindan.kannan@ibm.com (Pravein Govindan Kannan)</author>
            <author>liran.schour@gmail.com (Liran Schour)</author>
            <author>aslom@us.ibm.com (Aleksander Slominski)</author>
            <author>rajjoshi@redhat.com (Raj Joshi)</author>
            <author>nicklucche@redhat.com (Nicolò Lucchesi)</author>
            <author>chcost@us.ibm.com (Carlos Costa)</author>
            <author>moein@nvidia.com (Moein Khazraee)</author>
            <author>omrik@nvidia.com (Omri Kahalon)</author>
            <category>blog posts</category>
            <category>Networking</category>
            <category>NIXL</category>
            <category>UCCL</category>
            <category>UCX</category>
        </item>
        <item>
            <title><![CDATA[Serving Hybrid Models at Scale in llm-d]]></title>
            <link>https://llm-d.ai/blog/serving-hybrid-models-at-scale-in-llm-d</link>
            <guid>https://llm-d.ai/blog/serving-hybrid-models-at-scale-in-llm-d</guid>
            <pubDate>Sat, 13 Jun 2026 09:00:00 GMT</pubDate>
            <description><![CDATA[llm-d extends vLLM's Hybrid Memory Allocator across KV offloading to CPU and storage and KV-aware routing, making the offload connector HMA-aware - for 1.8–1.9x faster KV loads and about 115% higher throughput at high request rates with stable latency.]]></description>
            <content:encoded><![CDATA[<p>For most of the transformer era, the KV cache rested on a quiet assumption: <strong>one model, one uniform cache</strong>. Every layer attended the same way, every block was the same size, and everything built on top of the cache (allocators, offload connectors, schedulers) could treat it as a single pool.</p>
<p>Hybrid models broke this assumption. Many recent frontier and open-weight models increasingly mix attention types within a single model (full attention next to sliding-window, linear, or Mamba layers), making the cache heterogeneous: different layers now hold different amounts of state, in different shapes, with different reuse rules. A cache block that used to be allocated as one uniform unit is now constituted of several distinct parts.</p>
<p>To serve a hybrid model efficiently, an AI inference platform has to handle that heterogeneity in at least <strong>three aspects of the stack</strong>:</p>
<ul>
<li class=""><strong>GPU Memory Allocation</strong>: How the cache is laid out and allocated on the GPU. vLLM solved this with its Hybrid Memory Allocator (HMA), rebuilt around a unified allocator (see <a href="https://pytorch.org/blog/hybrid-models-as-first-class-citizens-in-vllm/" target="_blank" rel="noopener noreferrer" class="">Hybrid Models as First-Class Citizens in vLLM</a>).</li>
<li class=""><strong>KV Offloading</strong>: Extending the KV cache to CPU and storage. Without HMA awareness, an offloading connector turns the HMA off and therefore discards the GPU memory improvements or potential data movement savings.</li>
<li class=""><strong>KV-Aware Routing</strong>: Sending each request to the right model-server replica. Ignoring hybrid memory structure may erroneously list nodes as having or not having the required KV data based on information stemming from just part of the layers.</li>
</ul>
<p>vLLM's HMA solved hybrid GPU memory allocation when handling a single vLLM instance. This post shows how llm-d extends that to <strong>tiered KV cache management</strong> - including KV offloading to CPU and storage, and KV-aware request routing - significantly improving throughput and latency at scale for hybrid models.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="kv-cache-offloading-for-hybrid-models">KV Cache Offloading for Hybrid Models<a href="https://llm-d.ai/blog/serving-hybrid-models-at-scale-in-llm-d#kv-cache-offloading-for-hybrid-models" class="hash-link" aria-label="Direct link to KV Cache Offloading for Hybrid Models" title="Direct link to KV Cache Offloading for Hybrid Models" translate="no">​</a></h2>
<p>In full-attention layers, the KV cache grows linearly with sequence length, and the workloads people actually run now (agentic loops, multi-turn conversations, long reasoning traces) push context lengths into the hundreds of thousands of tokens. At those sizes, the KV cache is one of the largest consumers of GPU memory. Hybrid models complicate this: sliding-window layers keep only a fixed-size window of KV state, while Mamba/SSM-style and linear-attention layers keep recurrent or fixed-size state rather than a standard per-token KV stream. Each layer type has a different memory footprint and different offloading behavior. KV offloading extends the cache by spilling to CPU DRAM and even storage, keeping more KV data available for <strong>reuse across requests</strong> - but doing so correctly for hybrid models requires offloading logic aware of these per-layer differences. Our KV offloading path builds on the <a href="https://blog.vllm.ai/2026/01/08/kv-offloading-connector.html" target="_blank" rel="noopener noreferrer" class="">vLLM native offloading connector</a> and <a class="" href="https://llm-d.ai/blog/native-kv-cache-offloading-to-any-file-system-with-llm-d">llm-d storage offloading</a>.</p>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="handling-kv-data-for-hybrid-models">Handling KV Data for Hybrid Models<a href="https://llm-d.ai/blog/serving-hybrid-models-at-scale-in-llm-d#handling-kv-data-for-hybrid-models" class="hash-link" aria-label="Direct link to Handling KV Data for Hybrid Models" title="Direct link to Handling KV Data for Hybrid Models" translate="no">​</a></h3>
<p>Hybrid models interleave different attention types across layers, and each type stores state differently. Take, for example, gpt-oss-120b, which we use throughout this blog as a concrete example, though the connector handles any hybrid model. This model interleaves Full Attention layers (FA) and Sliding Window layers (SWA). Its full-attention layers cache every token, so a 128K-token request holds all 128K tokens of KV in these layers, while its sliding-window layers keep only the last 128 tokens, no matter how long the request runs. Two layer types in one model, with cache footprints that can differ by <strong>orders of magnitude</strong>.</p>
<p>Frontier models keep diverging from uniform full attention models. Mamba and linear-attention layers (Jamba, Qwen3.5) hold a single fixed-size state instead of per-token KV. In such models, rather than keeping a KV stream, checkpoints of intermediate states are maintained and offloaded. New models like Google's Gemma 4 interleave two types of attention, local sliding-window and full global. <a href="https://vllm.ai/blog/2026-04-24-deepseek-v4" target="_blank" rel="noopener noreferrer" class="">DeepSeek V4</a> goes furthest, mixing compressed attention at two ratios with a short sliding window inside a single model built for million-token context, a five-way cache stack that vLLM folds into a handful of shared page-size buckets just to serve it.</p>
<p>With the Hybrid Memory Allocator (<strong>HMA</strong>) enabled, vLLM splits the cache into groups – each group has a uniform attention type and is managed separately. KV data for "old tokens" in a sliding-window group may be evicted, whereas in a full-sequence group these have to be maintained for the entire prompt. For gpt-oss-120b HMA creates two groups: full-attention and sliding-window, shown in Figure 1. With the HMA disabled, these groups collapse into a single full-attention buffer requiring keeping the full attention in memory for all layers. While the model still saves on compute (since SWA layers only compute on a fixed-size window), the memory saving is thrown away.</p>
<div style="text-align:center;margin:20px 0"><img src="https://llm-d.ai/img/blogs/hybrid-models/hma-blog-image1.webp" alt="Per-group offloading" style="width:85%;height:auto"><p style="font-size:0.9em;margin-top:8px"><em>Figure 1. Per-group offloading: full-attention keeps every block, sliding-window keeps only its window.</em></p></div>
<h3 class="anchor anchorTargetStickyNavbar_Vzrq" id="handling-hybrid-kv-by-an-offloading-connector">Handling Hybrid KV by an Offloading Connector<a href="https://llm-d.ai/blog/serving-hybrid-models-at-scale-in-llm-d#handling-hybrid-kv-by-an-offloading-connector" class="hash-link" aria-label="Direct link to Handling Hybrid KV by an Offloading Connector" title="Direct link to Handling Hybrid KV by an Offloading Connector" translate="no">​</a></h3>
<p>Prior to our changes, an offloading connector built for the uniform world handles a hybrid cache in one of two bad ways: Either forgo offloading altogether or forgo the use of HMA. The second is not a failure but a silent slowdown: vLLM falls back to managing the cache as uniform attention blocks, so offloading still succeeds, but the GPU memory savings are lost, and every KV load ends up moving more data than it should.</p>
<p>Making the connector genuinely HMA-aware came down to the following changes:</p>
<ul>
<li class=""><strong>Per-group tensor subsets.</strong> vLLM makes the connector aware of which tensors belong to which group and their layer type. Lookups of blocks in the connector are also group aware.</li>
<li class=""><strong>Per-group offloads.</strong> Rather than offloading a single KV block for a chunk of tokens, each group of layers offloads its separate KV data. In storage, this amounts to a separate file per group. For example, in gpt-oss this means two files per chunk instead of one, which the I/O pool can move in parallel.</li>
<li class=""><strong>Partial transfers.</strong> Some groups only require partial loading of KV data. Sliding-window layers need only the KV of the last tokens in a prompt, so the connector transfers only the in-window blocks. In the case of storage, this often starts from an offset partway into a file rather than the beginning of the file.</li>
</ul>
<p>We built these changes into the vLLM native offloading connector and the llm-d FS connector, handling both the CPU and storage tiers. This allows vLLM to use HMA along with the connector and, as shown below, leads to significant performance improvements.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="performance-benefits-nearly-double-the-load-speed">Performance Benefits: Nearly Double the Load Speed<a href="https://llm-d.ai/blog/serving-hybrid-models-at-scale-in-llm-d#performance-benefits-nearly-double-the-load-speed" class="hash-link" aria-label="Direct link to Performance Benefits: Nearly Double the Load Speed" title="Direct link to Performance Benefits: Nearly Double the Load Speed" translate="no">​</a></h2>
<p>When a request prefix already lives in the offload tier, how fast can we pull it back? We ran a small microbenchmark: run ten distinct 128K-token prompts concurrently. On an initial "cold" pass their KV is written to the offload tier. Then we repeat this on a "hot" pass (with GPU cache disabled) in which the KV data is read back from the offload tier. We measure how long the hot batch takes to complete its KV loads and decode one token for all ten requests (similar to TTFT, but for the whole batch).</p>
<div style="text-align:center;margin:20px 0"><img src="https://llm-d.ai/img/blogs/hybrid-models/hma-blog-image2.webp" alt="Batch KV load latency across tiers" style="width:85%;height:auto"><p style="font-size:0.9em;margin-top:8px"><em>Figure 2. Batch KV load latency across CPU and storage tiers with HMA and without it. Models are gpt-oss-20b (TP=2) and gpt-oss-120b (TP=4) on NVIDIA H100 GPUs, with IBM Storage Scale as the storage backend. Block size is 16 tokens for the CPU tier and 256 tokens for the storage tier.</em></p></div>
<p>The results (in Figure 2) show that HMA-aware reads are <strong>1.8x to 1.9x faster</strong> on both tiers and both model sizes. The source of these benefits is in the sliding window layers that only need to load the last 128 tokens worth of KV cache instead of the full attention for the entire 128K tokens. On the offload side (after initial prefill) we did not see this benefit, nor any penalty, as we still chose to offload all the KV data. This direction is done asynchronously and thus is less critical.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="scaling-benefits-of-hma-aware-offloading">Scaling Benefits of HMA-Aware Offloading<a href="https://llm-d.ai/blog/serving-hybrid-models-at-scale-in-llm-d#scaling-benefits-of-hma-aware-offloading" class="hash-link" aria-label="Direct link to Scaling Benefits of HMA-Aware Offloading" title="Direct link to Scaling Benefits of HMA-Aware Offloading" translate="no">​</a></h2>
<p>HMA pays off irrespective of offloading, because sizing each group to its real need frees a lot of HBM. For example, for a gpt-oss-120b model, vLLM predicts an increase of <strong>1.77x in KV cache capacity</strong> when turning the HMA configuration flag on (as seen in vLLM's log messages). This is again due to the smaller KV footprint of the sliding-window layers. When testing this with offload tiers underneath, this effect compounds: the GPU can serve more requests, and similarly, the CPU tier can serve more by evicting more non-critical KV data from the sliding-window layers.</p>
<p>To show the scalability of using offloading, we follow the scalability test from our previous post, <a class="" href="https://llm-d.ai/blog/native-kv-cache-offloading-to-any-file-system-with-llm-d">Native KV Cache Offloading to Any Filesystem with llm-d</a>. This test sweeps a growing number of users each sending its own (previously seen) prompt of 16K-token with single-token decode. The test runs at maximum query-per-second rate of 80 and max-concurrency of 80 and measures throughput in tokens per second. As the number of users grows, each configuration eventually saturates its memory capacity and drops to prefill level throughput.</p>
<div style="text-align:center;margin:20px 0"><img src="https://llm-d.ai/img/blogs/hybrid-models/hma-blog-image3.webp" alt="User scalability test across tiers" style="width:85%;height:auto"><p style="font-size:0.9em;margin-top:8px"><em>Figure 3. User scalability test across tiers with gpt-oss-120b (TP=4) on NVIDIA H100 GPUs and IBM Storage Scale as the storage backend, with HMA and without it.</em></p></div>
<p>HMA-awareness produces two positive effects in this experiment, shown in Figure 3. First, it shifts each saturation cliff to the right: the GPU holds more users with HMA before it saturates, and the CPU tier does the same once it takes over. The storage capacity is large enough that we do not see a collapse to prefill-level throughput in the tested range. Second, it raises the sustained throughput of the slower tiers: with storage added, the GPU + CPU + storage stack settles onto a much higher plateau than without HMA, and manages to sustain this high throughput to the largest user counts tested.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="kv-aware-request-routing">KV-Aware Request Routing<a href="https://llm-d.ai/blog/serving-hybrid-models-at-scale-in-llm-d#kv-aware-request-routing" class="hash-link" aria-label="Direct link to KV-Aware Request Routing" title="Direct link to KV-Aware Request Routing" translate="no">​</a></h2>
<p>Everything so far ran on a single vLLM instance: the read speedup, the capacity, the throughput under load. Scaling past one instance is where it gets harder, especially without shared storage, because a bigger effective cache per GPU and CPU only helps if each request lands on the replica that already holds its prefix. Spread requests blindly across a fleet and the cache hits drop sharply. Routing requests to where their cache lives is what llm-d does, and it was the subject of our earlier post, <a class="" href="https://llm-d.ai/blog/kvcache-wins-you-can-see">KV-Cache Wins You Can See</a>, where prefix-aware scheduling gave the scheduler a global view of the cluster's caches. We extended that idea across tiers, so the scheduler scores not just each replica's GPU cache, but its CPU offload tier too, and routes accordingly - we call this <strong>multi-tier KV management</strong>.</p>
<p>Routing rides on the KV-events vLLM emits to externalize its cache state. We extended those events to cover the CPU tier, and to carry HMA-group information for hybrid models - so the router can see that a prefix's full-attention layers are still resident even after its sliding-window layers have rolled out of the window, rather than treating the whole block as gone. For models that pair full attention with sliding-window layers, like gpt-oss, the scorer already uses this to route on the layers that are actually retained. Models that are purely sliding-window, or that mix several window sizes, are the harder case, and a dedicated scorer to handle them optimally is in progress; the results below come from the existing tier-aware scorer.</p>
<p>To exemplify routing with hybrid models we benchmarked a fleet of 16 gpt-oss-120b servers at three levels of management, sweeping 5 to 40 QPS (workload: 250 prefix groups, 5 prompts per group, 16K-token system prompt, 256-token question, 256-token output):</p>
<ul>
<li class=""><strong>GPU-only KV management</strong>: the scheduler scores only the GPU cache (our baseline).</li>
<li class=""><strong>GPU KV management + CPU offloading</strong>: a CPU tier absorbs the overflow, but routing still scores only the GPU.</li>
<li class=""><strong>GPU+CPU KV management</strong>: the scheduler scores both the GPU and the CPU tier, so each request routes to wherever its prefix actually lives.</li>
</ul>
<div style="text-align:center;margin:20px 0"><img src="https://llm-d.ai/img/blogs/hybrid-models/hma-blog-image4.webp" alt="KV cache management across a 16-server fleet" style="width:85%;height:auto"><p style="font-size:0.9em;margin-top:8px"><em>Figure 4. KV cache management across a 16-server gpt-oss-120b fleet (TP=1, one NVIDIA H100 per server): TTFT and throughput vs request rate.</em></p></div>
<p>The payoff shows up under load. Past about 20 QPS the GPU-only baseline saturates and its TTFT climbs into the tens of seconds as requests queue. Adding a CPU offload tier helps: at 40 QPS it lifts throughput about <strong>75%</strong> over the baseline while holding TTFT low. But the real win comes from managing both tiers together. With GPU+CPU KV management, <strong>throughput rises roughly 115% over the baseline at 40 QPS, and TTFT stays essentially flat across the whole sweep</strong>.</p>
<p>That gap is llm-d's value: <strong>the offload tier only reaches its full potential when the scheduler knows what it holds and routes to it</strong>. Capacity is a property of an instance; throughput is a property of placement.</p>
<p>The full setup, the per-QPS results, and step-by-step instructions to run it yourself are in the <a href="https://github.com/llm-d/llm-d/tree/main/guides/tiered-prefix-cache#gpt-oss-120b-benchmarking-results" target="_blank" rel="noopener noreferrer" class="">llm-d tiered prefix cache guide</a>.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="whats-next">What's Next<a href="https://llm-d.ai/blog/serving-hybrid-models-at-scale-in-llm-d#whats-next" class="hash-link" aria-label="Direct link to What's Next" title="Direct link to What's Next" translate="no">​</a></h2>
<p>The experiments in this post used the standalone llm-d FS connector. The same HMA-aware offloading path has also been implemented in the new multi-tier connector upstreamed to vLLM, which is intended to replace the standalone connector going forward. See the <a href="https://docs.vllm.ai/en/latest/features/kv_offloading_usage/" target="_blank" rel="noopener noreferrer" class="">vLLM KV offloading guide</a>. The multi-tier design is more than just packaging. With CPU and storage managed as tiers of one connector, CPU serves as a hub for hot data and a staging area for slower storage.</p>
<p>The HMA results here rely on canonical KV-cache allocation for HMA models in vLLM (<a href="https://github.com/vllm-project/vllm/pull/37885" target="_blank" rel="noopener noreferrer" class="">PR #37885</a>), which has not yet merged, so reproducing them requires a build from that branch.</p>
<p>HMA itself is not a solved problem. Every new model brings new attention layers, and each one is another cache group the connector has to handle correctly. As context lengths and model counts keep growing, getting that offloading right is no longer a nice-to-have; it is what keeps serving affordable.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id="get-involved-with-llm-d">Get Involved with llm-d<a href="https://llm-d.ai/blog/serving-hybrid-models-at-scale-in-llm-d#get-involved-with-llm-d" class="hash-link" aria-label="Direct link to Get Involved with llm-d" title="Direct link to Get Involved with llm-d" translate="no">​</a></h2>
<ul>
<li class="">Explore the llm-d Community Quickstart Guide → <a href="https://github.com/llm-d/llm-d/blob/main/README.md" target="_blank" rel="noopener noreferrer" class="">Start here</a></li>
<li class="">Join our Slack → <a href="https://inviter.co/llm-d-slack" target="_blank" rel="noopener noreferrer" class="">Get your invite</a> and connect with maintainers and contributors</li>
<li class="">Explore the code → <a href="https://github.com/llm-d" target="_blank" rel="noopener noreferrer" class="">Browse our GitHub organization</a></li>
<li class="">Attend meetings → All meetings are open! Add our <a href="https://red.ht/llm-d-public-calendar" target="_blank" rel="noopener noreferrer" class="">public calendar</a></li>
</ul>]]></content:encoded>
            <category>blog posts</category>
            <category>KV Cache</category>
            <category>Storage</category>
            <category>HMA</category>
            <category>Inference</category>
            <category>Scheduling</category>
        </item>
    </channel>
</rss>