<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://vllm-project.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://vllm-project.github.io/" rel="alternate" type="text/html" /><updated>2026-11-06T15:00:23+00:00</updated><id>https://vllm-project.github.io/feed.xml</id><title type="html">vLLM Blog</title><subtitle>vLLM is a fast and easy-to-use library for LLM inference and serving.
</subtitle><author><name>© 2026. vLLM Team. All rights reserved.</name></author><entry><title type="html">Zero Mismatch, Simple Async RL: REINFORCE Zero, DeepSeek-V4.1 and Kimi K3.1</title><link href="https://vllm-project.github.io/2026/11/06/zero-mismatch-async-rl.html" rel="alternate" type="text/html" title="Zero Mismatch, Simple Async RL: REINFORCE Zero, DeepSeek-V4.1 and Kimi K3.1" /><published>2026-11-06T09:00:00+00:00</published><updated>2026-11-06T09:00:00+00:00</updated><id>https://vllm-project.github.io/2026/11/06/zero-mismatch-async-rl</id><content type="html" xml:base="https://vllm-project.github.io/2026/11/06/zero-mismatch-async-rl.html"><![CDATA[<p><strong>TL;DR</strong></p>

<ul>
  <li>Asynchronous RL is faster, but it trains on samples generated by older weights.</li>
  <li>The rollout-to-learner gap has two parts. Weight lag changes smoothly and unclipped importance sampling (IS) controls it. Kernel mismatch, where rollout and training compute different numbers for the same weights, fluctuates and persists despite IS.</li>
  <li>Align the kernels, and unclipped IS corrects the remaining weight lag without sample-rejection gates. <a href="https://github.com/hijkzzz/REINFORCE-Zero">REINFORCE Zero</a> (NVIDIA Research and Inferact) trains stably for <strong>20,000 updates</strong>, learns at <strong>policy lag 64</strong>, and reaches <strong>2.40×</strong> the training-step throughput of synchronous training with aligned kernels.</li>
  <li>Zero mismatch now covers <strong>DeepSeek-V4.1-Flash</strong> (DAPO rollout step within 10% of the fast baseline), <strong>Kimi K3.1</strong> on day 0, and both DeepSeek-V4-Flash and Kimi K3.1 on <strong>AMD MI355X</strong>.</li>
  <li>Everything is in <a href="https://github.com/Inferact/zero-mismatch-rl">Inferact/zero-mismatch-rl</a>.</li>
</ul>

<h2 id="1-from-synchronous-to-asynchronous">1. From synchronous to asynchronous</h2>

<p>Last month, <a href="https://vllm.ai/blog/2026-10-14-train-inference-consistency">we showed</a> that rollout and training can agree exactly. On DeepSeek-V4-Flash, vLLM and the trainer produced the same logprob for every sampled token, bit for bit, on the fast kernels, with an 8.7% reduction in rollout throughput. An agent skill now does the alignment for each new model.</p>

<p>That post was about synchronous RL, which has no weight lag, so zero mismatch removes the only gap between rollout and training. This post is about asynchronous RL, which is faster but off-policy by design. Does zero mismatch still matter there?</p>

<p>We answer with a new paper from NVIDIA Research and Inferact (Jian Hu et al.): <a href="https://github.com/hijkzzz/REINFORCE-Zero">REINFORCE Zero: Kernel Alignment Unlocks Stable Asynchronous RL with Importance Sampling</a>. All numbers in sections 2 to 4 come from it.</p>

<h2 id="2-asynchronous-rl-faster-but-off-policy">2. Asynchronous RL: faster, but off-policy</h2>

<p>In synchronous RL, rollout and training take turns, and each waits for the other. Asynchronous RL runs them at the same time: rollout keeps generating while the learner updates.</p>

<p>The price is <strong>weight lag</strong>. A sample generated with weights version v is trained at version k &gt; v. The gap k − v is not small: REINFORCE Zero runs at lag 2 and 8 on math reasoning, and at lag 64 on agentic tool use.</p>

<p>So the learner always trains on samples from an older policy. The standard correction is importance sampling (IS): reweight each token by π / μ, the learner’s probability for it divided by the probability the rollout recorded when it sampled it. The question is whether that correction covers the whole gap.</p>

<h2 id="3-two-gaps-that-behave-differently">3. Two gaps that behave differently</h2>

<p>The logprob gap between learner and rollout splits into two terms:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>log π_θk − log μ_v  =  (log π_θk − log π_θv)  +  (log π_θv − log μ_v)
                        weight lag                kernel mismatch
</code></pre></div></div>

<p>π is the learner’s computation and μ is the rollout engine’s. The second term compares the two at the same weights θv.</p>

<p><strong>Weight lag changes smoothly.</strong> It telescopes over the most recent updates, and when each update is small it follows a smoothly changing policy trajectory. This is the gap IS is meant to correct.</p>

<p><strong>Kernel mismatch fluctuates.</strong> It depends on batch composition and numerical execution, so it introduces fluctuations even when rollout and learner use identical weights.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/zero-mismatch-async-two-mismatches.html" title="Peak-to-median ratio of importance-weight deviation D3: 1.50× with aligned kernels, 442.54× with standard kernels" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 420px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 1: Peak-to-median ratio of the importance-weight deviation D3, log scale, for two asynchronous runs on DeepSeek-R1-Distill-Qwen-1.5B: REINFORCE Zero with aligned kernels and IS with standard kernels. Source: REINFORCE Zero, Table 2.</em></p>

<p>The REINFORCE Zero paper measures this with D3, the per-update average of w − 1 − log w over tokens, where w is the importance weight. Each token’s term is 0 when w = 1 and grows as w moves away from 1. With aligned kernels, D3 peaks at 1.50× its median: unclipped IS keeps the remaining weight-lag mismatch smooth and controlled. With standard kernels, it peaks at 442.54×: large importance-weight fluctuations persist despite IS.</p>

<p><strong>So remove the kernel term first.</strong> Then what remains is weight lag, and plain unclipped IS corrects it, with no truncation and no rejection gates.</p>

<h2 id="4-reinforce-zero">4. REINFORCE Zero</h2>

<p>REINFORCE Zero is the recipe that follows from section 3. It has three parts.</p>

<h3 id="the-recipe">The recipe</h3>

<ol>
  <li><strong>Align the kernels.</strong> The rollout and the learner compute the same logprob for the same weights and tokens, as in our last post. The kernel term is exactly 0, so whatever gap remains is weight lag.</li>
  <li><strong>Correct weight lag with token-level IS, unclipped.</strong> The rollout already records the logprob of every token it samples. The learner divides its own probability by that recorded one and uses the ratio as is: no truncation, no filtering.</li>
  <li><strong>Optimize plain REINFORCE.</strong> Each response’s advantage is its reward minus the mean reward of its group. Tokens are averaged within a response. No value model, no rejection gates.</li>
</ol>

<p>For a batch of B responses, with A_i the advantage of response i:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>L(θ) = − (1/B) Σ_i (1/T_i) Σ_t  A_i · π_θ(a_it | h_it) / μ_i(a_it | h_it)
</code></pre></div></div>

<p>That is the whole algorithm.</p>

<h3 id="why-unclipped-is">Why unclipped IS</h3>

<p>At a fixed history, weighting each sampled token by the exact ratio w = π / μ makes the expected update equal the update under the current policy. Clipping the weights generally introduces bias.</p>

<p>A correct mean gradient is not enough for stable training. In a Gaussian model, the paper derives the exact update error and shows that mismatch amplifies update variance and narrows the stable step-size range, even under unbiased IS: the same step size learns with no mismatch and loses reward with it. The experiments point to kernel mismatch as the source of large excursions (Figure 1), so removing it is what lets unclipped IS stay stable.</p>

<h3 id="what-happens-without-alignment">What happens without alignment</h3>

<p>The paper runs the same asynchronous IS with standard kernels:</p>

<ul>
  <li>The median rollout-to-learner KL rises <strong>83.33×</strong> between the first and last 1,000 updates, and online AIME24 pass@1 falls from 34.27% to 13.96%. With aligned kernels it stays flat.</li>
  <li>The largest gradient norm before clipping reaches <strong>38.27</strong>, against <strong>0.0555</strong> with aligned kernels.</li>
  <li>Adding a sequence gate stabilizes training, but by the last 1,000 updates it rejects <strong>24.48%</strong> of sequences. REINFORCE Zero rejects none.</li>
</ul>

<h3 id="learning-at-lag-64">Learning at lag 64</h3>

<p>The paper pushes the lag to 64. With Qwen3-4B, Python tools and a 16K context, REINFORCE Zero trains at policy lag 64: a sample can come from weights up to 64 versions older than the learner’s. It keeps learning through 5,000 updates: mean reward rises from 0.287 in the first 100 updates to about 0.78, and AIME24/25/26 pass@1 improves over the same run.</p>

<p><img src="/assets/figures/2026-11-06-zero-mismatch-async-rl/lag64.png" alt="REINFORCE Zero at lag 64: training reward and AIME pass@1" /></p>

<p><em>Figure 2 (REINFORCE Zero, Figure 6): Learning at lag 64 with Qwen3-4B and Python tools, through 5,000 updates. Left: training reward, 100-update means. Right: equal-weight AIME24/25/26 pass@1 at 200-update checkpoints (points) and a smoothed trend (curve).</em></p>

<h3 id="results">Results</h3>

<table>
  <thead>
    <tr>
      <th>Setting</th>
      <th>Result</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Throughput, 16 GPUs, 12K updates</td>
      <td><strong>2.40×</strong> the training-step throughput of synchronous training with aligned kernels (68.55 vs 164.77 hours), comparable quality</td>
    </tr>
    <tr>
      <td>20K-update reasoning, DeepSeek-R1-Distill-Qwen-1.5B</td>
      <td>Stable at lag 2 and 8; rollout-to-learner KL stays flat</td>
    </tr>
    <tr>
      <td>High lag, Qwen3-4B + Python tools</td>
      <td>Learns at <strong>lag 64</strong> through 5,000 updates; mean reward 0.287 → about 0.78</td>
    </tr>
    <tr>
      <td>MoE with tools, Qwen3-30B-A3B</td>
      <td>Macro pass@1 31.29% → 71.55% in 3,000 updates</td>
    </tr>
    <tr>
      <td>Computer use, Nemotron-3-Nano-Omni-30B on OSWorld</td>
      <td>Pass@1 50.97% → 56.16% after 428 updates</td>
    </tr>
  </tbody>
</table>

<p>On the 1.5B reasoning task at 6,000 updates, the variants line up as the analysis predicts:</p>

<table>
  <thead>
    <tr>
      <th>Recipe</th>
      <th style="text-align: center">Aligned kernels</th>
      <th style="text-align: center">Async</th>
      <th style="text-align: right">Macro pass@1</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Base model</td>
      <td style="text-align: center">—</td>
      <td style="text-align: center">—</td>
      <td style="text-align: right">40.29%</td>
    </tr>
    <tr>
      <td>Synchronous</td>
      <td style="text-align: center">✓</td>
      <td style="text-align: center"> </td>
      <td style="text-align: right">48.91%</td>
    </tr>
    <tr>
      <td>IS</td>
      <td style="text-align: center"> </td>
      <td style="text-align: center">✓</td>
      <td style="text-align: right">45.32%</td>
    </tr>
    <tr>
      <td>IS + sequence gate</td>
      <td style="text-align: center"> </td>
      <td style="text-align: center">✓</td>
      <td style="text-align: right">46.79%</td>
    </tr>
    <tr>
      <td>IS + token gate</td>
      <td style="text-align: center"> </td>
      <td style="text-align: center">✓</td>
      <td style="text-align: right">44.59%</td>
    </tr>
    <tr>
      <td>Score Centering, no IS</td>
      <td style="text-align: center">✓</td>
      <td style="text-align: center">✓</td>
      <td style="text-align: right">47.50%</td>
    </tr>
    <tr>
      <td><strong>REINFORCE Zero, lag 2</strong></td>
      <td style="text-align: center">✓</td>
      <td style="text-align: center">✓</td>
      <td style="text-align: right"><strong>48.80%</strong></td>
    </tr>
    <tr>
      <td><strong>REINFORCE Zero, lag 8</strong></td>
      <td style="text-align: center">✓</td>
      <td style="text-align: center">✓</td>
      <td style="text-align: right"><strong>48.53%</strong></td>
    </tr>
  </tbody>
</table>

<p>Asynchronous REINFORCE Zero matches synchronous training. Every standard-kernel variant falls behind, whichever correction it uses; with aligned kernels, Score Centering without IS lands in between.</p>

<p><img src="/assets/figures/2026-11-06-zero-mismatch-async-rl/figure1.png" alt="REINFORCE Zero: reasoning accuracy and rollout-to-learner KL" /></p>

<p><em>Figure 3 (REINFORCE Zero, Figure 1). Left: macro pass@1. Right: rollout-to-learner KL. Standard-kernel IS drifts upward; REINFORCE Zero stays flat through 20,000 updates.</em></p>

<h3 id="what-alignment-costs-here">What alignment costs here</h3>

<p>Aligned kernels are slower than the fastest standard ones. On OSWorld, REINFORCE Zero’s mean step takes 944.25 s against 884.17 s for standard-kernel IS with a sequence gate, 6.8% more. The paper’s models were aligned with the agent skill from our last post; the training code is in <a href="https://github.com/NVIDIA-NeMo/labs-molt">NVIDIA-NeMo/labs-molt</a>.</p>

<h2 id="5-flagship-models-deepseek-v41-and-kimi-k31">5. Flagship models: DeepSeek-V4.1 and Kimi K3.1</h2>

<p>REINFORCE Zero starts from aligned kernels, and every new model brings new operators to align. Since the last post, two flagship releases reached zero mismatch: DeepSeek-V4.1-Flash, and Kimi K3.1 on its release day. The runs below validate alignment on these models; long asynchronous runs on them are next.</p>

<p>Throughout, diff 0 means the rollout and the trainer compute the same logprob for every sampled token, bit for bit.</p>

<h3 id="deepseek-v41-flash-at-release-precision">DeepSeek-V4.1-Flash, at release precision</h3>

<p>The consistent path keeps release precision end to end: FP8 and MXFP4 weights, MegaMoE, sparse attention with sliding window, and DSpark speculative decoding, with CUDA graphs. The Megatron-LM trainer (mLite, by Yan Bai of NVIDIA DevTech) calls the rollout’s own kernels in the same order. The key operator is the sliding window under prefix caching: agentic RL needs the prefix cache on, and a cache hit must give the same logprobs as a miss.</p>

<p>On 16 nodes × 4 GB200, SWE-bench Pro agentic RL at 128K context stayed at diff 0 at every step. For DAPO math rollout, with 128 trajectories per node and responses up to 8K tokens, the consistent rollout step stays within <strong>10%</strong> of the fast baseline.</p>

<h3 id="kimi-k31-on-day-0">Kimi K3.1, on day 0</h3>

<p>Kimi K3.1 launched with <a href="https://vllm.ai/blog/2026-11-04-kimi-k31-pro">day-0 vLLM support</a>, zero-mismatch RL included. The hard part was KDA linear attention: prefill computes it chunk by chunk and decode token by token, and the two round differently. Decode now repeats prefill’s arithmetic for the same chunk row, so prefill, decode and the trainer agree, for the base model and for a LoRA adapter on every module. On 4 nodes × 4 GB300, 100 DAPO steps with LoRA stayed at diff 0 and AIME 24/25/26 mean@8 rose from 0.451 to 0.664. Performance optimization is ongoing.</p>

<h2 id="6-beyond-nvidia-amd-mi355x">6. Beyond NVIDIA: AMD MI355X</h2>

<p>Zero mismatch is a property of the kernels, not of one vendor. On MI355X, as on NVIDIA, the trainer’s forward calls vLLM’s own modules and kernels, and <code class="language-plaintext highlighter-rouge">VLLM_BATCH_INVARIANT</code> switches between the consistent and the fast version.</p>

<p><strong>DeepSeek-V4-Flash</strong> held diff 0 for 36 GRPO steps on 4 nodes × 8 MI355X, including across a resume. Batch-invariant mode alone changed nothing at first: bisection found ten sources of batch variance. Half were libraries choosing kernels by shape (hipBLASLt, AITER/CK, Triton, TileLang); the rest included the indexer’s top-k, decode using a different kernel from prefill, and an expert-parallel combine that summed ranks in arrival order. Bit-preserving optimizations then cut the serving-throughput loss from 62–66% to 7.4–10.1%. Recipe and image: <a href="https://github.com/verl-project/verl/pull/8505">verl#8505</a>.</p>

<p><strong>Kimi K3.1</strong> runs the GB300 setup (LoRA r32 on every layer including experts, frozen MXFP4 base) on 2 nodes × 8 MI355X, at diff 0 every step, checked token by token. It needed two fixes: route the trainer’s bmm and indexer linear away from hipBLASLt, which picks a different tile at 4,096 rows than at 4,097; and deduplicate KDA state-slot writes after wake-up, where an eviction and a reuse could write the same slot in one step. A bit-preserving MoE path cut the RL step from about 2,300 s to 1,350 s; the cost against the fast baseline is still being measured. Recipe and patches: draft <a href="https://github.com/verl-project/verl/pull/8574">verl#8574</a>.</p>

<h2 id="7-open-source">7. Open source</h2>

<p>REINFORCE Zero: the paper and code are at <a href="https://github.com/hijkzzz/REINFORCE-Zero">hijkzzz/REINFORCE-Zero</a>, and the training code is in <a href="https://github.com/NVIDIA-NeMo/labs-molt">NVIDIA-NeMo/labs-molt</a>.</p>

<p>Zero mismatch: <a href="https://github.com/Inferact/zero-mismatch-rl">Inferact/zero-mismatch-rl</a> holds the agent skill and, for every model in this post, its recipe, what broke, how it was fixed, and the code.</p>

<p><strong>Next</strong>: long asynchronous runs on these large models, and performance optimization on Kimi K3.1.</p>

<h2 id="acknowledgments">Acknowledgments</h2>

<p>Thanks to (alphabetical by organization):</p>

<ul>
  <li>Verda, for the sandboxes behind the SWE-bench Pro agentic RL runs</li>
  <li>The <a href="https://github.com/verl-project/verl">verl</a> team</li>
</ul>]]></content><author><name>Ao Shen (Inferact), Jian Hu (NVIDIA Research), Yan Bai (NVIDIA DevTech), Shekhar Pandey (AMD), and the REINFORCE Zero authors</name></author><category term="reinforcement-learning" /><category term="deepseek" /><category term="kimi" /><summary type="html"><![CDATA[TL;DR]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://vllm-project.github.io/assets/figures/2026-11-06-zero-mismatch-async-rl/importance-weight-peaks.png" /><media:content medium="image" url="https://vllm-project.github.io/assets/figures/2026-11-06-zero-mismatch-async-rl/importance-weight-peaks.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Introducing Kinference: An Open Source Inference Control Plane for vLLM and Kubernetes</title><link href="https://vllm-project.github.io/2026/11/04/introducing-kinference.html" rel="alternate" type="text/html" title="Introducing Kinference: An Open Source Inference Control Plane for vLLM and Kubernetes" /><published>2026-11-04T00:00:00+00:00</published><updated>2026-11-04T00:00:00+00:00</updated><id>https://vllm-project.github.io/2026/11/04/introducing-kinference</id><content type="html" xml:base="https://vllm-project.github.io/2026/11/04/introducing-kinference.html"><![CDATA[<p>We’re excited to announce <a href="https://kinference.ai/">Kinference [kay-inference]</a>, a new open source project for building scalable inference platforms with vLLM.</p>

<p><img src="/assets/figures/2026-11-04-introducing-kinference/by-buoyant-black.svg" alt="Kinference by Buoyant" /></p>

<p>We created Kinference at <a href="https://buoyant.io/">Buoyant</a> after watching our customers struggle to run open weight models in their environments. We designed Kinference to be the control plane layer for the platform you need to build. It uses vLLM to do the underlying inference, and provides the set of features necessary for building an inference platform in practice. This includes token rate limiting, tenant usage and cost tracking, intelligent load balancing, and inference policies.</p>

<p><img src="/assets/figures/2026-11-04-introducing-kinference/image2.webp" alt="Kinference Architecture" /></p>

<p>Kinference can be paired with your existing stack. Using Kinference is simply a matter of pointing inference clients to its HTTP endpoint and sending OpenAI or Anthropic-compatible inference traffic there.</p>

<p>Kinference serves a heterogeneous, evolving set of models running on a heterogeneous, evolving pool of GPUs, to a heterogenous, evolving set of clients..</p>

<h2 id="inference-load-balancing-and-performance"><strong>Inference load balancing and performance</strong></h2>

<p>In addition to policies and a routing layer, Kinference provides inference-specific load balancing that takes into account signals like GPU queue sizes, historical performance, and the contents of the KV cache on the GPU. This KV-cache awareness, in particular, allows Kinference to send requests to the vLLM worker that will do the least work for that specific request.</p>

<p>Modeling the KV cache content of the GPU can produce dramatic gains in performance for distributed inference. For example, in our <a href="https://buoyant.io/blog/distributed-inference-benchmarks-kinference-vs-plain-kubernetes">public Kinference benchmarks</a>, we showed that, when compared to standard Kubernetes load balancing (labeled “service” below), <strong>Kinference (labeled “kinference”) was able to cut median time-to-first-token (TTFT) by 95% and median end-to-end latency by 45%</strong> of requests on one workload type.</p>

<p><img src="/assets/figures/2026-11-04-introducing-kinference/image3.webp" alt="Time to First Token at light load" /></p>

<p>By incorporating cache awareness into policies, platform owners can create policies that will send simple requests to the cheaper model — but only if that’s less work than sending them to the expensive model in the first place.</p>

<p>In our <em>unloaded latency</em> benchmark above, we sought to measure the effect of Kinference’s KV-cache-aware load balancing in isolation. In our <em>capacity</em> benchmark, below, we measured the requests per minute can each endpoint can serve within a latency SLO.</p>

<p><img src="/assets/figures/2026-11-04-introducing-kinference/image4.webp" alt="Goodput by concurrency" /></p>

<p>In the capacity benchmark, Kinference served <strong>7.4× the goodput on shared-prefix and about 3.5× the goodput on multiturn</strong>. It was able to attain our chosen SLO at concurrency 32 (the highest measured) on our shared-prefix workload, and concurrency 8 on the multiturn workload, whereas the kube-proxy approach was not able to attain the SLO at any concurrency level.</p>

<p>Read more details on our benchmarking setup, process, and findings <a href="https://buoyant.io/blog/distributed-inference-benchmarks-kinference-vs-plain-kubernetes">here</a>.</p>

<h2 id="a-policy-driven-approach"><strong>A policy-driven approach</strong></h2>

<p>Central to Kinference is the idea of <em>inference policies</em>.</p>

<p>Inference policies allow platform owners to balance tradeoffs across usage, performance, and priorities. We observed our customers tackle questions like:</p>

<ul>
  <li>How do we allow users to request not just specific model checkpoints (“Qwen 3.8 with 27B params and the FP8 quantization, please”) but broader classes of models, such as “any Qwen 3.8 model” or “whatever is good for coding”?</li>
  <li>How do we redirect “easy” inference requests to cheaper models, even if the user requested an expensive model? And how do we do that without sending the whole prompt history to a cold GPU and incurring a huge latency hit?</li>
</ul>

<p>Rather than build a set of one-off features, we built a policy layer in Kinference that can express them all—and many others as well.</p>

<p>For example, here’s how you can define a YAML policy for Kinference to semantically classify prompts by complexity level, and route simpler prompts to cheaper models—unless, taking cache usage into account, it will be faster to send it to an expensive model.</p>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">apiVersion</span><span class="pi">:</span> <span class="s">kinference.buoyant.io/v1alpha1</span>
<span class="na">kind</span><span class="pi">:</span> <span class="s">InferencePolicy</span>
<span class="na">metadata</span><span class="pi">:</span>
  <span class="na">name</span><span class="pi">:</span> <span class="s">smart-semantic-routing</span>
  <span class="na">namespace</span><span class="pi">:</span> <span class="s">inference</span>
<span class="na">spec</span><span class="pi">:</span>
  <span class="na">rules</span><span class="pi">:</span>
  <span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">low-complexity-consider-qwen</span>
    <span class="na">matches</span><span class="pi">:</span>
    <span class="pi">-</span> <span class="na">model</span><span class="pi">:</span> <span class="s">glm-5.3</span>
      <span class="na">tag</span><span class="pi">:</span> <span class="s">complexity-low</span>
    <span class="na">route</span><span class="pi">:</span>
      <span class="na">consider</span><span class="pi">:</span>
      <span class="pi">-</span> <span class="na">models</span><span class="pi">:</span> <span class="pi">{</span> <span class="nv">names</span><span class="pi">:</span> <span class="pi">[</span> <span class="nv">qwen-3.6-27b</span><span class="pi">,</span> <span class="nv">glm-5.3</span> <span class="pi">]</span> <span class="pi">}</span>
      <span class="na">select</span><span class="pi">:</span> <span class="pi">[</span> <span class="pi">{</span> <span class="nv">minimize</span><span class="pi">:</span> <span class="nv">PredictedTTFT</span> <span class="pi">}</span> <span class="pi">]</span>
</code></pre></div></div>

<p>Here’s another example of using Kinference to burst the excess requests to cloud provider endpoints (like OpenAI, Anthropic, Databricks etc) when queue depth or cache pressure indicate GPUs are saturated.</p>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">apiVersion</span><span class="pi">:</span> <span class="s">kinference.buoyant.io/v1alpha1</span>
<span class="na">kind</span><span class="pi">:</span> <span class="s">InferencePolicy</span>
<span class="na">metadata</span><span class="pi">:</span>
  <span class="na">name</span><span class="pi">:</span> <span class="s">burst-policy</span>
  <span class="na">namespace</span><span class="pi">:</span> <span class="s">inference</span>
<span class="na">spec</span><span class="pi">:</span>
  <span class="na">rules</span><span class="pi">:</span>
  <span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">burst-to-cloud</span>
    <span class="na">route</span><span class="pi">:</span>
      <span class="na">exclude</span><span class="pi">:</span>
      <span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">drop-overloaded-workers</span>
        <span class="na">drop</span><span class="pi">:</span>
          <span class="na">backend</span><span class="pi">:</span>       <span class="pi">{</span> <span class="nv">type</span><span class="pi">:</span> <span class="nv">Local</span> <span class="pi">}</span>
          <span class="na">queuedPrompts</span><span class="pi">:</span> <span class="pi">{</span> <span class="nv">greaterThan</span><span class="pi">:</span> <span class="nv">2</span> <span class="pi">}</span>

      <span class="na">select</span><span class="pi">:</span>
      <span class="pi">-</span> <span class="pi">{</span> <span class="nv">type</span><span class="pi">:</span> <span class="nv">Local</span><span class="pi">,</span>
          <span class="nv">minimize</span><span class="pi">:</span> <span class="nv">PredictedTTFT</span> <span class="pi">}</span>
      <span class="pi">-</span> <span class="pi">{</span> <span class="nv">type</span><span class="pi">:</span> <span class="nv">Provider</span><span class="pi">,</span>
          <span class="nv">order</span><span class="pi">:</span> <span class="pi">[</span><span class="nv">bedrock</span><span class="pi">,</span> <span class="nv">databricks</span><span class="pi">]</span> <span class="pi">}</span>
</code></pre></div></div>

<p>Finally, here’s an example of a policy that semantically classifies prompts according to whether they contain PII, and bursts requests to the third-party provider if the GPU pool is saturated.</p>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">apiVersion</span><span class="pi">:</span> <span class="s">kinference.buoyant.io/v1alpha1</span>
<span class="na">kind</span><span class="pi">:</span> <span class="s">InferencePolicy</span>
<span class="na">metadata</span><span class="pi">:</span>
  <span class="na">name</span><span class="pi">:</span> <span class="s">pii-stays-local</span>
  <span class="na">namespace</span><span class="pi">:</span> <span class="s">inference</span>
<span class="na">spec</span><span class="pi">:</span>
  <span class="na">rules</span><span class="pi">:</span>
  <span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">serve</span>
    <span class="na">route</span><span class="pi">:</span>
      <span class="na">exclude</span><span class="pi">:</span>
      <span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">pii-never-leaves-cluster</span>
        <span class="na">if</span><span class="pi">:</span>   <span class="pi">{</span> <span class="nv">tag</span><span class="pi">:</span> <span class="nv">pii-detected</span> <span class="pi">}</span>
        <span class="na">drop</span><span class="pi">:</span> <span class="pi">{</span> <span class="nv">backend</span><span class="pi">:</span> <span class="pi">{</span> <span class="nv">type</span><span class="pi">:</span> <span class="nv">Provider</span> <span class="pi">}</span> <span class="pi">}</span>
      <span class="na">select</span><span class="pi">:</span>
      <span class="pi">-</span> <span class="pi">{</span> <span class="nv">type</span><span class="pi">:</span> <span class="nv">Provider</span><span class="pi">,</span>
          <span class="nv">order</span><span class="pi">:</span> <span class="pi">[</span> <span class="nv">databricks</span> <span class="pi">]</span> <span class="pi">}</span>
      <span class="pi">-</span> <span class="pi">{</span> <span class="nv">type</span><span class="pi">:</span> <span class="nv">Local</span><span class="pi">,</span>
          <span class="nv">minimize</span><span class="pi">:</span> <span class="nv">PredictedTTFT</span> <span class="pi">}</span>
      <span class="na">onEmpty</span><span class="pi">:</span> <span class="s">Reject</span>   <span class="c1"># fail closed</span>
</code></pre></div></div>

<p>With inference policies, platform owners can create explicit rules for how inference requests should be routed (or rejected) based on tenant, model requested, state of the underlying GPU pool, semantic classification of the prompts, and many other factors. These policies can go through human or agentic review; they can be committed to git; they can be linted and vetted; and they can be applied or rolled back independently.</p>

<p>We think this policy engine is critical for providing a true inference platform. See our <a href="http://kinference.ai/docs/">Kinference policy docs</a>  for more.</p>

<h2 id="inference-metrics-and-slos"><strong>Inference metrics and SLOs</strong></h2>

<p>Finally, there is a comprehensive suite of inference-related metrics for platform owners to monitor, alert on, and build SLOs around. Kinference reports about what’s happening on the system, including not just its own health but:</p>

<ul>
  <li>Tokens rates in and out, and histograms of input and output token sizes</li>
  <li>TTFT, ITL, and E2E latency histograms</li>
  <li>Uncached vs cached prompt tokens, for cost estimation</li>
  <li>Model usage, GPU saturation, etc</li>
</ul>

<p><img src="/assets/figures/2026-11-04-introducing-kinference/image5.webp" alt="Kinference per-tenant metrics dashboard" /></p>

<p>Almost every metric is also available per tenant, so you can track tenant usage, build specific SLOs around performance for specific tenants, and everything else you might need to ensure the platform you’re building is living up to its requirements.</p>

<h2 id="try-it-today"><strong>Try it today</strong></h2>

<p>Getting started is easy:</p>

<h3 id="01-install-the-gateway-api-crds">01 Install the Gateway API CRDs</h3>

<p><strong>Note:</strong> This guide installs Kinference into the <code class="language-plaintext highlighter-rouge">default</code> namespace. To install into a different namespace, override the namespaces in the following helm commands.</p>

<p>The first step is to install the <a href="https://gateway-api.sigs.k8s.io/docs/introduction/">Gateway API</a> CRDs, which provide standard mechanisms for handling traffic.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">GWAPI_VERSION</span><span class="o">=</span>1.5.1
kubectl apply <span class="nt">--server-side</span> <span class="nt">--force-conflicts</span> <span class="nt">-f</span> https://github.com/kubernetes-sigs/gateway-api/releases/download/v<span class="nv">$GWAPI_VERSION</span>/standard-install.yaml
</code></pre></div></div>

<h3 id="02-install-the-kinference-gateway">02 Install the Kinference gateway</h3>

<p>Kinference has two basic components: a traffic gateway and an inference handler. Each is released independently and ships its CRDs as a separate chart, installed before the component itself.</p>

<p>Install the gateway CRDs and components:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>helm upgrade <span class="nt">-i</span> gateway-crds <span class="se">\</span>
  oci://ghcr.io/buoyantio/charts/gateway-crds <span class="se">\</span>
  <span class="nt">--devel</span>

helm upgrade <span class="nt">-i</span> gateway <span class="se">\</span>
  oci://ghcr.io/buoyantio/charts/gateway <span class="se">\</span>
  <span class="nt">--devel</span> <span class="nt">--wait</span>
</code></pre></div></div>

<h3 id="03-install-kinference">03 Install Kinference</h3>

<p>Now, install Kinference and the Kinference CRDs:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>helm upgrade <span class="nt">-i</span> kinference-crds <span class="se">\</span>
  oci://cr.kinference.ai/kinference-ai/charts/kinference-crds <span class="se">\</span>
  <span class="nt">--devel</span>

helm upgrade <span class="nt">-i</span> kinference <span class="se">\</span>
  oci://cr.kinference.ai/kinference-ai/charts/kinference <span class="se">\</span>
  <span class="nt">--set</span> extension.enabled<span class="o">=</span><span class="nb">true</span> <span class="se">\</span>
  <span class="nt">--devel</span> <span class="nt">--wait</span>
</code></pre></div></div>

<h3 id="04-make-sure-its-working">04 Make sure it’s working</h3>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>kubectl get pods
</code></pre></div></div>

<p>Verify the processes are running:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>NAME                           READY   STATUS    RESTARTS   AGE
gateway-cp-566cddc46d-jsqlq    1/1     Running   0          8s
kinference-7bb854cfc5-pp4t7    1/1     Running   0          8s
</code></pre></div></div>

<p>Please always refer to the latest documentation at <a href="http://kinference.ai/docs/">http://kinference.ai/docs/</a> as these steps will evolve over time.</p>

<p>Kinference is fully open source under Apache v2. It’s available on <a href="https://github.com/Kinference-AI/kinference">GitHub</a> today. Feedback, issues and benchmark reports from other deployments are very welcome.</p>]]></content><author><name>the Kinference Team</name></author><category term="kinference" /><category term="inference-control-plane" /><category term="inference" /><category term="scalable-platforms" /><summary type="html"><![CDATA[We’re excited to announce Kinference [kay-inference], a new open source project for building scalable inference platforms with vLLM.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://vllm-project.github.io/assets/figures/2026-11-04-introducing-kinference/by-buoyant-black.webp" /><media:content medium="image" url="https://vllm-project.github.io/assets/figures/2026-11-04-introducing-kinference/by-buoyant-black.webp" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">vLLM Delivers Day-0 Support for Kimi K3.1 Pro</title><link href="https://vllm-project.github.io/2026/11/04/kimi-k31-pro.html" rel="alternate" type="text/html" title="vLLM Delivers Day-0 Support for Kimi K3.1 Pro" /><published>2026-11-04T00:00:00+00:00</published><updated>2026-11-04T00:00:00+00:00</updated><id>https://vllm-project.github.io/2026/11/04/kimi-k31-pro</id><content type="html" xml:base="https://vllm-project.github.io/2026/11/04/kimi-k31-pro.html"><![CDATA[<!-- DRAFT: every "TODO" is a blank to fill. Re-measure on the release image before publishing. Source: the K3.1 day-0 Google Doc (Tab 1). -->

<p>Kimi K3.1 Pro is Moonshot AI’s most capable open-weight model: a 2.8T-parameter (104B active) multimodal MoE with a 1M-token context that matches the strongest closed-source models on coding, agentic and knowledge benchmarks.</p>

<p>The main change is attention: K3.1 Pro adds Sparse Attention (DSA) to all 24 full-attention layers for efficiency. vLLM supports it on day 0 on NVIDIA GPUs, AMD GPUs, Google TPUs and Alibaba T-Head Zhenwu PPUs.</p>

<h2 id="tldr">TL;DR</h2>

<ul>
  <li><strong>Sparse attention on a hybrid model:</strong> K3.1 Pro keeps K3’s KDA + MLA hybrid and adds a DSA indexer to all 24 MLA layers. At long context, a decode step reads about a quarter of the bytes per layer that dense MLA reads.</li>
  <li><strong>One KV cache for three kinds of state:</strong> vLLM packs each block’s MLA latent, indexer keys and KDA state together. The packed cache runs with FlashInfer and FlashMLA sparse kernels with FP8 or NVFP4 KV and optional MXFP4 index keys, and P/D disaggregation transfers it unchanged.</li>
  <li><strong>Token-sharded prefill attention:</strong> up to 1.69× faster time to first token (TTFT) than head-sharded prefill at 340K tokens on 8× GB300.</li>
  <li><strong>Decode context parallelism (DCP) with a sparse indexer:</strong> an exact top-k merge with <strong>~10× less traffic</strong> makes the attention module <strong>1.3–1.5× faster</strong> at DCP8. DCP prefill attention runs 4.1–4.3× faster per layer, and DCP8 holds 7.2× the KV tokens of TP8.</li>
  <li><strong>Fused low-latency decode:</strong> the specialized CuTe DSL decode path from Kimi K3 now covers DSA layers, making decode 1.2–1.6× faster on 8× GB300, and 1.9× faster under DCP8.</li>
  <li><strong>Agentic serving:</strong> on NVIDIA GB300, up to 375.9 tok/s per user at the latency-sensitive end and 37.8K total tok/s per GPU at the throughput end; on NVIDIA Rubin, up to 815.6 tok/s per user and 68.7K total tok/s per GPU on the SemiAnalysis AgentX benchmark.</li>
  <li><strong>Zero-mismatch RL on day 0:</strong> for the first time, day-0 support comes with zero-mismatch RL: vLLM and Megatron produce bit-identical log-probs for both the base model and the LoRA adapter, so the PPO KL is exactly 0 at every step of a 100-step full-model run.</li>
</ul>

<h2 id="quick-start">Quick start</h2>

<p>On NVIDIA GPUs:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># See the Kimi K3.1 recipe for the Docker image and multi-node commands.</span>
vllm serve moonshotai/Kimi-K3.1-Pro <span class="se">\</span>
  <span class="nt">--tensor-parallel-size</span> 8 <span class="se">\</span>
  <span class="nt">--trust-remote-code</span> <span class="se">\</span>
  <span class="nt">--load-format</span> fastsafetensors <span class="se">\</span>
  <span class="nt">--enable-auto-tool-choice</span> <span class="se">\</span>
  <span class="nt">--tool-call-parser</span> kimi_k3 <span class="se">\</span>
  <span class="nt">--reasoning-parser</span> kimi_k3 <span class="se">\</span>
  <span class="nt">--speculative-config</span> <span class="s1">'{"model":"Inferact/Kimi-K3.1-Pro-DSpark-preview","num_speculative_tokens":5,"method":"dspark","draft_sample_method":"probabilistic"}'</span>
</code></pre></div></div>

<p>On AMD GPUs:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">VLLM_ROCM_USE_AITER</span><span class="o">=</span>1 <span class="nv">SAFETENSORS_FAST_GPU</span><span class="o">=</span>1 <span class="se">\</span>
vllm serve moonshotai/Kimi-K3.1-Pro <span class="se">\</span>
      <span class="nt">--served-model-name</span> kimi-k31-pro <span class="se">\</span>
      <span class="nt">--tensor-parallel-size</span> 8 <span class="se">\</span>
      <span class="nt">--trust-remote-code</span> <span class="se">\</span>
      <span class="nt">--load-format</span> fastsafetensors <span class="se">\</span>
      <span class="nt">--max-num-seqs</span> 16 <span class="se">\</span>
      <span class="nt">--gpu-memory-utilization</span> 0.85 <span class="se">\</span>
      <span class="nt">--speculative-config</span> <span class="s1">'{"model":"Inferact/Kimi-K3.1-Pro-DSpark-preview","num_speculative_tokens":5,"method":"dspark","draft_sample_method":"probabilistic"}'</span>
</code></pre></div></div>

<h2 id="whats-new-in-kimi-k31-pro">What’s new in Kimi K3.1 Pro</h2>

<table>
  <thead>
    <tr>
      <th> </th>
      <th>Kimi K3</th>
      <th>Kimi K3.1 Pro</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Layers</td>
      <td>93: 69 KDA + 24 full attention</td>
      <td>93: 69 KDA + 24 full attention</td>
    </tr>
    <tr>
      <td>Full-attention layers</td>
      <td>dense MLA</td>
      <td>MLA + DSA indexer (top-2048), NoPE</td>
    </tr>
    <tr>
      <td>Indexer</td>
      <td>none</td>
      <td>32 heads × 128 dims, FP8 keys</td>
    </tr>
    <tr>
      <td>MoE</td>
      <td>896 experts, 16 active, MXFP4</td>
      <td>unchanged</td>
    </tr>
    <tr>
      <td>Context window</td>
      <td>1M</td>
      <td>1M</td>
    </tr>
    <tr>
      <td>Total parameters</td>
      <td>2.8T</td>
      <td>2.8T</td>
    </tr>
  </tbody>
</table>

<h3 id="sparse-attention-in-k31-pro">Sparse Attention in K3.1 Pro</h3>

<p>Each sparse attention layer has a small <em>indexer</em> next to its MLA attention. The indexer keeps one FP8 key per token (132 bytes with its scale) and scores every earlier token for each query with 32 lightweight heads. Then it keeps the top 2,048 tokens. MLA attention then runs exactly, but only over those 2,048 tokens. DSA was introduced in DeepSeek-V3.2; our <a href="https://vllm.ai/blog/2025-09-29-deepseek-v3-2">DeepSeek-V3.2 post</a> covers the indexer in more detail.</p>

<p>The payoff is largest in long-context decode, which is bound by memory bandwidth. Dense MLA reads 576 bytes of FP8 latent per context token per layer. DSA still scans the whole context, but only the 132-byte index keys. It then reads the full latent for just 2,048 tokens. At long context, that is about 23% of the bytes dense MLA reads per layer.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/kimi-k31-dsa.html" title="Kimi K3.1 Pro sparse attention: indexer, top-k token selection, and sparse MLA" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 960px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 1: Sparse attention (DSA) in Kimi K3.1 Pro. The indexer scores every past token, keeps the top 2,048, and every query head attends exactly over only those tokens’ latents. Step through it.</em></p>

<h3 id="kv-cache-footprint">KV cache footprint</h3>

<p>The index keys are a second per-token cache next to the MLA latent. Under tensor parallelism (TP) both are replicated on every GPU; KDA state is per request, as in K3.</p>

<table>
  <thead>
    <tr>
      <th>KV cache per token, per GPU (24 full-attention layers)</th>
      <th>Bytes</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Kimi K3, FP8 MLA latent</td>
      <td>13,824</td>
    </tr>
    <tr>
      <td>Kimi K3.1 Pro, FP8 latent + FP8 index keys</td>
      <td>16,992</td>
    </tr>
    <tr>
      <td>Kimi K3.1 Pro, NVFP4 latent + MXFP4 index keys</td>
      <td>10,080</td>
    </tr>
  </tbody>
</table>

<p>The latent and the index keys can be quantized independently. An NVFP4 latent alone already brings K3.1 Pro below K3 with FP8. Opt-in MXFP4 index keys fit 11% more tokens on top and make the indexer 10–20% faster at long context. With both, eight GB300 GPUs hold 1.7× as many tokens as with FP8, and DCP8 multiplies that by seven: about 36 full 1M-token contexts at once, against 3 for TP8 with FP8.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/kimi-k31-kv-capacity.html" title="How many Kimi K3.1 Pro contexts fit on eight GB300 GPUs" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 740px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 2: Measured KV cache capacity on 8× GB300. Change the latent and index-key formats, the parallelism, or the context length to see how many full contexts fit.</em></p>

<h2 id="a-kv-cache-for-three-kinds-of-state">A KV cache for three kinds of state</h2>

<p>Each DSA layer stores two per-token caches of different widths: the MLA latent (576 bytes in FP8, 352 in NVFP4) and the index keys (132 bytes in FP8, 68 in MXFP4). Neither width is a multiple of the other. The 69 KDA layers each add a recurrent state per request that is much larger than one layer’s page of tokens. A cache that gives every layer pages of the same size would have to pad the small pages up to the largest one.</p>

<p>vLLM packs the cache by block instead of by layer. One block of the cache is a single contiguous row that holds that block’s MLA pages and index-key pages for all 24 DSA layers, together with the KDA states that share the block. Pages inside a row can have different sizes; the only constraint is that the row holds the KDA states. The block size is a power of two, so blocks of prefill and decode instances that run at different TP sizes divide evenly and can be paired for KV transfer.</p>

<p>The attention kernels still see the small fixed-size pages they expect. vLLM translates block tables and cache slots into kernel-page addresses before each step, so FlashInfer’s and FlashMLA’s sparse MLA kernels and DeepGEMM’s indexer kernels read the packed cache without changes.</p>

<p>This layout makes the rest of the stack work:</p>

<ul>
  <li><strong>Any sparse MLA kernel and KV format.</strong> On Blackwell the default is FlashInfer’s sparse MLA with an FP8 latent. FlashInfer’s new PrimsTS kernels also serve an NVFP4 latent.</li>
  <li><strong>Disaggregated serving.</strong> Each block is one contiguous range of memory, so a P/D transfer moves it with one large RDMA read instead of dozens of small per-layer reads.</li>
  <li><strong>Shared infrastructure.</strong> The same packed planner serves GLM-5.3-Flash and DeepSeek-V4, whose caches have the same problem of mixed page sizes (see the <a href="https://vllm.ai/blog/2026-04-24-deepseek-v4">DeepSeek V4 post</a>).</li>
</ul>

<iframe class="vllm-embed" src="/assets/interactive_pages/kimi-k31-kv-layout.html" title="How Kimi K3.1 Pro's packed KV cache maps a block ID to byte addresses" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 1070px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 3: How the packed cache is laid out at TP8. The attention group and the three KDA groups share one pool of block rows; pick a token, a DSA layer and a KDA layer to see which block and page each one lands in.</em></p>

<h2 id="prefill-shard-the-attention-by-token-not-by-head">Prefill: shard the attention by token, not by head</h2>

<p>Under TP8, each GPU owns 12 of K3.1 Pro’s 96 attention heads. That is a poor fit for sparse MLA prefill, for the same reasons described in our <a href="https://vllm.ai/blog/2026-10-23-glm53-part2-pcp-dcp-hisparse">GLM-5.3 post</a>:</p>

<ul>
  <li>MLA’s latent KV is shared by all heads, so every GPU reads the full cache to serve only 12 heads, and the sparse kernels pad those 12 heads to their minimum tile.</li>
  <li>The indexer is not split by head at all: every GPU scores every token, so its quadratic cost is repeated eight times.</li>
</ul>

<p>For large prefill steps, vLLM shards the attention by token instead. An all-to-all moves each GPU’s query from “all tokens, 12 heads” to “1/8 of the tokens, all 96 heads”. Each GPU runs the indexer and sparse MLA for its own tokens, and a second all-to-all returns the output to the head layout. The KV cache is already replicated under TP, so nothing else changes. MoE, sequence parallelism and the cache layout stay as they are. To balance causal attention, each request is cut into 16 pieces and GPU <em>r</em> takes pieces <em>r</em> and 15 − <em>r</em>, the same balanced split as prefill context parallelism. Both all-to-alls write directly into peers’ symmetric memory.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/kimi-k31-shardq.html" title="Token-sharded prefill: two all-to-alls move each GPU from a slice of the heads to a balanced slice of the tokens" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 1010px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 4: Token-sharded prefill, before and after, on four GPUs. Split by head, every GPU repeats the indexer and pads its head tile; after an all-to-all, each GPU scores only a balanced slice of the tokens with every head. Step through it.</em></p>

<p>The result on 8× GB300 with TP8, real weights and one request at a time:</p>

<table>
  <thead>
    <tr>
      <th>Prompt tokens</th>
      <th>TTFT, head-sharded</th>
      <th>TTFT, token-sharded</th>
      <th>Speedup</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>27K</td>
      <td>0.82 s</td>
      <td>0.71 s</td>
      <td>1.16×</td>
    </tr>
    <tr>
      <td>108K</td>
      <td>3.72 s</td>
      <td>2.89 s</td>
      <td>1.29×</td>
    </tr>
    <tr>
      <td>340K</td>
      <td>15.89 s</td>
      <td>9.42 s</td>
      <td>1.69×</td>
    </tr>
  </tbody>
</table>

<p>Short appends on a long cached prefix, common in agentic turns, benefit too. For a 2K-token append on a 150K-token cached prefix, the indexer and sparse MLA kernels take about 15 ms per GPU instead of 56 ms (8× GB300, FlashInfer sparse MLA). The cost is the exchange buffers, about 0.8 GiB of KV cache per GPU.</p>

<h2 id="long-context-decode-context-parallelism-with-a-sparse-indexer">Long context: decode context parallelism with a sparse indexer</h2>

<p>TP replicates the MLA latent on every GPU, so adding GPUs does not add KV capacity. <a href="https://vllm.ai/blog/2026-08-07-decode-context-parallelism">Decode context parallelism</a> (DCP) shards the cache by token instead: GPU <em>r</em> of <em>W</em> stores every <em>W</em>-th token. For dense MLA, each GPU attends over its shard and the partial outputs are combined by their log-sum-exp (LSE).</p>

<p>DSA adds one step: each GPU can rank only its own 1/<em>W</em> of the tokens, so the global top-2048 has to be merged across GPUs in every layer before attention starts.</p>

<h3 id="an-exact-top-k-merge-with-10-less-traffic">An exact top-k merge with 10× less traffic</h3>

<p>The generic merge sends every GPU’s full local top-2048, as FP32 score and token id pairs, to every other GPU. At DCP8 on 8× GB300, with 64 AgentX-like requests of 5 query tokens each, it takes 258 µs of a 671 µs attention module.</p>

<p>vLLM sends far less. Each GPU picks only its best 1.5 × 2048 / <em>W</em> candidates straight from the BF16 scores and packs each with its score into 32 bits, about 10× fewer bytes. Every GPU then radix-selects the same global top-2048 from the gathered candidates. The merge stays exact: if a GPU holds more of the top-2048 than it sent, the select detects it and that GPU resends its full local top-k for that row.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/kimi-k31-dcp-merge.html" title="DCP8 attention module time: generic merge vs exact one-round merge vs Kimi K3 dense MLA" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 580px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 5: One DSA attention module at DCP8 on 8× GB300 with 5 query tokens per request. The exact one-round merge is 1.27–1.51× faster than the generic merge. Hover a bar for its value.</em></p>

<p>From batch 32 up, and at 128K context, K3.1 Pro’s sparse attention under DCP8 is now faster than K3’s dense MLA.</p>

<p>The partial attention outputs are then exchanged and combined by LSE with two CuTe DSL kernels on symmetric memory: up to 3.7× faster than the existing CUDA implementation (320 BF16 shapes on 8× GB300), with bit-identical output. This helps every MLA model under DCP.</p>

<h3 id="dcp-prefill-without-a-merge">DCP prefill without a merge</h3>

<p>A plain DCP prefill would pay the merge and the LSE combine for every prompt token, and repeat the attention work on every GPU. When the DCP group is the TP group, vLLM instead gathers the step’s context, both MLA latent and index keys, from all GPUs into a symmetric-memory workspace (about 0.7 GB per 1M tokens per GPU with FP8). It then runs the token-sharded prefill from the previous section over it. No merge or combine remains, and the output matches token-sharded prefill without DCP bit for bit.</p>

<table>
  <thead>
    <tr>
      <th>One DSA layer, DCP8 on 8× GB300, AgentX mixed 16K-token step</th>
      <th>DCP prefill</th>
      <th>Gathered-context prefill</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>FP8, FlashInfer trtllm-gen</td>
      <td>24.8 ms</td>
      <td>5.8 ms (4.3×)</td>
    </tr>
    <tr>
      <td>FP8, FlashInfer PrimsTS</td>
      <td>24.8 ms</td>
      <td>5.7 ms (4.3×)</td>
    </tr>
    <tr>
      <td>NVFP4, FlashInfer PrimsTS</td>
      <td>25.7 ms</td>
      <td>6.2 ms (4.1×)</td>
    </tr>
  </tbody>
</table>

<p>End to end, a single request prefills as fast under DCP8 as under TP8: 1.10, 4.40 and 14.61 s at 27K, 108K and 340K tokens, vs 1.10, 4.39 and 14.50 s (8× GB300, FP8 KV).</p>

<h3 id="when-to-use-dcp">When to use DCP</h3>

<p>DCP trades per-step latency for KV capacity: DCP8 cuts the per-GPU MLA and index-key caches by eight, and KDA state is already split by head. When the context fits, plain TP decodes faster at low concurrency; DCP pays off when KV is the limit, as with very long contexts or many long-lived agentic sessions. On 8× GB300, DCP8 holds 21.8M tokens of FP8 KV vs 3.04M for TP8 (32.1M vs 4.49M with an NVFP4 latent). At concurrency 1, TPOT is 9.35 ms with TP8 and 11.48 ms with DCP8 at 32K context (9.45 vs 11.58 ms at 128K); the fused decode path brings DCP8 to 5.96 and 6.04 ms.</p>

<p>Eight GPUs at TP8 also serve full 1M-token requests: on 8× GB300 with FP8 KV the cache holds 3.04M tokens, 2.9 concurrent 1M-token requests.</p>

<h2 id="low-latency-decode-a-fused-dsa-decode-path">Low-latency decode: a fused DSA decode path</h2>

<p>For Kimi K3, vLLM ships an opt-in decode path that replaces almost every operator with CuTe DSL kernels tuned for small batches. It fuses communication into compute, reworks the MoE schedule and prefetches weights into L2 (see <a href="https://vllm.ai/blog/2026-10-16-kimi-k3-megakernel">Hyper Optimizing Kimi K3 in vLLM</a>). For K3.1 Pro, this path now covers the DSA layers. A DSA layer runs as:</p>

<ul>
  <li>one packed input projection for the query, KV latent, output gate and the indexer’s key and head weights;</li>
  <li>a fused indexer front: the query norm, the indexer’s query projection, its FP8 or MXFP4 quantization with the head weights folded in, and the new token’s index key, in one kernel;</li>
  <li>the MLA query (the up-projection and absorbed key projection, writing the new token’s latent into the KV cache), overlapped with the indexer instead of running before it;</li>
  <li>a fused indexer: a key-balanced scorer and an exact top-k select in two kernels that emit the physical KV rows the attention reads;</li>
  <li>sparse attention: FlashInfer sparse MLA (trtllm-gen or PrimsTS, picked per batch size) or FlashMLA sparse; under DCP at batch 1–8, a CuTe DSL kernel built for the shape (11.9 µs vs 21.4 µs per layer at batch 1);</li>
  <li>the value projection and sigmoid gate in one kernel, followed by K3’s output projection with its fused all-reduce.</li>
</ul>

<p>Under DCP, the query is published to every GPU, each GPU’s top-k candidates are exchanged and merged exactly, and the partial outputs are combined by LSE, all through NVLink mailboxes inside the kernels, with no NCCL collective on the path.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/kimi-k31-fused-tpot.html" title="Time per output token, default path vs fused decode path, batch 1 to 64" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 540px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 6: Time per output token on 8× GB300 with TP8 and a 1K-token input. The fused decode path is 1.63× faster at batch 1 and still 1.18× at batch 64. Hover a bar for its value.</em></p>

<p>With DSpark speculative decoding (7 draft tokens), the fused path lowers time per token at concurrency 1 from 2.86 ms to 2.14 ms. GSM8K accuracy is unchanged. Under DCP8, the fused path cuts TPOT at concurrency 1 from 11.48 ms to 5.96 ms at 32K context and from 11.58 ms to 6.04 ms at 128K.</p>

<h2 id="speculative-decoding-with-dspark">Speculative decoding with DSpark</h2>

<p>We trained a DSpark speculator for K3.1 Pro and released a preview checkpoint: <a href="https://huggingface.co/Inferact/Kimi-K3.1-Pro-DSpark-preview">Inferact/Kimi-K3.1-Pro-DSpark-preview</a>. With realistic sampling (temperature 1.0, top-p 0.95), the preview already reaches a mean acceptance length of 4.597 on GSM8K with 7 draft tokens. At batch size 1 with TP8 on 8× GB300, that is a 3.0× decode speedup. The speculator also keeps its accuracy across K3.1 Pro’s full context window of up to 1M tokens, measured on the long-context BEAM benchmark.</p>

<p>This checkpoint is only a preview. We are training a more accurate and more efficient speculator right now and will release it soon.</p>

<h2 id="agentic-serving-agentx">Agentic serving: AgentX</h2>

<p>vLLM delivers strong performance on agentic serving workloads. We benchmark our day-0 image with the SemiAnalysis AgentX benchmark on NVIDIA GB300 and NVIDIA Rubin.</p>

<h3 id="nvidia-gb300">NVIDIA GB300</h3>

<p>At the latency-sensitive end of the frontier, Kimi K3.1 Pro holds 375.9 tokens per second per user. Further along the frontier, it keeps each user above 100 tokens per second while serving 19.2K total tokens per second per GPU. At the throughput end, it reaches 37.8K tokens per second per GPU, about 26× the most interactive point, while each user still sees about 54 tokens per second.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/kimi-k31-agentx-gb300.html" title="Kimi K3.1 Pro AgentX Pareto frontier on NVIDIA GB300" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 520px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 7: AgentX Pareto frontier for Kimi K3.1 Pro on NVIDIA GB300, with 4 speculative tokens and a synthetic acceptance length of 3.36 tokens. Hover a point for its configuration and metrics.</em></p>

<h3 id="nvidia-rubin">NVIDIA Rubin</h3>

<p>On NVIDIA Rubin, Kimi K3.1 Pro holds 815.6 tokens per second per user at the latency-sensitive end of the frontier. Further along the frontier, it keeps each user above 100 tokens per second while serving 46.0K total tokens per second per GPU. At the throughput end, it reaches 68.7K tokens per second per GPU, about 51× the most interactive point, while each user still sees about 75 tokens per second.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/kimi-k31-agentx-rubin.html" title="Kimi K3.1 Pro AgentX Pareto frontier on NVIDIA Rubin" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 520px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 8: AgentX Pareto frontier for Kimi K3.1 Pro on NVIDIA Rubin. Points up to concurrency 64 use 7 speculative tokens with a synthetic acceptance length of 3.84 tokens; higher concurrencies use 3 speculative tokens with 3.0. Hover a point for its configuration and metrics.</em></p>

<h2 id="zero-mismatch-rl-on-day-0">Zero-mismatch RL on day 0</h2>

<p>For the first time, vLLM’s day-0 support ships RL with zero mismatch: LoRA RL with <a href="https://github.com/volcengine/verl">verl</a>, vLLM as the rollout engine and Megatron as the trainer, where the trainer’s log-probs equal the rollout’s bit for bit. Instead of bounding the gap with importance sampling or routing replay, vLLM eliminates it at the kernel level: the trainer’s forward pass reproduces the rollout bit for bit, which takes RL training stability to a new level:</p>

<ul>
  <li><strong>LoRA RL on the whole model.</strong> Rank-32 LoRA covers every attention projection and all 896 experts, and both the base model and the adapter are bit-identical between vLLM and Megatron.</li>
  <li><strong>Batch-invariant kernels, natively.</strong> With <code class="language-plaintext highlighter-rouge">VLLM_BATCH_INVARIANT=1</code> a token’s log-prob does not depend on its batch, and more and more of vLLM’s high-performance kernels are batch-invariant by design, such as the DeepSelect top-k.</li>
</ul>

<iframe class="vllm-embed" src="/assets/interactive_pages/kimi-k31-rl.html" title="One LoRA RL step on Kimi K3.1 Pro: the trainer reproduces the rollout's log-probs bit for bit" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 440px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 9: Same tokens, same kernels, same log-probs. Switch to the default rollout to compare.</em></p>

<p>Over 100 steps on the full model, the rollout/trainer KL is exactly 0.0 at every step while AIME mean@8 rises from 0.451 to 0.664 (Figure 10).</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/kimi-k31-rl-100.html" title="100 LoRA RL steps on Kimi K3.1 Pro: zero rollout/trainer mismatch, training reward and AIME accuracy" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 560px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 10: A 100-step LoRA RL run on the full model.</em></p>

<p>Performance optimization of the batch-invariant path is ongoing. The source code is in <a href="https://github.com/Inferact/zero-mismatch-rl">Inferact/zero-mismatch-rl</a>.</p>

<h2 id="amd">AMD</h2>

<p>On AMD Instinct MI355X, vLLM combines MXFP4 indexing with sparse attention and decode context parallelism. The optimizations reduce memory requirements for long contexts and improve prefill and decode efficiency.</p>

<h3 id="quantization-native-mxfp4-indexer">Quantization: Native MXFP4 indexer</h3>

<p>The indexer scans the context before selecting 2,048 tokens for attention. MXFP4 reduces each index key from 132 bytes in FP8 to 68 bytes, including scales, cutting index-cache storage by <strong>48.5%.</strong> Scoring uses native FP4 matrix instructions with FP32 accumulation and weighted reduction across heads. Keys are reused across query rows during speculative verification to reduce repeated reads.</p>

<p>The smaller index cache leaves more GPU memory available for cached context, benefiting long-context serving at high concurrency. In AgentX sweeps, the MXFP4-indexer configuration delivered <strong>5.3%</strong> higher total workload throughput at concurrency 48.</p>

<h3 id="prefill-context-parallel-sparse-attention">Prefill: Context-parallel sparse attention</h3>

<p>During prefill, GPUs gather index keys and divide query rows among themselves. Each GPU scores its assigned rows against the full context and selects the global top-k directly, avoiding a merge of per-rank candidates. Main attention can separately gather KV when this reduces communication and fits the workspace budget, then process all query rows for local heads.</p>

<p>The combined DCP prefill optimizations improved throughput and latency in development benchmarks.</p>

<table>
  <thead>
    <tr>
      <th><strong>Input / output tokens</strong></th>
      <th><strong>Total throughput (tokens/s)</strong></th>
      <th><strong>Output throughput (tokens/s)</strong></th>
      <th><strong>Median TTFT (s)</strong></th>
      <th><strong>Median TPOT (ms)</strong></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>8K / 1K</td>
      <td>5,357.8 → <strong>6,015.4 (+12%)</strong></td>
      <td>595.3 → <strong>668.4</strong></td>
      <td>2.462 → <strong>1.875</strong></td>
      <td>24.571 → <strong>22.063</strong></td>
    </tr>
    <tr>
      <td>128K / 100</td>
      <td>6,950 → <strong>17,678 (+154%)</strong></td>
      <td>5.30 → <strong>13.48</strong></td>
      <td>268.7 → <strong>105.5</strong></td>
      <td>331.5 → <strong>129.6</strong></td>
    </tr>
  </tbody>
</table>

<p><em>Setup: MI355X, TP8/DCP8, concurrency 16, 64 prompts, prefix caching disabled.</em></p>

<p>FlyDSL sparse MLA reads the selected tokens directly from the FP8 KV cache. Each workgroup processes one query row across its local attention heads, providing parallelism across the many query rows in a prefill step. Smaller batches retain the Triton path, which exposes additional parallelism within each row.</p>

<table>
  <thead>
    <tr>
      <th><strong>Implementation</strong></th>
      <th><strong>Benchmark duration (s)</strong></th>
      <th><strong>Median TTFT (s)</strong></th>
      <th><strong>Output throughput (tokens/s)</strong></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Triton</td>
      <td>432.8</td>
      <td>96.2</td>
      <td>14.79</td>
    </tr>
    <tr>
      <td>FlyDSL</td>
      <td><strong>404.4</strong></td>
      <td><strong>89.8</strong></td>
      <td><strong>15.83</strong></td>
    </tr>
    <tr>
      <td>Improvement</td>
      <td><strong>6.6% lower</strong></td>
      <td><strong>6.6% lower</strong></td>
      <td><strong>7.0% higher</strong></td>
    </tr>
  </tbody>
</table>

<p><em>Setup: MI355X, TP8/DCP8, concurrency 16, 64 prompts, ISL/OSL 128K/100</em></p>

<h3 id="decode-fused-low-latency-decode">Decode: Fused Low-latency decode</h3>

<p>For small speculative verification batches, DSA indexing and sparse attention run separately, followed by a persistent monokernel that fuses attention output projection, AttnRes and the full latent MoE computation, including tensor-parallel all-reduces, into a single launch. This reduces kernel-launch overhead and overlaps MoE weight loading with preceding reduction and residual processing. The specialized path supports up to eight verification tokens per step, including a single request with seven draft tokens.</p>

<table>
  <thead>
    <tr>
      <th>Metrics</th>
      <th>Normal Path</th>
      <th>Specialized decode</th>
      <th>Improvement</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>mean TPOT</td>
      <td>6.02 ms</td>
      <td>4.40 ms</td>
      <td>27.0%</td>
    </tr>
  </tbody>
</table>

<p><em>Setup: TP8/DCP1, FP8 indexer, 8K/1K, c1, draft tokens 7, synthetic AL 3.84</em></p>

<h3 id="communication-efficient-cross-gpu-communication">Communication: Efficient cross-GPU communication</h3>

<p>During decode, each GPU exchanges candidate scores while keeping token IDs local. A shared threshold and consistent tie handling determine which local candidates are selected. For 2,048 candidates, exchanging scores alone halves the candidate payload from 16 to 8 KiB per query per GPU.</p>

<p>AITER accelerates DCP all-gather with a dedicated GPU kernel that reads peer buffers through HIP IPC and writes directly into the required output layout. This combines data gathering and layout conversion, avoiding a separate reordering copy. In standalone microbenchmarks on eight MI355X GPUs, the AITER path reduced all-gather latency by <strong>53–61%</strong> versus RCCL for the tested query and candidate tensor shapes</p>

<h2 id="tpu">TPU</h2>

<p>vLLM supports Kimi K3.1 Pro on day 0 on TPU through vllm-torchtpu, validated on a 16-chip slice of TPU v7x. The layout is TP32 with EP32 for the MoE, with DCP that shards the MLA latent and index keys by token for long contexts. DSA’s work is split between the TPU’s two kinds of compute units: TensorCore scores the FP8 index keys, then SparseCore selects the top 2,048 tokens and gathers their latents into a dense buffer for TensorCore’s MXU to run attention. As on GPU, the DSA and KDA state share one block-indexed KV pool, which keeps prefix caching working across the hybrid cache.</p>

<h2 id="alibaba-t-head">Alibaba T-HEAD</h2>

<p>The Alibaba T-HEAD team added support for running Kimi K3.1 Pro on the Alibaba T-HEAD Zhenwu PPU (both M890 and 810E) through the <a href="https://github.com/vllm-project/vllm-sail">vllm-sail</a> plugin. The validated configurations are as follows:</p>

<ul>
  <li>810E: Two nodes, TP32 / EP32, using the W4A16 MoE backend</li>
  <li>M890: Four nodes, TP8 / DP4 / EP32, using DeepEP</li>
</ul>

<p>This marks the first time the Zhenwu PPU offers Day-0 support for a mainstream open-source large model, with continuous support coming soon.</p>

<h2 id="acknowledgements">Acknowledgements</h2>

<p>We extend our sincere gratitude to the Moonshot team for open-sourcing Kimi K3.1 Pro. We also thank Inferact, AMD, and Alibaba T-Head for delivering day-0 support for the model in vLLM, and NVIDIA for their help.</p>]]></content><author><name>Inferact and the vLLM Team</name></author><category term="models" /><category term="day-0-support" /><category term="sparse-attention" /><category term="performance" /><summary type="html"><![CDATA[]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://vllm-project.github.io/assets/figures/2026-11-04-kimi-k31-pro/social-preview.png" /><media:content medium="image" url="https://vllm-project.github.io/assets/figures/2026-11-04-kimi-k31-pro/social-preview.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Day 0 support for Mistral Large 4 on vLLM</title><link href="https://vllm-project.github.io/2026/10/29/mistral-large-4.html" rel="alternate" type="text/html" title="Day 0 support for Mistral Large 4 on vLLM" /><published>2026-10-29T00:00:00+00:00</published><updated>2026-10-29T00:00:00+00:00</updated><id>https://vllm-project.github.io/2026/10/29/mistral-large-4</id><content type="html" xml:base="https://vllm-project.github.io/2026/10/29/mistral-large-4.html"><![CDATA[<p>We’re excited to announce day-0 support for <strong>Mistral Large 4</strong> in vLLM. Mistral Large 4 is
Mistral’s new frontier mixture-of-experts native multimodal model. It combines a DeepSeek-style sparse attention
stack (MLA plus a DSA top-k indexer) with several new architecture features: cross-layer KV
sharing, NoPE layers, SSMax and LeRoPE. It ships with a built-in DSpark speculative decoding
drafter and a Pixtral vision encoder.</p>

<p>Supporting it took more than a model file. ML4 runs on vLLM’s model runner V2 (MRV2) with breakable
CUDA graphs. Its building blocks live in a new <code class="language-plaintext highlighter-rouge">vllm/models/mistral/</code> package, and the work produced
generic improvements to decode context parallelism (DCP), prefill context parallelism (PCP),
DSpark, NIXL-based disaggregated serving and HiSparse host-memory KV offload.</p>

<h2 id="highlights">Highlights</h2>

<ul>
  <li><strong>Architecture:</strong> 72-layer MoE with 128 routed experts (top-4) plus 1 shared expert and a
hidden size of 6144. Attention is MLA (KV LoRA rank 512, RoPE dim 64) with a DSA sparse indexer
that selects the top 2048 keys per query. 1 trillion parameters in total, 49 billion active per
token (52 billion including embeddings and output layers).</li>
  <li><strong>Checkpoints:</strong> FP8 (block-scaled weights) and NVFP4 (NVFP4 experts, FP8 attention/shared
experts). Both use an FP8 latent KV cache (<code class="language-plaintext highlighter-rouge">fp8_ds_mla</code>) by default.</li>
  <li><strong>Multimodal:</strong> a Pixtral vision encoder for image inputs, including multiple images per prompt.</li>
  <li><strong>Speculative decoding:</strong> a built-in DSpark drafter (3 sliding-window MLA layers, depth 3)
accepts ~2.9 tokens per step and gives about 2x output throughput on TP8.</li>
  <li><strong>Long context:</strong> DCP gives ~7.9x more KV capacity on TP8. PCP+DCP prefill cuts time to first token (TTFT) by up to 1.6x. DSpark works under both.</li>
  <li><strong>Disaggregated serving:</strong> NIXL prefill/decode (P/D) disaggregation with DP/EP, TP and PCP×DCP prefill
nodes, with DSpark on both sides.</li>
  <li><strong>HiSparse:</strong> host-memory sparse KV offload, now with support for cross-layer KV sharing.</li>
  <li><strong>AMD:</strong> day-0 on AMD Instinct MI350 Series GPUs with ROCm, including DSpark, image inputs and expert parallelism with MXFP4 experts.</li>
</ul>

<h2 id="usage">Usage</h2>

<p>Mistral Large 4 support ships in the <code class="language-plaintext highlighter-rouge">vllm/vllm-openai:mistral-large-4</code> Docker image, which also
includes <code class="language-plaintext highlighter-rouge">mistral-common</code> 1.13. The commands below run <code class="language-plaintext highlighter-rouge">vllm serve</code> inside it:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>docker pull vllm/vllm-openai:mistral-large-4
</code></pre></div></div>

<p><strong>FP8 on 8 GPUs:</strong></p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>vllm serve mistralai/Mistral-Large-4-1T-A52B <span class="se">\</span>
  <span class="nt">--tensor-parallel-size</span> 8 <span class="se">\</span>
  <span class="nt">--speculative-config</span> <span class="s1">'{"method": "dspark", "num_speculative_tokens": 3}'</span> <span class="se">\</span>
  <span class="nt">--tool-call-parser</span> mistral <span class="nt">--enable-auto-tool-choice</span> <span class="se">\</span>
  <span class="nt">--reasoning-parser</span> mistral
</code></pre></div></div>

<p><strong>NVFP4 on 4 GPUs</strong> (Blackwell; use <code class="language-plaintext highlighter-rouge">--tensor-parallel-size 8</code> on 8 GPUs):</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>vllm serve mistralai/Mistral-Large-4-1T-A52B-NVFP4 <span class="se">\</span>
  <span class="nt">--tensor-parallel-size</span> 4 <span class="se">\</span>
  <span class="nt">--speculative-config</span> <span class="s1">'{"method": "dspark", "num_speculative_tokens": 3}'</span> <span class="se">\</span>
  <span class="nt">--tool-call-parser</span> mistral <span class="nt">--enable-auto-tool-choice</span> <span class="se">\</span>
  <span class="nt">--reasoning-parser</span> mistral
</code></pre></div></div>

<p>NVFP4 does not trade quality for speed. On multimodal, long-context, agentic coding, business
automation and cyber evals it stays within 2.1 points of FP8 on every task, and the mean difference
is −0.3 points. Token consumption is matched too: mean completion tokens stay within about 4% of FP8.
It is also faster and lighter: at TP8, NVFP4 decodes 1.08–1.19x faster per token than FP8 without
spec decoding (1.18–1.22x with DSpark) and holds ~1.5x the KV cache.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/ml4-nvfp4-quality.html" title="Mistral Large 4 NVFP4 vs FP8 checkpoint scores and completion tokens on core evals" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 720px; border: 0; overflow: hidden;"></iframe>
<p>*Comparison of FP8 versus NVFP4 scores and token consumption on core evaluations. Error bars show 95% confidence intervals estimated by bootstrapping. Across all domains, including multimodal reasoning (GDP.pdf, MathVision), long-context (Graphwalks 512k), coding agents (DeepSWE, SWE-bench Pro, Terminal-Bench 4), business automation (AutomationBench) and cyber (CyberGym), the NVFP4 checkpoint matches FP8 behaviour.</p>

<p><strong>Long context (DCP).</strong> Add <code class="language-plaintext highlighter-rouge">--decode-context-parallel-size 8</code> to shard the latent KV cache across
the 8 ranks. It requires the default FP8 KV cache.</p>

<p><strong>Multimodal.</strong> Pass <code class="language-plaintext highlighter-rouge">--limit-mm-per-prompt '{"image": N}'</code> to allow up to N images per prompt.</p>

<p>For multi-node, disaggregated P/D and other tested configurations, see the
<a href="https://recipes.vllm.ai/mistralai/Mistral-Large-4-1T-A52B">Mistral Large 4 recipe</a>.</p>

<h2 id="implementation-details">Implementation details</h2>

<h3 id="model-architecture">Model architecture</h3>

<table>
  <thead>
    <tr>
      <th>component</th>
      <th>Mistral Large 4</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>layers / hidden size / heads</td>
      <td>72 / 6144 / 64</td>
    </tr>
    <tr>
      <td>attention</td>
      <td>MLA, no query LoRA, KV LoRA rank 512, RoPE dim 64</td>
    </tr>
    <tr>
      <td>sparse attention</td>
      <td>DSA indexer, top-k 2048, 32 index heads; 44 layers own an indexer, 28 reuse the top-k of the nearest earlier indexer layer</td>
    </tr>
    <tr>
      <td>positional encoding</td>
      <td>YaRN + LeRoPE (learned per-frequency scaling); every 4th layer is NoPE</td>
    </tr>
    <tr>
      <td>query scaling</td>
      <td>SSMax (length-dependent query scale) on every attention layer and indexer</td>
    </tr>
    <tr>
      <td>KV sharing</td>
      <td>9 layers (39, 43, …, 71) read layer 35’s latent cache (1 every 4)</td>
    </tr>
    <tr>
      <td>MoE</td>
      <td>layer 0 dense; layers 1–71: 128 experts, top-4, 1 shared expert</td>
    </tr>
    <tr>
      <td>output</td>
      <td>logit soft cap 30</td>
    </tr>
    <tr>
      <td>vision</td>
      <td>Pixtral encoder (30 layers, hidden 2048, patch 14)</td>
    </tr>
  </tbody>
</table>

<iframe class="vllm-embed" src="/assets/interactive_pages/ml4-arch-explorer.html" title="Mistral Large 4 architecture explorer: per-layer attention, indexer, KV cache and FFN" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 800px; border: 0; overflow: hidden;"></iframe>
<p><em>The 72 decoder layers: every 4th layer is NoPE, 28 layers reuse the top-k of the closest preceding indexer layer, the NoPE layers 39–71 read layer 35’s latent KV, and only layer 0 is dense.</em></p>

<p>What it took to support each piece in vLLM:</p>

<p><strong>Sparse MLA + DSA indexer.</strong> ML4 reuses vLLM’s sparse-MLA stack (FlashMLA sparse with the
<code class="language-plaintext highlighter-rouge">fp8_ds_mla</code> latent cache, plus the sparse indexer with an FP8 indexer cache). ML4-specific
differences are layered on top: shared-indexer layers that reuse the top-k of the nearest earlier indexer layer, an
indexer with its own SSMax, and NoPE indexers on NoPE layers. Per token, the KV cache stores
47,136 bytes: 41,328 for the MLA latent and 5,808 for the indexer.</p>

<p><strong>Cross-layer KV sharing.</strong> Nine NoPE layers read the latent KV written by layer 35 instead of
writing their own. We added <code class="language-plaintext highlighter-rouge">kv_sharing_target_layer_name</code> to <code class="language-plaintext highlighter-rouge">MLAAttention</code> and
<code class="language-plaintext highlighter-rouge">AttentionLayerBase</code>. Consumer layers skip the cache write, and the V2 runner resolves them to the
target layer’s KV cache spec. Consumers take no KV memory: 63 of the 72 layers own a cache.
This is model-agnostic and is being upstreamed in
<a href="https://github.com/vllm-project/vllm/pull/64095">vllm#64095</a>.</p>

<p><strong>NoPE, SSMax and LeRoPE.</strong> NoPE layers are expressed as MLA with zero RoPE dims, so they use the
same kernels and cache layout. LeRoPE is folded into the YaRN frequencies. SSMax is fused into the
MLA RoPE kernel (see fusions below).</p>

<p><strong>A Mistral model package.</strong> Rather than adding flags to <code class="language-plaintext highlighter-rouge">deepseek_v2.py</code>, the port builds on
reusable Mistral components under <code class="language-plaintext highlighter-rouge">vllm/models/mistral/</code>: attention, indexer, SSMax, MLP, MoE,
fused ops and a per-layer spec (<code class="language-plaintext highlighter-rouge">common/layer_spec.py</code>). The ML4 model itself is
<code class="language-plaintext highlighter-rouge">vllm/models/mistral_large4/nvidia/model.py</code>, and the DSpark drafter sits next to it
(<code class="language-plaintext highlighter-rouge">dspark.py</code>). Per-layer features (RoPE/NoPE, indexer owner/sharer, KV owner/consumer) come from
a layer spec built from <code class="language-plaintext highlighter-rouge">params.json</code>, not from model-specific branches in shared code.</p>

<p><strong>Model runner V2.</strong> ML4 runs only on MRV2. The V2 attention utilities discover KV-sharing layers
and look up their target specs. DSpark plugs into the V2 DFlash/DSpark speculator.</p>

<p><strong>Breakable CUDA graphs and fusions.</strong> ML4 runs without <code class="language-plaintext highlighter-rouge">torch.compile</code>. It uses breakable CUDA
graphs, enabled automatically for the architecture (also when the text model sits inside the
multimodal wrapper). They gave about a 6x speedup over eager mode.
Hand-written fusions replace what the compiler would otherwise do, while enabling further optimizations:</p>

<ul>
  <li>First round: SSMax, MLA RoPE + SSMax, the indexer Q path and the indexer K path. These cut decode
TPOT by 8–10%.</li>
  <li>Decode round: FP32 router GEMM, a one-launch Triton LayerNorm for the indexer query,
all-reduce + residual + RMSNorm in one FlashInfer kernel, and indexer K written straight into the FP8 cache. On TP8 FP8,
c1 TPOT dropped from 10.22 to 9.00 ms (-12%) and c8 from 16.01 to 15.08 ms.</li>
</ul>

<h3 id="long-context-decode-and-prefill-context-parallelism">Long context: decode and prefill context parallelism</h3>

<p><strong>DCP.</strong> MLA keeps one latent KV head, so under TP the cache is replicated on every rank. DCP shards it
by token instead. On TP8, DCP8 raises KV capacity from 2.38M to 18.88M tokens (FP8) and from 3.60M to 28.76M
tokens (NVFP4).</p>

<p><img src="/assets/figures/2026-10-29-mistral-large-4/long_context_capacity.png" alt="Long-context capacity on 8x GB300: TP8 vs TP8 DCP8" />
<em>Concurrent 128k / 256k / 1M-token requests whose KV cache fits on 8× GB300 with ML4 NVFP4, TP8 vs TP8 DCP8: floor(KV pool / input length) - 3.60M and 28.76M tokens, gpu-memory-utilization 0.85.</em></p>

<p>Out of the box, DCP with sparse MLA paid a large fixed cost per decode step. A profile at 60k
context showed about 7 ms per step of DCP-only work:</p>
<ul>
  <li>NCCL all-gathers of the LSE and of the indexer top-k candidates (44 indexer layers);</li>
  <li>reduce-scatters;</li>
  <li>a stable top-k merge;</li>
  <li>query gathers;</li>
  <li>small mask kernels and launch gaps.</li>
</ul>

<p>We replaced these with:</p>

<ul>
  <li><strong>a2a combine</strong> for FlashMLA sparse (merged as <a href="https://github.com/vllm-project/vllm/pull/61285">vllm#61285</a>):
a symmetric-memory all-to-all LSE combine instead of all-gather + reduce-scatter. ML4 uses it
by default.</li>
  <li><strong>Direct top-k exchange:</strong> each rank pushes its packed (score, id) candidates into its peers’
symmetric-memory inboxes, and a selector reads them in place. This replaces an NCCL all-gather
and a 6-pass radix select per indexer layer.</li>
  <li><strong>Top-k compaction:</strong> for batches of 32+ tokens, each rank compacts its valid top-k slots and
bounds the kernel with <code class="language-plaintext highlighter-rouge">topk_length</code>, instead of scanning 2048 slots full of <code class="language-plaintext highlighter-rouge">-1</code>. In a 5k-token
prefill profile, attention went from 165 ms to 38 ms.</li>
  <li>A fused kernel neutralizes empty rows (a rank that owns none of a query’s top-k slots).</li>
</ul>

<p>The DCP-specific overhead fell to 3.2 ms per step. Together with the decode fusions, on TP8 DCP8 FP8
(60k input / 1k output):</p>

<table>
  <thead>
    <tr>
      <th> </th>
      <th style="text-align: right">before</th>
      <th style="text-align: right">after</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>c1 TTFT p50</td>
      <td style="text-align: right">6.89 s</td>
      <td style="text-align: right">4.73 s</td>
    </tr>
    <tr>
      <td>c1 TPOT p50</td>
      <td style="text-align: right">17.82 ms</td>
      <td style="text-align: right">12.50 ms</td>
    </tr>
    <tr>
      <td>c64 output tok/s</td>
      <td style="text-align: right">139.1</td>
      <td style="text-align: right">204.0 (+47%)</td>
    </tr>
  </tbody>
</table>

<p><img src="/assets/figures/2026-10-29-mistral-large-4/dcp_before_after.png" alt="DCP8 before and after the collectives port" />
<em>TTFT and TPOT p50 vs concurrency on TP8 DCP8 (60k input / 1k output, no spec), before (a2db3f0b9d) and after (bbe5926511) the DCP collectives port and decode fusions.</em></p>

<p>These DCP optimizations ship with Mistral Large 4 support on day 0.</p>

<p><strong>When to use DCP.</strong> DCP trades per-step latency for KV capacity. On the same 8x GB300 NVFP4
deployment and workload (no spec decoding), DCP8 decodes about 16–28% slower per token than TP8:
c1 TPOT is 11.1 vs 8.7 ms at 8k input and 11.4 vs 9.1 ms at 60k. With up to 128 concurrent
requests of 8k–60k tokens, TP8’s 3.6M-token pool is never the bottleneck, so TP8 delivers more
throughput there. DCP8 pays off once KV is the limit: very long contexts, or many concurrent
long-lived sessions. In our agentic P/D runs (~100k-token sessions), a TP4 DCP4 decode node kept
TTFT at 0.7 s at 32 sessions, where a plain TP4 decode node ran out of KV and climbed to 15 s.</p>

<p><strong>PCP + DCP prefill.</strong> For long prompts, PCP splits one prompt’s tokens across ranks. PCP+DCP
now works on ML4 with CUDA graphs, including DCP &gt; PCP and DSpark. Two fixes made this work:</p>
<ul>
  <li>Under PCP the MLA KV-cache write first all-gathers its inputs across PCP ranks, and that gather
depends on the batch’s prefill/decode split. Captured in a piecewise graph, the split was frozen
at capture time. Now only the gather runs as an eager break, into fixed-size buffers, and the
cache write itself stays in the graph.</li>
  <li>The DCP group’s ranks are ordered to match the order collectives return data in.</li>
</ul>

<p>With graphs on TP1×PCP4×DCP4, GSM8K-200 went from 0.315 to 0.975. With DSpark it reaches 0.980.
As a P/D prefill node, PCP4×DCP4 gives the lowest TTFT we measured (see the P/D section).</p>

<h3 id="dspark-speculative-decoding">DSpark speculative decoding</h3>

<p>ML4 ships a DSpark drafter inside the checkpoint (<code class="language-plaintext highlighter-rouge">mtp_dspark.*</code> tensors and an <code class="language-plaintext highlighter-rouge">mtp</code> block in
<code class="language-plaintext highlighter-rouge">params.json</code>). DSpark is a parallel drafter: a small non-causal transformer proposes all draft
positions of a block in one forward pass. It conditions on hidden states tapped from target
layers 1, 18, 36, 54 and 71. ML4’s drafter adds:</p>

<ul>
  <li><strong>an RNN Markov head:</strong> a gated recurrent state (rank 512) runs across the draft positions, so
each position’s logits depend on the tokens drafted before it;</li>
  <li><strong>position-specific mask inputs:</strong> each draft slot gets its own learned input embedding instead
of one shared mask token;</li>
  <li><strong>sliding-window MLA draft layers:</strong> 3 MLA layers with a 2048-token window and a BF16 KV cache,
in their own KV cache group. The Triton MLA backend gained sliding-window decode for them.</li>
</ul>

<iframe class="vllm-embed" src="/assets/interactive_pages/ml4-dspark-steps.html" title="One DSpark drafting step in Mistral Large 4, step by step" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 705px; border: 0; overflow: hidden;"></iframe>
<p><em>One DSpark step: target taps feed the draft’s context K/V, the [anchor, mask_1, mask_2] block runs through 3 sliding-window MLA layers in one pass, the RNN head emits 3 draft tokens in sequence, and the target verifies them.</em></p>

<p>Enable it with <code class="language-plaintext highlighter-rouge">--speculative-config '{"method": "dspark", "num_speculative_tokens": 3}'</code>.</p>

<p><strong>Results.</strong> TP8, 200 real prompts, greedy (temperature 0), up to 512 output tokens:</p>

<table>
  <thead>
    <tr>
      <th> </th>
      <th style="text-align: right">FP8 base TPOT</th>
      <th style="text-align: right">FP8 DSpark TPOT (AL)</th>
      <th style="text-align: right">NVFP4 base TPOT</th>
      <th style="text-align: right">NVFP4 DSpark TPOT (AL)</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>c1</td>
      <td style="text-align: right">8.84 ms</td>
      <td style="text-align: right">3.50 ms (2.90)</td>
      <td style="text-align: right">8.21 ms</td>
      <td style="text-align: right">2.95 ms (2.93)</td>
    </tr>
    <tr>
      <td>c8</td>
      <td style="text-align: right">15.28 ms</td>
      <td style="text-align: right">7.08 ms (2.85)</td>
      <td style="text-align: right">12.85 ms</td>
      <td style="text-align: right">5.80 ms (2.86)</td>
    </tr>
    <tr>
      <td>c32</td>
      <td style="text-align: right">29.92 ms</td>
      <td style="text-align: right">11.57 ms (2.85)</td>
      <td style="text-align: right">25.38 ms</td>
      <td style="text-align: right">9.80 ms (2.86)</td>
    </tr>
  </tbody>
</table>

<p>The table uses greedy decoding. With sampling, acceptance stays close: at temperature 1.0 /
top-p 0.95, AL is ~2.8 at concurrency 8. At higher temperatures, set
<code class="language-plaintext highlighter-rouge">"draft_sample_method": "probabilistic"</code> in the speculative config: at T=1.5 it raises AL from
2.04 to 2.36–2.53 (+12–22% throughput). Both modes are lossless thanks to standard rejection
sampling.</p>

<p>At the same concurrency, DSpark raises output throughput 1.9–2.1x on FP8 and 1.9–2.2x on NVFP4.
It doesn’t change what the model generates: every drafted token is verified against the target model,
and we checked this empirically. When the base model re-scores DSpark’s outputs, they match its own
greedy choices as often as the base model’s own outputs do. On GSM8K (1,319 questions), FP8 scores
0.909 without DSpark and 0.918 with it.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/ml4-dspark-pareto.html" title="DSpark throughput vs interactivity: output tok/s per GPU vs tok/s per user, with and without DSpark" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 650px; border: 0; overflow: hidden;"></iframe>
<p><em>Output tok/s per GPU vs tok/s per user (1000 / TPOT p50), without (dashed) and with DSpark (solid, depth 3). Short: the 200-prompt TP8 runs in the table above. 8k / 32k / 60k: ML4 NVFP4 colocated on 8× GB300, TP8 and TP8 DCP8, <code class="language-plaintext highlighter-rouge">vllm bench serve</code> with real-text prompts and 1k output tokens; at 60k only the DSpark runs exist.</em></p>

<p><strong>DSpark + DCP.</strong> Before this work, sliding-window MLA drafts could not run under DCP. Now the
draft’s small window cache (3 layers × ~2k tokens, about 7 MB per request) is replicated on every
DCP rank, while the target cache stays DCP-sharded. This extends the existing
support (vllm#56723) to windowed MLA drafts. On TP8 DCP8 at 60k context, c1 TPOT goes from 11.82 to 
5.22 ms (2.26x, AL 2.85), and GSM8K-200 stays at 0.965.
The cost is KV capacity: under DCP8 each 64-token draft block holds a block ID whose target
pages cover 512 tokens. At 64k context, capacity falls to about 0.69x of plain DCP8. That limit
doesn’t bind at <code class="language-plaintext highlighter-rouge">max_num_seqs</code> 128 below ~99k average context.</p>

<p><strong>DSpark in P/D.</strong> A DCP prefill node can hand off to a TP decode node with DSpark on both sides.
NIXL pulls the replicated draft window from one prefill rank and the target KV in DCP slices.
Acceptance is the same with any P/D layout: ~2.98 / 2.86 / 2.78 at 8k / 32k / 60k input.</p>

<p>Sliding-window MLA draft layers and DSpark under DCP are being upstreamed in
<a href="https://github.com/vllm-project/vllm/pull/63795">vllm#63795</a> and
<a href="https://github.com/vllm-project/vllm/pull/63796">vllm#63796</a>.</p>

<h3 id="disaggregated-serving-with-nixl">Disaggregated serving with NIXL</h3>

<p>We benchmarked 1P1D on 4+4 GB300 GPUs (one NVL72 rack) with NIXL. Setup:</p>
<ul>
  <li>NVFP4 with DSpark on both sides, CUDA graphs everywhere, no prefix caching;</li>
  <li><code class="language-plaintext highlighter-rouge">vllm bench serve</code> with fixed-length prompts: 320 unique single-turn chat prompts per input length,
each exactly 8,192 / 32,768 / 60,000 tokens. Each prompt is a natural-text passage (WikiText-2 and
GSM8K problems) followed by a question, with no shared prefix between prompts, sent as token IDs;</li>
  <li>1,024 output tokens per request (greedy, EOS ignored);</li>
  <li>a concurrency sweep and a fixed-QPS sweep.</li>
</ul>

<p>All configurations scored 0.965–0.980 on GSM8K-200 through the proxy, with zero failed NIXL
transfers and zero failed requests.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/ml4-pd-pareto.html" title="ML4 NVFP4 + DSpark 1P1D Pareto: output tok/s per GPU vs tok/s per user" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 640px; border: 0; overflow: hidden;"></iframe>
<p><em>Output tok/s per GPU vs tok/s per user, 1P1D on 4+4 GB300. Solid lines are concurrency sweeps; hollow/dotted markers are fixed-QPS sweeps.</em></p>

<p>Best output tok/s per GPU (8 GPUs) at a given minimum per-user speed:</p>

<table>
  <thead>
    <tr>
      <th>P → D</th>
      <th style="text-align: right">8k, ≥40 tok/s/user</th>
      <th style="text-align: right">8k, ≥100</th>
      <th style="text-align: right">32k, ≥40</th>
      <th style="text-align: right">32k, ≥100</th>
      <th style="text-align: right">60k, ≥40 / ≥100</th>
      <th style="text-align: right">c1 TTFT 8k / 32k / 60k</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>P DP4/EP → D DP4/EP</td>
      <td style="text-align: right"><strong>718.2</strong></td>
      <td style="text-align: right">176.7</td>
      <td style="text-align: right">202.6</td>
      <td style="text-align: right">139.2</td>
      <td style="text-align: right"><strong>108.8</strong></td>
      <td style="text-align: right">0.49 / 1.90 / 3.65 s</td>
    </tr>
    <tr>
      <td>P DP4/EP → D TP4</td>
      <td style="text-align: right">459.2</td>
      <td style="text-align: right"><strong>194.2</strong></td>
      <td style="text-align: right"><strong>205.2</strong></td>
      <td style="text-align: right"><strong>150.0</strong></td>
      <td style="text-align: right">107.2</td>
      <td style="text-align: right">0.46 / 1.88 / 3.66 s</td>
    </tr>
    <tr>
      <td>P PCP4×DCP4 → D TP4</td>
      <td style="text-align: right">350.6</td>
      <td style="text-align: right">192.6</td>
      <td style="text-align: right">91.5</td>
      <td style="text-align: right">91.5</td>
      <td style="text-align: right">49.8</td>
      <td style="text-align: right"><strong>0.35 / 1.37 / 2.57 s</strong></td>
    </tr>
    <tr>
      <td>P TP4 → D TP4</td>
      <td style="text-align: right">259.2</td>
      <td style="text-align: right">185.3</td>
      <td style="text-align: right">62.8</td>
      <td style="text-align: right">62.8</td>
      <td style="text-align: right">32.3</td>
      <td style="text-align: right">0.52 / 2.07 / 4.02 s</td>
    </tr>
  </tbody>
</table>

<h2 id="amd">AMD</h2>

<p>Mistral Large 4 runs on AMD Instinct MI350 Series GPUs from day 0 with the ROCm build of vLLM. The sparse MLA runs on AITER’s
MLA decode kernels and the DSA indexer on AITER’s gfx950 indexer.</p>

<p><strong>MXFP4 experts.</strong> On ROCm the routed experts run as OCP MXFP4 on AITER’s fused MoE. There are two ways to get them:</p>

<ul>
  <li><strong>AMD Quark MXFP4 checkpoint</strong> (<a href="https://huggingface.co/amd/Mistral-Large-4-1T-A52B-Quark-MXFP4">Mistral-Large-4-1T-A52B-Quark-MXFP4</a>). Quark re-quantizes only the routed
experts, with static weight and dynamic activation scales. Attention, the shared experts, the dense feed-forward layers, the
router, the output head, the vision encoder and the DSpark drafter keep their original precision. The checkpoint shrinks
from about 1,061 GB to 578 GB, so it serves on four MI350 Series GPUs (288 GB each). The serving commands, evaluation results
and the reproduction recipe are on the model card.</li>
  <li><strong>Re-quantize the FP8 checkpoint at load</strong> (<code class="language-plaintext highlighter-rouge">VLLM_FP8_MOE_REQUANT=mxfp4</code>). The experts are converted layer by layer while
loading, so peak memory stays low enough for TP4 as well. Expert weights drop from about 125 to 69 GiB per GPU at TP8, and
output throughput rises 22–71% over serving the FP8 experts at 1–64 concurrent requests. <code class="language-plaintext highlighter-rouge">VLLM_FP8_MOE_REQUANT_ACT</code> sets
the activation format the MXFP4 experts compute with: <code class="language-plaintext highlighter-rouge">a8w4</code> (FP8 activations, the default) or <code class="language-plaintext highlighter-rouge">a4w4</code> (MXFP4 activations).</li>
</ul>

<p>Either way, one 8-GPU node serves two TP4 replicas, each with about 6× the HBM left for KV cache and activations that the FP8
experts would leave on the same four GPUs.</p>

<p><strong>Features.</strong> TP8 and TP4, expert parallelism, image inputs through the Pixtral encoder, and DSpark speculative decoding with
the checkpoint’s built-in drafter are supported on ROCm. On MI350X at TP4 with the FP8 KV cache, DSpark accepts 3.1 tokens
per step on real prompts and lowers per-token decode latency 2.7× at one request, 1.9× at 8 and 1.8× at 32 (output
throughput 2.1×, 1.6× and 1.4×). On ROCm the latent KV cache is FP8 (E4M3) by default, which gives
1.86× the KV capacity of bf16; <code class="language-plaintext highlighter-rouge">--kv-cache-dtype bfloat16</code> opts out.</p>

<p><strong>AITER.</strong> <code class="language-plaintext highlighter-rouge">VLLM_ROCM_USE_AITER=1</code> runs vLLM’s hot paths on AITER, AMD’s kernel library: the fused MoE (the MXFP4 experts
on two-stage FlyDSL kernels), the block-FP8 and bf16 GEMMs, the MLA decode kernels, RMSNorm and the tensor-parallel custom
all-reduce. The ROCm image ships AITER tuning tables for this model’s MoE and GEMM shapes, which AITER merges with its own at
startup; at TP4 they raise output throughput 9–16% at 1–8 concurrent requests. Two more settings help on top:
<code class="language-plaintext highlighter-rouge">VLLM_ROCM_USE_AITER_TRITON_SPARSE_MLA=1</code> runs the sparse MLA on AITER’s Triton kernel, and
<code class="language-plaintext highlighter-rouge">AITER_CUSTOM_AR_MAX_SIZE=134217728</code> keeps the all-reduces of large prefill steps (up to 128 MiB) on AITER’s custom
all-reduce. Together they raise output throughput a further 2–5% at TP4 and lower time to first token 5–7%. Both commands
below set all three.</p>

<p><strong>Specialized decode.</strong> For latency-bound serving, <code class="language-plaintext highlighter-rouge">--additional-config '{"decode_backend": "latency_specialized"}'</code> runs
every MoE layer of a 1-, 2- or 4-request decode step as one persistent FlyDSL kernel launch. The launch fuses attention, the
indexer, the router, the MXFP4 experts and both tensor-parallel all-reduces. On MI350X at TP4 it lowers per-token decode
latency 1.5× at one request and 1.1× at four compared with vLLM’s standard decode on the same GPUs. It composes with
DSpark: a single request’s verify block runs on the fused kernels, for 2.9× lower per-token latency than the standard decode
without speculation. Larger batches and prefill run the standard path. It runs on the default FP8 KV cache, requires TP4 and
<code class="language-plaintext highlighter-rouge">VLLM_FP8_MOE_REQUANT_ACT=a4w4</code>, and refuses to start otherwise, giving the reason. The kernel is adapted from ROCm
ATOM’s GLM-5.2 fused decode.</p>

<p><strong>Serving on MI350 Series.</strong> Both commands enable AITER and re-quantize the FP8 experts to MXFP4 at load:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># TP8, one replica per node</span>
<span class="nv">VLLM_ROCM_USE_AITER</span><span class="o">=</span>1 <span class="nv">VLLM_FP8_MOE_REQUANT</span><span class="o">=</span>mxfp4 <span class="nv">VLLM_FP8_MOE_REQUANT_ACT</span><span class="o">=</span>a8w4 <span class="se">\</span>
<span class="nv">VLLM_ROCM_USE_AITER_TRITON_SPARSE_MLA</span><span class="o">=</span>1 <span class="nv">AITER_CUSTOM_AR_MAX_SIZE</span><span class="o">=</span>134217728 <span class="se">\</span>
vllm serve mistralai/Mistral-Large-4-1T-A52B <span class="nt">--tensor-parallel-size</span> 8 <span class="se">\</span>
  <span class="nt">--speculative-config</span> <span class="s1">'{"method": "dspark", "num_speculative_tokens": 3}'</span> <span class="se">\</span>
  <span class="nt">--tool-call-parser</span> mistral <span class="nt">--enable-auto-tool-choice</span> <span class="nt">--reasoning-parser</span> mistral

<span class="c"># TP4 with the specialized decode, for few concurrent users; two replicas per node (second on GPUs 4-7)</span>
<span class="nv">VLLM_ROCM_USE_AITER</span><span class="o">=</span>1 <span class="nv">VLLM_FP8_MOE_REQUANT</span><span class="o">=</span>mxfp4 <span class="nv">VLLM_FP8_MOE_REQUANT_ACT</span><span class="o">=</span>a4w4 <span class="se">\</span>
<span class="nv">VLLM_ROCM_USE_AITER_TRITON_SPARSE_MLA</span><span class="o">=</span>1 <span class="nv">AITER_CUSTOM_AR_MAX_SIZE</span><span class="o">=</span>134217728 <span class="se">\</span>
vllm serve mistralai/Mistral-Large-4-1T-A52B <span class="nt">--tensor-parallel-size</span> 4 <span class="se">\</span>
  <span class="nt">--additional-config</span> <span class="s1">'{"decode_backend": "latency_specialized"}'</span> <span class="nt">--max-num-seqs</span> 64 <span class="se">\</span>
  <span class="nt">--speculative-config</span> <span class="s1">'{"method": "dspark", "num_speculative_tokens": 3}'</span> <span class="se">\</span>
  <span class="nt">--tool-call-parser</span> mistral <span class="nt">--enable-auto-tool-choice</span> <span class="nt">--reasoning-parser</span> mistral
</code></pre></div></div>

<h3 id="rocm-implementation-details">ROCm implementation details</h3>

<p><strong>Sparse MLA on AITER.</strong> On ROCm, ML4’s sparse MLA runs on the <code class="language-plaintext highlighter-rouge">ROCM_AITER_MLA_SPARSE</code> backend. The indexer’s top-2048
positions are converted to global cache slots, and each query token becomes its own entry in the slot stream. AITER’s
MLA decode kernel then reads that stream in persistent mode, with work-split metadata built ahead of time to balance the
load across CUs. AITER’s MLA kernels take a multiple of 16 heads: TP4 gives exactly 16 of ML4’s 64 heads per GPU, while
TP8’s 8 are padded to 16. <code class="language-plaintext highlighter-rouge">VLLM_ROCM_USE_AITER_TRITON_SPARSE_MLA=1</code> switches to AITER’s Triton sparse-MLA kernel instead,
which needs no head padding and no separate FP8 copy of the query. NoPE layers on the bf16 cache have no RoPE part for
AITER’s kernel to read, so they run on vLLM’s ragged Triton sparse-attention kernels.</p>

<p><strong>DSA indexer on AITER.</strong> A fused Triton kernel quantizes each indexer key to FP8 with one scale and writes it into the
indexer cache, 132 bytes per token per indexer layer. Within a cache block, keys are stored in 16×16 tiles, the layout
AITER’s paged reader expects. A single layout rule is shared by the writer and every reader (insert, prefill gather and
paged logits), so they cannot disagree. Prefill scores run on AITER’s <code class="language-plaintext highlighter-rouge">fp8_mqa_logits</code> and decode scores on AITER’s paged
MQA-logits kernel, both reading FP8 keys. The top-2048 comes from AITER’s indexer top-k where it supports the shape, and
from vLLM’s <code class="language-plaintext highlighter-rouge">top_k_per_row</code> otherwise. Shared-indexer layers reuse the top-k of the nearest earlier indexer layer, as on
other platforms.</p>

<p><strong>FP8 latent cache.</strong> ROCm has no <code class="language-plaintext highlighter-rouge">fp8_ds_mla</code> layout, so when the checkpoint asks for an FP8 KV cache, ROCm uses a plain
E4M3 cache instead. All 576 latent dimensions (512 NoPE and 64 RoPE) are stored as FP8 with one per-tensor scale, 576 bytes
per token per layer, against 656 for <code class="language-plaintext highlighter-rouge">fp8_ds_mla</code> and 1,152 for bf16. The query is quantized to FP8 too, so AITER’s kernel
runs FP8 × FP8. With 63 cache-owning layers plus the indexer, a token takes 42,096 bytes, against 78,384 in bf16: the 1.86×
KV capacity in the AMD section.</p>

<p><strong>MXFP4 experts at load, one layer at a time.</strong> With <code class="language-plaintext highlighter-rouge">VLLM_FP8_MOE_REQUANT=mxfp4</code>, the checkpoint loader is unchanged: it
still loads block-FP8 expert weights with their block scales. Their parameters start on the meta device, and the layerwise
loader materializes one layer at a time. As soon as a layer’s experts are loaded, each expert is dequantized to bf16 and
re-quantized to MXFP4 (E2M1 values, one E8M0 scale per 32 values), and that layer’s FP8 copy is freed. Peak memory is the
MXFP4 model plus one layer of FP8 experts, which is what lets the 1T model load on four GPUs. The weight error is about
the same as quantizing the bf16 weights to MXFP4 directly. The experts then run on AITER’s fused MoE: two-stage FlyDSL
kernels with FP8 activations for <code class="language-plaintext highlighter-rouge">a8w4</code>, or MXFP4 × MXFP4 for <code class="language-plaintext highlighter-rouge">a4w4</code>.</p>

<p><strong>Specialized decode: one persistent kernel per layer.</strong> With <code class="language-plaintext highlighter-rouge">decode_backend=latency_specialized</code>, a pure decode step of
1, 2 or 4 requests (or a single request’s DSpark verify block) runs each of the 71 MoE layers as one FlyDSL kernel launch.
The launch uses 256 CTAs, all resident at once on the GPU’s 256 CUs. Inside it run:</p>
<ul>
  <li>the input norm, the query and latent-KV projections with SSMax and LeRoPE;</li>
  <li>the whole DSA indexer: projections, key-cache write, scoring and an exact top-2048;</li>
  <li>sparse MLA over the latent cache, read in place in bf16 or FP8;</li>
  <li>the output projection, the softmax top-4 router, and the shared and routed MXFP4 experts.</li>
</ul>

<p>The embedding, the dense layer 0 and the final norm stay on vLLM’s modules.</p>

<p>Both tensor-parallel all-reduces run inside the kernel, over peer memory between the four GPUs, so a layer is one launch
with no host round-trip. The kernels are built for 1, 2 and 4 rows, which are vLLM’s full CUDA-graph capture sizes, and are
replayed inside those graphs. Any other step runs vLLM’s layers: prefill, mixed batches, wider batches. The kernel is
adapted from ROCm ATOM’s GLM-5.2 fused decode, extended for ML4’s layer types:</p>
<ul>
  <li>no query LoRA;</li>
  <li>SSMax on the query and the index query;</li>
  <li>softmax routing;</li>
  <li>NoPE layers;</li>
  <li>KV-sharing layers that read layer 35’s latent cache;</li>
  <li>index-sharing layers.</li>
</ul>

<p><strong>Fail-stop.</strong> A persistent kernel that waits on peer GPUs must never hang the server. Every in-kernel wait gives up after
10 seconds, and giving up sets a sticky fault word on every rank, which ends the other ranks’ waits at once. After every
forward, a device-side assert checks the word before logits are computed. If the word is set, the step’s remaining work
never runs, the worker aborts and the engine stops, so no token from a failed step reaches a client. The check costs
about 1 µs per launch.</p>

<p>The path is also default-deny. If a deployment uses anything the kernels don’t serve, startup fails with one error listing
every reason, and all TP ranks agree on each check before anything collective runs. Unsupported features include other
TP sizes, expert or context parallelism, LoRA, KV connectors, other speculative methods, and experts not stored as <code class="language-plaintext highlighter-rouge">a4w4</code>.</p>

<h2 id="tpu">TPU</h2>

<p>Mistral Large 4 runs on <strong>TPU v7x from day 0</strong> with <code class="language-plaintext highlighter-rouge">vllm-torchtpu</code>, including support for the
Pixtral vision encoder. Our validated configuration combines intra-host tensor parallelism
with cross-host data parallelism with expert parallelism across 16 TPU v7x chips.</p>

<p><strong>Serving on TPU v7x:</strong> The following command starts a single data parallel worker on one host:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>vllm serve mistralai/Mistral-Large-4-1T-A52B <span class="se">\</span>
  <span class="nt">--tensor-parallel-size</span> 8 <span class="nt">--data-parallel-size</span> 4 <span class="nt">--data-parallel-size-local</span> 1 <span class="se">\</span>
  <span class="nt">--data-parallel-start-rank</span> <span class="s2">"</span><span class="nv">$TPU_WORKER_ID</span><span class="s2">"</span> <span class="se">\</span>
  <span class="nt">--data-parallel-address</span> <span class="s2">"</span><span class="nv">$HEAD_IP</span><span class="s2">"</span> <span class="nt">--data-parallel-rpc-port</span> 29696 <span class="se">\</span>
  <span class="nt">--enable-expert-parallel</span> <span class="nt">--enable-ep-weight-filter</span> <span class="se">\</span>
  <span class="nt">--dtype</span> bfloat16 <span class="nt">--kv-cache-dtype</span> fp8_e4m3
</code></pre></div></div>

<p>The TPU implementation relies on <code class="language-plaintext highlighter-rouge">vllm-torchtpu</code>’s sparse MLA and DSA indexer Pallas kernels,
extending MLA with cross-layer KV cache sharing. We store the MLA latent KV cache in FP8 and
support FP8 weight and activation quantization for dense linear projections. Routed experts use
weight-only FP4 quantization (W4A16).</p>

<h2 id="hisparse-host-memory-sparse-kv-offload">HiSparse: host-memory sparse KV offload</h2>

<p>Sparse attention reads only 2048 keys per query, so most of a long request’s KV doesn’t need
to live in GPU memory. HiSparse keeps the full latent KV in pinned host memory. It keeps a
resident GPU working set plus a per-request hot buffer, and copies the selected rows from host on
a miss. Enable it with the <code class="language-plaintext highlighter-rouge">HiSparseConnector</code>:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">--kv-transfer-config</span> <span class="s1">'{"kv_connector": "HiSparseConnector", "kv_role": "kv_both",
                       "kv_connector_extra_config": {"host_pool_gib": 440}}'</span>
</code></pre></div></div>

<p><strong>Known issue.</strong> When the tensor-parallel group is on a single node, also set
<code class="language-plaintext highlighter-rouge">VLLM_FLASHINFER_ALLREDUCE_BACKEND=trtllm</code>. The default single-node FlashInfer all-reduce
(MNNVL) can crash the engine with <code class="language-plaintext highlighter-rouge">CUDA error: unspecified launch failure</code> once HiSparse spills KV
to host (<a href="https://github.com/vllm-project/vllm/issues/64327">vllm#64327</a>). The fix is in
<a href="https://github.com/flashinfer-ai/flashinfer/pull/7782">flashinfer#7782</a>.</p>

<p>For ML4 we made HiSparse work with <strong>cross-layer KV sharing</strong>. The nine consumer layers bind to
layer 35’s resident view and host copy and keep only their own hot buffer and LRU (each has its
own indexer). Nothing is duplicated, and no environment variable is needed. Compared with
materializing the shared layers, this holds 14.3% more tokens for the same host pool. We also fixed:</p>
<ul>
  <li>reading <code class="language-plaintext highlighter-rouge">index_topk</code> from the text config of multimodal models;</li>
  <li>a double host mirror during CUDA graph capture.</li>
</ul>

<p><strong>Capacity.</strong> On a single GB300 node (TP4, NVFP4), the four TP ranks share one deduplicated host
pool, so <code class="language-plaintext highlighter-rouge">host_pool_gib</code> is the total. With a 440 GiB pool, HiSparse admits 8.77M KV tokens at
startup and holds up to 11.25M in steady state, vs 1.97M on the GPU alone (4.5x to 5.7x). GSM8K-200
is unchanged (0.975 both), and needle-in-a-haystack passes at ~98k (10/10) and ~248k (5/5) tokens.</p>

<p><img src="/assets/figures/2026-10-29-mistral-large-4/hisparse_capacity.png" alt="HiSparse KV capacity" />
<em>KV token capacity of one TP4 server on a single GB300 node (NVFP4, max_model_len 262k, prefix caching off): 1.97M tokens on the GPU alone; with HiSparse and a 440 GiB host pool shared by the four TP ranks, 8.77M admitted at startup (4.5x) and up to 11.25M in steady state (5.7x). Layers that reuse layer 35’s KV are stored on the host only once.</em></p>

<h2 id="day-0-support-for-rl-with-skyrl">Day 0 Support for RL with SkyRL</h2>

<p>We also enabled Day 0 RL for Mistral Large 4 in <a href="https://github.com/NovaSky-AI/SkyRL">SkyRL</a>, with vLLM for rollout and either FSDP2 or Megatron for training, on 8 GB200 nodes. The trainer runs LoRA (rank 32) on top of the NVFP4 checkpoint with NVFP4 quantization-aware training, simulates the FP8 latent KV cache that vLLM serves with, and uses Rollout Routing Replay (R3) and token-level truncated importance sampling. On the DAPO recipe, average accuracy (avg@8) on AIME 2024 goes from ~64% to ~75% within 75 steps, and the average absolute log-probability difference between the trainer and vLLM stays between 0.02 and 0.026 for the whole run. The Megatron backend (EP32, colocated with four TP8 vLLM engines) follows the same accuracy curve with a similar log-probability difference, and runs a step about 30% faster than FSDP. See the SkyRL <a href="https://github.com/NovaSky-AI/SkyRL/issues/2575">RFC</a> for details.</p>

<p><img src="/assets/figures/2026-10-29-mistral-large-4/skyrl-rl.png" alt="Day 0 RL on Mistral Large 4 with SkyRL" />
<em>AIME 2024 avg@8 accuracy and mean absolute trainer-vs-vLLM log-probability difference over training, LoRA rank 32 on the NVFP4 checkpoint on 8 GB200 nodes, with the FSDP2 and Megatron (EP32) trainers.</em></p>

<h2 id="whats-next">What’s next</h2>

<ul>
  <li>Upstreaming: MLA cross-layer KV sharing, DSpark sliding-window MLA drafts and DSpark under DCP and HiSparse KV-sharing support.</li>
  <li>A DCP decode node with DSpark in P/D, and a separate draft block pool so DSpark under DCP keeps
full KV capacity.</li>
  <li>HiSparse with GPU landing for NIXL imports and node-shared host pools for
multi-node TP.</li>
  <li>More decode fusions for low-concurrency latency.</li>
</ul>

<h2 id="acknowledgement">Acknowledgement</h2>

<p>Mistral Large 4 support in vLLM was a collaboration led by Nicolò Lucchesi and the Mistral Inference team. We would like to extend our gratitude to the vLLM maintainers who reviewed, designed, and landed much of the underlying work: Lucas Wilkinson, Flora Feng, Matt Bonanni, and the rest of the Red Hat team; Jiangyun Zhu, Kevin Luu, Yasong Wang, Ao Shen, George Novack, and the rest of the Inferact team; Cyrus Leung as well as the entire vLLM community.</p>

<p>On AMD side, we would also like to thank Hongxia Yang, Felix Marty, Andy Luo, Indira Vats for Day 0 enablement and optimization on AMD Instinct GPUs, and Bowen Bao, Chuan Li, Peng Sun for general support.</p>]]></content><author><name>Mistral and the vLLM Team</name></author><category term="model-support" /><category term="speculative-decoding" /><category term="disaggregated-serving" /><summary type="html"><![CDATA[We’re excited to announce day-0 support for Mistral Large 4 in vLLM. Mistral Large 4 is Mistral’s new frontier mixture-of-experts native multimodal model. It combines a DeepSeek-style sparse attention stack (MLA plus a DSA top-k indexer) with several new architecture features: cross-layer KV sharing, NoPE layers, SSMax and LeRoPE. It ships with a built-in DSpark speculative decoding drafter and a Pixtral vision encoder.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://vllm-project.github.io/assets/figures/2026-10-29-mistral-large-4/layer_pattern.png" /><media:content medium="image" url="https://vllm-project.github.io/assets/figures/2026-10-29-mistral-large-4/layer_pattern.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Serving DeepSeek-V4.1-Flash at Scale: vLLM Matches DeepInfer and Scales to GB300 NVL72</title><link href="https://vllm-project.github.io/2026/10/23/deepseek-v41-flash-pd-wide-ep.html" rel="alternate" type="text/html" title="Serving DeepSeek-V4.1-Flash at Scale: vLLM Matches DeepInfer and Scales to GB300 NVL72" /><published>2026-10-23T09:00:00+00:00</published><updated>2026-10-23T09:00:00+00:00</updated><id>https://vllm-project.github.io/2026/10/23/deepseek-v41-flash-pd-wide-ep</id><content type="html" xml:base="https://vllm-project.github.io/2026/10/23/deepseek-v41-flash-pd-wide-ep.html"><![CDATA[<p align="center">
<img src="/assets/figures/2026-10-23-deepseek-v41-flash-pd-wide-ep/hero.png" alt="7.9x throughput for DeepSeek-V4.1-Flash with P/D and Wide-EP on a GB300 NVL72 rack, measured on SemiAnalysis AgentX, and on par with DeepInfer" width="100%" />
</p>

<p><strong>TL;DR:</strong> On one NVIDIA GB300 NVL72 rack, vLLM with P/D disaggregation and Wide-EP serves DeepSeek-V4.1-Flash on SemiAnalysis AgentX at <strong>954K tokens/s per GPU</strong> at a P90 of 196 tokens/s per user, <strong>7.9×</strong> our single-node result from the <a href="https://vllm.ai/blog/2026-10-07-deepseek-v41-flash">first post</a> and <strong>$38.96 per GPU-hour</strong> at DeepSeek’s off-peak prices. A specialized decode path reaches <strong>826 tokens/s</strong> for a single user. Against DeepInfer, DeepSeek’s own engine, vLLM’s decode throughput is within <strong>6%</strong> across batch sizes 8–256, and its prefill tracks DeepInfer’s published curve.</p>

<p>The efficiency comes from deliberate engineering on components that vLLM already has, built on the kernels DeepSeek open-sourced. This post walks through our performance study, breaks down each optimization, and shares the lessons we learned:</p>

<ul>
  <li><strong>A general-purpose engine can match a model-specific one</strong></li>
  <li><strong>Understand the model before optimizing</strong></li>
  <li><strong>Small DEP instances work best for prefill</strong><sup id="fnref:terms" role="doc-noteref"><a href="#fn:terms" class="footnote" rel="footnote">1</a></sup></li>
  <li><strong>Wide-EP decode scales well with EPLB</strong></li>
  <li><strong>CPU overhead becomes critical at NVL72 scale</strong></li>
  <li><strong>A specialized decode path unlocks low latency</strong></li>
</ul>

<h2 id="performance-overview">Performance overview</h2>

<iframe class="vllm-embed" src="/assets/interactive_pages/dsv41-pd-agentx-curve.html" title="SemiAnalysis AgentX on NVIDIA GB300 NVL72, P/D and Wide-EP vs. the aggregated single-node result" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 720px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 1: SemiAnalysis AgentX on NVIDIA GB300 NVL72: vLLM with P/D disaggregation and Wide-EP (gold) achieves a further 7.9× throughput increase over our aggregated single-node result from the <a href="https://vllm.ai/blog/2026-10-07-deepseek-v41-flash">first post</a>. Throughput counts cached input, uncached input and output tokens (<a href="https://inferencex.semianalysis.com/inference/deepseek-v41-flash?i_xmode=interactivity&amp;i_seq=agentic-traces&amp;g_model=DeepSeek-V4.1-Flash&amp;i_best=0&amp;i_active=gb300_dynamo-vllm">source</a>).</em></p>

<h3 id="compared-to-deepinfer">Compared to DeepInfer</h3>

<p><a href="https://github.com/deepseek-ai/DeepInfer">DeepInfer</a> is DeepSeek’s own inference engine for DeepSeek-V4.1-Flash, released this week as an offline engine with published prefill and decode curves. It is the most relevant reference for this model, so before going into our optimizations we show where vLLM stands against it.</p>

<p><strong>Decode.</strong> Under DeepSeek’s decode configuration (131K context, nextn=3), vLLM on GB200 achieves throughput within 6% of DeepInfer’s published results across batch sizes 8 to 256 (Figure 2).</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/dsv41-pd-decode-vs-deepinfer.html" title="vLLM on GB200 DEP32 tracks DeepSeek's decode curve" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 720px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 2: Decode output throughput per GPU vs. batch size at 131K context, nextn=3. vLLM on GB200 vs. DeepInfer’s published results, read from the charts in its README (<a href="https://github.com/deepseek-ai/DeepInfer">source</a>).</em></p>

<p><strong>Prefill.</strong> DeepInfer’s published prefill curve uses EP4DP4 with 32 redundant experts and a 140-token bounded replay, on hardware the chart does not state, and we read its values off the chart. Our run uses DEP2 on GB300 with no redundant experts, a 128-token replay and our own prompts. Because the setups differ, we do not read the gap between the two curves as an engine-to-engine speedup. What Figure 3 shows is that vLLM’s DEP2 prefill tracks DeepSeek’s own engine across the range they published.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/dsv41-pd-prefill-vs-deepinfer.html" title="Prefill curve: vLLM DEP2 vs. DeepInfer EP4DP4" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 720px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 3: Prefill throughput vs. new tokens. vLLM DEP2 on GB300 vs. DeepInfer’s published curve (EP4DP4, 32 redundant experts, 140-token replay, hardware not stated), read from the chart in its README (<a href="https://github.com/deepseek-ai/DeepInfer">source</a>).</em></p>

<p>The two engines land close because they share a lineage in both directions. DeepInfer was originally built on vLLM, and vLLM in turn has continuously integrated kernels from DeepSeek’s libraries, including MegaAttn, MegaMoE and Mega-mHC, and has extensively optimized the rest of the stack around them. DeepInfer targets a single model in offline mode; the same vLLM build also serves this model online with P/D disaggregation and Wide-EP across a full NVL72 rack, which is what the rest of this post measures. The sections that follow describe that work.</p>

<h2 id="under-the-hood-where-the-speed-comes-from">Under the hood: where the speed comes from</h2>

<h3 id="measure-the-model-first">Measure the model first</h3>

<p>Before tuning, we started by quantifying DeepSeek-V4.1-Flash’s efficient architectural designs:</p>

<ul>
  <li><strong>Small KV cache footprint.</strong> Only 890 bytes per token for global KV cache, thanks to cross-layer KV sharing and FP4 compression (see the <a href="https://arxiv.org/abs/2609.19969">DeepSeek-V4.1-Flash Technical Report</a>).</li>
  <li><strong>Lightweight attention.</strong> Layers 2, 8 and 14 use 2× compression for full-context indexing. With bounded replay, layer 20 writes global KV for all tokens but runs indexing and attention only on the last 128; layers 21–39 process only those tokens.</li>
  <li><strong>Decode is MoE-bound even in a long context.</strong> See Figure 5 below. With DEP4 decoding at 128K context and 64 requests per rank, MoE takes 62% of the target step, while attention and the indexer together take only 13%.</li>
</ul>

<p>The table below shows the target model’s forward time at DEP32, with 16 requests per rank, 6 tokens per request (one token plus five DSpark draft tokens), and every request at the same context length, on GB300. Going from 128K to 855K, 6.7× the context only adds 0.6 ms (+7%) to the target model decode latency.</p>

<table>
  <thead>
    <tr>
      <th>Context per request</th>
      <th style="text-align: right">64K</th>
      <th style="text-align: right">128K</th>
      <th style="text-align: right">256K</th>
      <th style="text-align: right">512K</th>
      <th style="text-align: right">855K</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Target forward (ms)</td>
      <td style="text-align: right">8.86</td>
      <td style="text-align: right">8.93</td>
      <td style="text-align: right">9.03</td>
      <td style="text-align: right">9.25</td>
      <td style="text-align: right">9.53</td>
    </tr>
    <tr>
      <td>vs. 128K</td>
      <td style="text-align: right">−0.8%</td>
      <td style="text-align: right">–</td>
      <td style="text-align: right">+1.1%</td>
      <td style="text-align: right">+3.6%</td>
      <td style="text-align: right">+6.7%</td>
    </tr>
  </tbody>
</table>

<p>These characteristics shape the rest of our optimization strategy:</p>

<ul>
  <li><strong>Prefill should run at a small DEP size.</strong> Even a DEP2 instance on B300 or GB300 can hold both the model weights and the KV cache for many concurrent sessions. A smaller world size greatly simplifies DP/EP load balancing.</li>
  <li><strong>KV capacity rarely limits batch size.</strong> The KV cache fits comfortably in HBM, allowing us to push each operation toward its compute or memory bandwidth limits instead of working around KV capacity. This also keeps our sweep consistent and low-noise with no preemption or KV cache pressure.</li>
  <li><strong>Wide-EP is effective for decode.</strong> MegaMoE decode is bound by weight reads, and Wide-EP directly cuts this dominating MoE cost.</li>
  <li><strong>Decode DP load balancing is simpler.</strong> This model’s decode step time varies little with context length, so DP load balancing can be simplified to least-load by request count per rank.</li>
  <li><strong>Synthetic workloads remain representative for decode.</strong> Using average input and output lengths gives us a good estimate of the performance without replaying the full agentic trace.</li>
</ul>

<h4 id="how-we-measured">How we measured</h4>

<p>Measuring performance accurately without overcomplicating the methodology is not trivial. We break it into two questions: what should a prefill or decode step cost, and how much additional overhead comes from DP and EP imbalance?</p>

<ul>
  <li><strong>Prefill and decode step time.</strong> <code class="language-plaintext highlighter-rouge">vllm bench forward</code> (<a href="https://github.com/vllm-project/vllm/pull/61339">#61339</a>) measures the model-forward time for an exact prefill or decode batch through the actual <code class="language-plaintext highlighter-rouge">execute_model</code> path across DP and EP ranks. This measures GPU time only and gives a clean trace. Further, vLLM’s <code class="language-plaintext highlighter-rouge">DecodeBenchConnector</code> measures engine-level end-to-end decode performance at a given concurrency. The gap between GPU-only and serving step times reveals unexpected overhead.</li>
  <li><strong>Prefill DP imbalance: mirror vs. lag replays.</strong> Agentic traces vary from run to run, so DP imbalance is hard to isolate. We therefore replay identical requests on every DP rank. In a <em>mirror</em> run, all ranks receive their requests at the same time. In a <em>lag</em> run, rank <em>r</em> receives the same requests <em>r</em> × 5 s later, so the ranks are out of step but do the same total work. The difference between the two runs is the cost of DP imbalance.</li>
  <li><strong>Decode EP imbalance: real vs. uniform routing.</strong> For each MoE layer, we define balancedness as the mean rank load divided by the max rank load, per step and over EPLB’s window. As the balanced reference, we run the same decode batch with tokens routed uniformly at random. This reference still has sampling noise: at DEP32 with 72 requests per GPU, uniform routing reaches about 0.96 balancedness for the target (top-6 routing) and 0.94 for the draft (top-3). The gap between real and uniform routing is the most that expert balancing can recover, and the EPLB run shows how much of that gap it actually recovers.</li>
</ul>

<h3 id="prefill-dep2-works-best">Prefill: DEP2 works best</h3>

<p>As discussed above, a small DEP size is appealing for prefill. In an AgentX prefill-only run at concurrency 256, DEP4 gave only 83% of DEP2’s per-GPU throughput (53.3K vs. 64.4K tokens/s). Mirror and lag replays with prefix caching off point to DP imbalance: when the ranks fall out of step, DEP4 loses 13.6% of its throughput.<sup id="fnref:earlier-build" role="doc-noteref"><a href="#fn:earlier-build" class="footnote" rel="footnote">2</a></sup> This makes DEP2 a simple default for us.</p>

<table>
  <thead>
    <tr>
      <th>Prefill throughput per instance (tokens/s)</th>
      <th style="text-align: right">mirror (balanced)</th>
      <th style="text-align: right">lag (imbalanced)</th>
      <th style="text-align: right">loss</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>DEP2</td>
      <td style="text-align: right">138.7K</td>
      <td style="text-align: right">130.5K</td>
      <td style="text-align: right">5.9%</td>
    </tr>
    <tr>
      <td>DEP4</td>
      <td style="text-align: right">267.6K</td>
      <td style="text-align: right">231.1K</td>
      <td style="text-align: right">13.6%</td>
    </tr>
  </tbody>
</table>

<h4 id="optimizations-hidden-behind-the-trace">Optimizations hidden behind the trace</h4>

<p>Our <a href="https://vllm.ai/blog/2026-10-07-deepseek-v41-flash">first post</a> covered a broad set of prefill optimizations. Cleaner traces helped us identify the remaining bottlenecks, particularly those that grow with context length. For example, on two GB300 GPUs, an 8K-token prefill takes <strong>87.9 ms without prior context</strong>, but <strong>189.4 ms with 512K cached context</strong>. We addressed three additional bottlenecks:</p>

<details>
  <summary><strong>Extend SWA bounded replay to layer 20</strong> (<a href="https://github.com/vllm-project/vllm/pull/59894">#59894</a>): +19.9% at 32K new tokens</summary>

  <p>SWA bounded replay already limits layers 21–39 to the last 128 tokens. Previously, layer 20 still performed indexer computation across all new tokens. Now it writes KV for all new tokens but runs its remaining computation only on the 128-token replay batch. This improves prefill throughput by <strong>19.9% at 32K new tokens</strong>, with gains increasing from 10.1% at 4K to 23.1% at 64K.</p>

</details>

<details>
  <summary><strong>Use 2 MB pages for shared Engram host tables</strong> (<a href="https://github.com/vllm-project/vllm/pull/62359">#62359</a>): another +2.8% at 32K</summary>

  <p>Engram performs random reads from host tables shared across DP ranks. The previous <code class="language-plaintext highlighter-rouge">/dev/shm</code> mapping used 64 KB GPU pages, causing frequent GPU TLB misses. Moving the tables to host-NUMA cuMem allocations enables 2 MB GPU pages, improving prefill throughput by another <strong>2.8% at 32K new tokens</strong>.</p>

</details>

<details>
  <summary><strong>Use DeepSelect top-k in the prefill indexer</strong> (<a href="https://github.com/vllm-project/vllm/pull/62240">#62240</a>): another +15.6% at 32K</summary>

  <p>The prefill indexer now uses DeepSelect to rank candidate blocks, matching the decode path. Its benefit grows with the number of keys being ranked, improving prefill throughput by another <strong>15.6% at 32K new tokens</strong> and 15.2% at 64K.</p>

</details>

<p>Together, these changes improve <strong>new-token prefill throughput by 35.6–43.9%</strong> across 4K–64K new tokens on top of a 128K cached prefix. At 32K, the combined gain is <strong>42.5%</strong>; at 64K, throughput increases from <strong>71.2K to 102.5K tokens/s/GPU (+43.9%)</strong>.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/dsv41-pd-prefill-ablation.html" title="Prefill gains on DEP2 after a 128K cache hit" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 720px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 4: New-token prefill throughput per GPU on DEP2 after a 128K cache hit, adding layer 20 replay, Engram 2 MB pages and DeepSelect top-k one at a time.</em></p>

<h3 id="decode-scaling-wide-ep-and-balancing-experts-with-eplb">Decode: scaling Wide-EP and balancing experts with EPLB</h3>

<p>On the decode side, Wide-EP with EPLB is an established practice, described in <a href="https://github.com/deepseek-ai/open-infra-index/blob/main/202502OpenSourceWeek/day_6_one_more_thing_deepseekV3R1_inference_system_overview.md">DeepSeek’s inference system overview</a>. vLLM has supported both for a while (see our <a href="https://vllm.ai/blog/2025-12-17-large-scale-serving#wide-ep">large-scale serving post</a>), and we found that they still work well. This section focuses on our new findings and empirical lessons.</p>

<h4 id="the-scaling-of-wide-ep">The scaling of Wide-EP</h4>

<p>We measured decode scaling from DEP4 to DEP32 with 64 requests per GPU at 128K context (with EPLB enabled; see the next section). Target MegaMoE time drops from 13.4 to 6.0 ms as each rank holds fewer experts, while the remaining work stays around 10 ms. As a result, per-GPU throughput gains gradually diminish. At DEP32, the draft’s communication overhead also starts to offset the benefits of wider parallelism.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/dsv41-pd-wide-ep-scaling.html" title="Decode step time breakdown from DEP4 to DEP32 on GB200" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 720px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 5: Decode step time per rank from DEP4 to DEP32 on NVIDIA GB200 with 64 requests per GPU at 128K context, and output throughput per GPU.</em></p>

<h4 id="eplb">EPLB</h4>

<p>We let EPLB rearrange the experts every 3,000 steps, based on the load of the previous 1,000 steps. EPLB raises balancedness from 0.35 to 0.94 for the target and from 0.21 to 0.89 for the draft, recovering about 97% and 93% of the gap to uniform routing.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/dsv41-pd-eplb.html" title="EPLB at wide EP: balance, step time and throughput" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 720px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 6: Decode on GB300 NVL72 with EPLB off, EPLB for the target model only, and EPLB for both the target and the DSpark draft. The tabs show per-step balance, the per-step time breakdown at DEP32, and throughput (mean of three runs; bars show the range).</em></p>

<p>Two changes make this work. <a href="https://github.com/vllm-project/vllm/pull/62009">#62009</a> introduces an NVLink-based <code class="language-plaintext highlighter-rouge">symm_mem</code> backend that rebalances all of DEP32 in under a second without stopping decode, fuses EPLB’s replica mapping and load recording into the MegaMoE kernels (saving about 0.2 ms per step), and removes host synchronization from the decode loop. <a href="https://github.com/vllm-project/vllm/pull/61395">#61395</a> supports EPLB with heterogeneous target and draft models. The DSpark draft has 128 routed experts with top-3 routing, against the target’s 384 with top-6, so EPLB tracks expert placement and load separately for each model and rebalances both.</p>

<h3 id="overcome-cpu-overhead-in-fast-large-scale-decode">Overcome CPU overhead in fast large-scale decode</h3>

<p>Wide-EP decode synchronizes all ranks at every layer, so one slow rank stalls the instance. Async scheduling hides CPU overhead well at a small scale, but more ranks make this harder in two ways: GPU steps get shorter, which leaves less slack for CPU work, and it becomes more likely that one rank falls behind.</p>

<p>In practice, we observed that an unoptimized DEP32 ran slower than DEP16 (17.57 vs. 13.84 ms per step), although its GPU execution was 1.1 ms faster. The table below lists every cause we found, ordered by effect. The effects come from different setups, so each row gives its own.</p>

<details>
  <summary>Show the causes, fixes and their effects</summary>

  <table>
    <thead>
      <tr>
        <th>Cause</th>
        <th>Fix</th>
        <th>PRs</th>
        <th>Effect</th>
        <th>Setup</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>KV read posted synchronously on the decode worker thread</td>
        <td>NIXL push with UCX scatter-gather; packed KV rows sent as one NIXL region</td>
        <td><a href="https://vllm.ai/blog/2026-10-14-nixl-push-connector">NIXL push connector</a>, <a href="https://github.com/vllm-project/vllm/pull/61121">#61121</a></td>
        <td>141K → 440K tokens/s per GPU; P90 ~40 → 159 tokens/s per user</td>
        <td>GB300, 8P1D, concurrency 3,072</td>
      </tr>
      <tr>
        <td>Gloo all-reduce latency grows linearly with the rank count</td>
        <td>Recursive-doubling CPU all-reduce</td>
        <td><a href="https://github.com/vllm-project/vllm/pull/61767">#61767</a>, building on <a href="https://github.com/vllm-project/vllm/pull/60267">#60267</a></td>
        <td>DP sync 10.8 → 1.5 ms per step; step 16.10 → 13.15 ms</td>
        <td>DEP32 decode</td>
      </tr>
      <tr>
        <td>Admission bursts: up to 140 requests admitted in one step</td>
        <td>Opt-in cap of 4 new KV loads per step</td>
        <td><a href="https://github.com/vllm-project/vllm/pull/61725">#61725</a></td>
        <td>460K → 516K tokens/s per GPU; P90 109 → 153 tokens/s per user</td>
        <td>GB300, 7P1D, concurrency 4,800, with two other CPU fixes</td>
      </tr>
      <tr>
        <td>Admission work that grows with the prompt length</td>
        <td>Prompt as one int32 buffer; skip the null blocks of sliding-window block tables; chunked prompt copy kernel</td>
        <td><a href="https://github.com/vllm-project/vllm/pull/59908">#59908</a>, <a href="https://github.com/vllm-project/vllm/pull/62702">#62702</a>, <a href="https://github.com/vllm-project/vllm/pull/61724">#61724</a>, <a href="https://github.com/vllm-project/vllm/pull/62698">#62698</a></td>
        <td>855K prompt: 38.8 → 6.0 ms of CPU per admission</td>
        <td>Engine microbenchmark</td>
      </tr>
    </tbody>
  </table>

</details>

<h3 id="low-latency-a-specialized-decode-path-for-small-batches">Low latency: a specialized decode path for small batches</h3>

<p>We also extended low-latency kernel support for DeepSeek-V4.1-Flash (<a href="https://github.com/vllm-project/vllm/pull/61868">#61868</a> and <a href="https://github.com/vllm-project/vllm/pull/61869">#61869</a>), continuing the efforts from our <a href="https://vllm.ai/blog/2026-10-16-kimi-k3-megakernel">previous post</a>. On real AgentX sessions, the specialized decode path reaches 826 P90 tokens/s for a single user on four B300 GPUs, 44% higher than the standard decode path (575).</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/dsv41-pd-low-latency.html" title="P90 interactivity on SemiAnalysis AgentX with TP4 on B300 at concurrency 1, 8 and 16, before and after InferenceX #4332" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 720px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 7: SemiAnalysis AgentX with TP4 on four B300 GPUs at concurrency 1, 8 and 16, before and after <a href="https://github.com/SemiAnalysisAI/InferenceX/pull/4332">InferenceX #4332</a> switched to the specialized decode path.</em></p>

<h2 id="acknowledgements">Acknowledgements</h2>

<p>We would like to thank <strong>DeepSeek</strong> for open-sourcing and sharing DeepSeek-V4.1-Flash and its optimized kernels, which provided the foundation for this work, and for publishing DeepInfer and its performance results, which gave us a strong reference to learn and compare against. We also thank <strong>SemiAnalysis</strong> for the AgentX benchmark platform and all the help.</p>

<p>We are especially grateful to <strong>Pei Li, Hanjie Qiu, Lisa Wang, Yaoyao Ding, Rohit Nagraj, and Xin Li</strong> from <strong>NVIDIA</strong> for their close collaboration on performance optimization, continued support across vLLM and Dynamo, and assistance with the AgentX submissions. We also thank <strong>Canlin Guo</strong> from the <strong>vLLM community</strong> for his valuable prefill optimization.</p>

<p>This work was led by <strong>Inferact</strong>.</p>

<script>
(function () {
  // Resize embedded interactive figures to their content height (they post it when framed).
  window.addEventListener('message', function (event) {
    var d = event.data;
    if (!d || d.type !== 'vllm-embed-resize' || typeof d.height !== 'number') return;
    var frames = document.querySelectorAll('iframe.vllm-embed');
    for (var i = 0; i < frames.length; i++) {
      if (frames[i].contentWindow === event.source) {
        frames[i].style.height = Math.ceil(d.height) + 'px';
      }
    }
  });
})();
</script>

<div class="footnotes" role="doc-endnotes">
  <ol>
    <li id="fn:terms" role="doc-endnote">
      <p>DEP<em>n</em> is data-parallel attention plus expert parallelism over <em>n</em> GPUs. Target forward is the main model’s full forward pass at each decode step, which verifies the draft tokens and produces the output; draft forward is the DSpark draft model’s full forward pass, which proposes the tokens for the next step. <a href="#fnref:terms" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:earlier-build" role="doc-endnote">
      <p>Measured on an earlier build; the imbalance cost is a property of DEP size, not of the kernels. <a href="#fnref:earlier-build" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
  </ol>
</div>]]></content><author><name>Inferact and the vLLM Team</name></author><category term="deepseek" /><category term="performance" /><category term="large-scale-serving" /><category term="disaggregation" /><summary type="html"><![CDATA[]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://vllm-project.github.io/assets/figures/2026-10-23-deepseek-v41-flash-pd-wide-ep/hero.png" /><media:content medium="image" url="https://vllm-project.github.io/assets/figures/2026-10-23-deepseek-v41-flash-pd-wide-ep/hero.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">GLM-5.3 Optimizations, Part 2: PCP, DCP, and Hybrid HiSparse on 16 H200s</title><link href="https://vllm-project.github.io/2026/10/23/glm53-part2-pcp-dcp-hisparse.html" rel="alternate" type="text/html" title="GLM-5.3 Optimizations, Part 2: PCP, DCP, and Hybrid HiSparse on 16 H200s" /><published>2026-10-23T00:00:00+00:00</published><updated>2026-10-23T00:00:00+00:00</updated><id>https://vllm-project.github.io/2026/10/23/glm53-part2-pcp-dcp-hisparse</id><content type="html" xml:base="https://vllm-project.github.io/2026/10/23/glm53-part2-pcp-dcp-hisparse.html"><![CDATA[<p><strong>TL;DR:</strong> Long agentic contexts push GLM-5.3 against two limits on H200s: KV cache memory and prefill speed. We address both on 16 H200s, split into one prefill node and one decode node:</p>

<ul>
  <li><strong>Prefill Context Parallelism (PCP)</strong> splits each prompt across GPUs by token instead of by head, which suits GLM-5.3’s sparse attention far better than tensor parallelism.</li>
  <li><strong>Decode Context Parallelism (DCP)</strong> shards the prefill engine’s KV cache by token, so a 1M context fits on the prefill node.</li>
  <li><strong>Hybrid HiSparse</strong> lets decode keep KV in host memory, so a 1M-token request fits.</li>
  <li>On AgentX, PCP8 × DCP8 prefill with Hybrid HiSparse decode gives 1.7–3.2× the per-user speed of a data-parallel deployment at the same throughput, and it is the only configuration we tested that serves 1M-token contexts.</li>
</ul>

<h2 id="serving-long-contexts-in-memory-constrained-deployments">Serving long contexts in memory-constrained deployments</h2>

<p>Agentic workloads have long contexts that grow with every turn, which puts pressure on both GPU memory and prefill. On H200s, GLM-5.3’s weights take up most of each GPU’s memory, leaving little room for the KV cache of those long contexts. And because every turn adds more tool output and file contents to prefill, under load the prefill engines can become the bottleneck for the whole deployment.</p>

<p><a href="/blog/2026-09-08-glm53-part1-hybrid-sparse-offloading">Part 1</a> showed how Hybrid HiSparse lets long contexts fit in an aggregated deployment on a single 8× H200 node. Prefill/decode disaggregation takes more than that. On the prefill node, we use PCP to speed up long prompts by parallelizing across the prompt’s tokens. With MLA, however, this leaves every PCP rank holding a full copy of the KV cache, so we combine it with DCP to remove that replication. On the decode node, Hybrid HiSparse allows higher concurrency at long contexts. vLLM’s new modular core (<a href="/blog/2026-03-24-mrv2">Model Runner V2</a>) makes composing all of this much easier.</p>

<h3 id="why-not-tp-or-dp">Why not TP or DP?</h3>

<p>Two standard ways to run GLM-5.3 prefill on an 8× H200 node are DP8 and TP8:</p>

<ul>
  <li><strong>DP8</strong> assigns each prompt to a single GPU, so its attention cannot use the other seven. This limits time to first token (TTFT) for long prompts, and the prompt’s KV cache must fit in that GPU’s memory.</li>
  <li><strong>TP8</strong> partitions the attention heads across GPUs. Because MLA’s latent KV is shared by all 64 heads, every GPU stores the full cache and reads it to serve only 8 heads. The indexer, which scores every earlier token to select the 2,048 that sparse MLA attends to, is not partitioned at all, so its quadratic cost is repeated on every GPU.</li>
</ul>

<p>Neither scheme spreads one long prompt’s attention work across the eight GPUs without also keeping its whole KV on each GPU that serves it. The next two sections address each half. PCP splits a prompt’s queries across GPUs, and DCP splits its KV.</p>

<h2 id="pcp-split-the-tokens-not-the-heads">PCP: split the tokens, not the heads</h2>

<p>In our 8× H200 prefill engine, PCP splits each prompt across the eight GPUs by token: every GPU computes the queries for one eighth of the prompt, with all 64 heads. A naive split would be unbalanced. Under causal attention a token attends to every token before it, so the GPU holding the end of the prompt would do far more work than the one holding the start. PCP instead cuts the prompt into 16 chunks and pairs them up: GPU $r$ takes chunk $r$ from the front and chunk $15 − r$ from the back, so every GPU gets the same mix of cheap and expensive tokens (Figure 3 shows this as a V-shaped pattern across the eight GPUs). This is the load-balanced sharding from <a href="https://arxiv.org/abs/2411.01783">Context Parallelism for Scalable Million-Token Inference</a>. Finally, each GPU’s new KV is all-gathered, so every query can still attend to the full context.</p>

<p align="center">
<img src="/assets/figures/2026-10-23-glm53-part2-pcp-dcp-hisparse/tp-vs-pcp-prefill.svg" alt="Token chunks by heads for one prefill on 8 GPUs, shaded by owning GPU. TP8: each GPU owns 8 heads of every token and computes the full indexer, so sparse MLA does 26 FLOPs per byte moved and is memory-bound on H200. PCP8: each GPU owns token chunks r and 15 minus r with all 64 heads and indexes only those tokens, so sparse MLA does 191 FLOPs per byte moved, near the H200 ridge of 206" width="100%" />
<br />
<em>Figure 1. One prefill on 8 GPUs under TP8 and PCP8, shaded by the GPU that owns each piece. The bars show sparse MLA's arithmetic intensity; the line marks where the H200 becomes compute-bound in BF16.</em>
</p>

<p>Figure 1 compares the two splits. PCP fixes both problems. Each GPU indexes only its own tokens, so the indexer is no longer replicated on every GPU and each GPU does an eighth of it. And each KV row read from memory now serves all 64 heads instead of 8, raising sparse MLA from about 26 to about 191 FLOPs per byte moved,<sup id="fnref:intensity" role="doc-noteref"><a href="#fn:intensity" class="footnote" rel="footnote">1</a></sup> close to where the H200 becomes compute-bound in BF16.<sup id="fnref:ridge" role="doc-noteref"><a href="#fn:ridge" class="footnote" rel="footnote">2</a></sup></p>

<p>Not replicating the indexer matters most for long prefills. The indexer’s cost grows quadratically with prompt length, while sparse MLA’s grows only linearly, because each query attends to a fixed 2,048 tokens. Counting FLOPs for a prefill from scratch, the indexer overtakes sparse MLA under TP8 once the prompt reaches about 32K tokens; under PCP8, where no GPU replicates it, the crossover moves out to about 256K.</p>

<p>Together, these make PCP a great fit to prefill long prompts. But PCP still has two costs. Each GPU holds all the attention weights, while the MoE experts stay split across the eight GPUs with EP8. And because the new KV is all-gathered every layer, every GPU still ends up storing the full KV cache. That replicated cache, not compute, is what limits context length, and it is what DCP addresses.</p>

<h2 id="dcp-shard-the-kv-cache-too">DCP: shard the KV cache too</h2>

<p>A 1M-token GLM-5.3 request needs 53.4 GiB of FP8 KV,<sup id="fnref:kvsize" role="doc-noteref"><a href="#fn:kvsize" class="footnote" rel="footnote">3</a></sup> but each GPU has room for only about 15 GiB. <a href="/blog/2026-08-07-decode-context-parallelism">Decode Context Parallelism</a> (DCP) fixes this by splitting the cache itself: tokens are dealt round-robin across the eight GPUs, so each GPU stores every eighth token, and the same request needs only 6.7 GiB (=53.4/8) per GPU. Figure 2 compares this with DP8 and TP8.</p>

<!--RLC: where is the 15 GiB number of KV room per GPU coming from? vLLM logs? -->

<p align="center">
<img src="/assets/figures/2026-10-23-glm53-part2-pcp-dcp-hisparse/pcp-dcp-kv-sharding.svg" alt="KV per GPU for one 1M-token request: 53.4 GiB on one GPU under DP8, 53.4 GiB on every GPU under TP8, 6.7 GiB per GPU under PCP8 with DCP8" width="100%" />
<br />
<em>Figure 2. TP replicates MLA's latent KV, so eight GPUs buy no room. DCP divides it by eight.</em>
</p>

<div class="markdown-alert markdown-alert-note"><p class="markdown-alert-title"><svg data-component="Octicon" class="octicon octicon-info" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg> Note</p><p><strong>PCP splits queries; DCP splits KV.</strong> The names are historical. DCP was built for decode, where each request has a single query token, so the KV cache is the only thing worth splitting. PCP was built for prefill, where the prompt’s many query tokens are the work. Our setup runs both in the prefill engine.</p>
</div>

<p>As a result of this sharding, most of the KV that each GPU’s queries need now lives on other GPUs. In decode, DCP sends the queries to the KV: each GPU attends over its own shard, and the partial results are merged with their log-sum-exp. In this prefill engine it does the reverse: every layer, each GPU all-gathers the shards into a temporary full-context copy, attends for its own queries, and frees the copy. Only the persistent cache is divided by eight.</p>

<p>Figure 3 puts it all together. Step through one layer of PCP8 × DCP8 to see which KV each GPU stores, which queries it computes, and what crosses the interconnect. Switch to DP8, TP8 or PCP8 to compare. Note that the two layouts do not line up: GPU $g$ stores every eighth token but computes the queries of chunks $g$ and $15 − g$, which is why every layer needs the all-gather.</p>

<div id="ppx" role="figure" aria-label="Figure 3: interactive view of one prefill layer on 8 GPUs under DP8, TP8, PCP8 and PCP8 × DCP8"></div>

<script src="/assets/figures/2026-10-23-glm53-part2-pcp-dcp-hisparse/prefill-explorer.js?v=4"></script>

<p align="center"><em>Figure 3. One prefill layer on 8 GPUs under each scheme. Pick a scheme and step through to see which queries each GPU computes, which KV it keeps, and what crosses the interconnect.</em></p>

<p>That all-gather is not free: every layer, it re-sends the whole cached context, so its cost grows with context length. Figure 4 isolates it by running the same 2K-token prefill chunk on one PCP8 node with and without DCP8, at equal cached context. DCP8 adds about 6% per step up to 64K tokens of context, rising to 15% at 248K. That is the price of an 8× larger KV pool. This overhead could be reduced by overlapping each layer’s all-gather with the previous layer’s compute, an optimization we are currently working on.</p>

<p align="center">
<img src="/assets/figures/2026-10-23-glm53-part2-pcp-dcp-hisparse/dcp-overhead.svg" alt="DCP8 overhead per prefill step as a percentage of the step without DCP, against cached context: about 6 percent up to 64K tokens, rising to 15 percent at 248K for a 2K-token chunk" width="75%" />
<br />
<em>Figure 4. DCP8's per-step overhead for a 2K-token chunk on one 8× H200 PCP8 engine. The band spans 1K, 4K, and 8K chunks.</em>
</p>

<p>Beyond roughly 250K tokens, PCP8 alone cannot hold the KV cache; there, DCP is not an overhead but what makes long prompts possible. Together, PCP8 × DCP8 gives the prefill engine both speed and room.</p>

<h2 id="the-deployment">The deployment</h2>

<p>We serve it as a prefill/decode (P/D) disaggregated deployment on two 8× H200 nodes. Both engines use an FP8 KV cache and MTP speculative decoding with three draft tokens (MTP3):</p>

<ul>
  <li><strong>Prefill:</strong> one PCP8 × DCP8 × EP8 engine, with 512 GiB of CPU KV offload so later turns reuse their prefix.</li>
  <li><strong>Decode:</strong> eight DP ranks with EP8 and Hybrid HiSparse from <a href="/blog/2026-09-08-glm53-part1-hybrid-sparse-offloading">Part 1</a> (48 GiB host pool + 16 GiB offload per rank), so decode concurrency is bounded by host memory rather than HBM.</li>
</ul>

<p>A prefix-aware <a href="https://github.com/llm-d/llm-d">llm-d</a> router sends each request to the prefill engine, the NIXL connector moves its KV cache to a decode rank, and the decode rank streams the tokens back.</p>

<p>We compare PCP8 × DCP8 prefill against DP8 prefill (eight DP ranks with EP8 and 64 GiB of CPU KV offload each, the same 512 GiB in total), and Hybrid HiSparse against plain CPU KV offloading on the decode node, with the same 512 GiB of host memory either way (8 × 48 GiB of HiSparse pool + 8 × 16 GiB of offload for HiSparse). Every configuration uses the same 16 GPUs, host memory, and vLLM build.</p>

<h2 id="results">Results</h2>

<p>We ran the SemiAnalysis <a href="https://vllm.ai/blog/2026-09-08-vllm-agentx">AgentX</a> benchmark: Claude Code traces replayed with prefix reuse, a fresh server per concurrency, one-hour runs, and MTP3 with a synthetic acceptance length fixed at 2.99, so every configuration gets the same speculative speedup. Throughput is logical tok/s per GPU (including cached): input plus output tokens, counting prefix-cached input, over all 16 GPUs. Interactivity is AgentX’s P90 E2E-normalized output tokens/s per user, the x-axis of Figure 5.</p>

<p align="center">
<img src="/assets/figures/2026-10-23-glm53-part2-pcp-dcp-hisparse/agentx-pareto.svg" alt="AgentX throughput per GPU against interactivity at 142K and 1M context for the four prefill and decode combinations" width="100%" />
<br />
<em>Figure 5. One point per concurrency, each on a fresh deployment, at two context limits: c8–c64 at 142K and c8–c32 at 1M. Labels give the concurrency for PCP8 × DCP8 prefill with HiSparse decode; the other configurations run the same concurrencies, right to left. Hollow points are off their own configuration's Pareto frontier.</em>
</p>

<p>Up to c32, the deployment is mostly prefill-bound, so the prefiller makes the bigger difference. With HiSparse decode in both setups, PCP8 × DCP8 prefill gives 1.7–3.2× the interactivity of DP8 at the same throughput and cuts median TTFT from 1.5–5.2 s to 0.8–0.9 s. The decoder makes little difference at this load: at c8 and c16 the two PCP8 × DCP8 configurations are within a few percent of each other, and offload-only decode is slightly ahead at c8.</p>

<p>From c32 the deployment becomes more decode-bound, and HiSparse decode pulls ahead. At c64 it nearly doubles throughput, to 8,340 logical tok/s/GPU at 29.6 tok/s/user, while every other configuration drops to 1–2 tok/s/user.</p>

<p>At 1M context, the deployment needs both. A DP8 prefill rank cannot hold one 1M-token request, and neither can an offload-only decode rank.</p>

<h2 id="making-it-all-compose">Making it all compose</h2>

<p>Much of the challenging work in vLLM is making features like these compose. Each changes how the KV cache is laid out, scheduled, or moved, and every combination has to stay correct and fast.</p>

<p>For P/D, the KV has to change layout between the two engines. The prefill engine shards each request’s KV by token across eight GPUs. Each decode rank needs the whole KV, including the MTP layer’s, in its own paged layout. The NIXL connector does this reassembly between the two nodes, and prefix reuse from CPU offload has to keep working alongside it.</p>

<p>Every configuration here runs on <a href="/blog/2026-03-24-mrv2">Model Runner V2</a>. It keeps model-specific state out of the common execution path and runs speculative decoding without CPU–GPU syncs. Hybrid HiSparse is built on it.</p>

<h2 id="try-it">Try it</h2>

<p>Everything runs on vLLM v0.32.0 or later (the <code class="language-plaintext highlighter-rouge">vllm/vllm-openai:v0.32.0</code> image). The results above were measured on vLLM main at <code class="language-plaintext highlighter-rouge">9e38b4111a</code>. The <a href="https://gist.github.com/LucasWilkinson/b39792adeea1cc2b1505fb6b7a2a2654">reproduction gist</a> pins <code class="language-plaintext highlighter-rouge">2537629eb2</code>. The prefill engine’s key flags:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">--prefill-context-parallel-size</span> 8 <span class="se">\</span>
<span class="nt">--decode-context-parallel-size</span> 8 <span class="se">\</span>
<span class="nt">--dcp-comm-backend</span> ag_rs <span class="se">\</span>
<span class="nt">--enable-expert-parallel</span> <span class="se">\</span>
<span class="nt">--attention-config</span> <span class="s1">'{"sparse_mla_force_mqa":true}'</span>
</code></pre></div></div>

<p>Without <code class="language-plaintext highlighter-rouge">sparse_mla_force_mqa</code>, prefill batches whose prompts fit within the 2,048-token top-k take the dense MHA path. The flag keeps them on the sparse-MLA (MQA) kernel too, so every KV row serves all heads.</p>

<h2 id="acknowledgements">Acknowledgements</h2>

<p>This work was done by Roberto L. Castro (Red Hat), Simon Veitner (Red Hat), Matthew Bonanni (Red Hat), Lucas Wilkinson (Red Hat), and Nicolò Lucchesi (Mistral). We thank Maroon Ayoub (Red Hat) and Robert Shaw (Red Hat) for stress testing the deployment, reporting errors, and fixing bugs, as well as Wentao Ye (Red Hat) for other GLM-5.3 performance optimizations (see <a href="https://github.com/vllm-project/vllm/issues/57406">#57406</a>).</p>

<h2 id="notes">Notes</h2>

<div class="footnotes" role="doc-endnotes">
  <ol>
    <li id="fn:intensity" role="doc-endnote">
      <p>Per query, sparse MLA reads 2,048 selected KV rows of 660 bytes each (656 of FP8 KV in FlashMLA’s <code class="language-plaintext highlighter-rouge">fp8_ds_mla</code> format, plus a 4-byte index), about 1.35 MB. Each head adds 2,176 bytes for its BF16 query and output, and does 2,176 FLOPs per row (QK over 576 dims, PV over 512). So 8 heads do 35.7 MFLOPs over 1.37 MB, about 26 FLOPs per byte, and 64 heads do 285 MFLOPs over 1.49 MB, about 191. <a href="#fnref:intensity" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:ridge" role="doc-endnote">
      <p>For the H200 SXM: 989 dense BF16 TFLOP/s (the datasheet’s 1,979 assumes 2:4 sparsity) $\div$ 4.8 TB/s $\approx$ 206 FLOPs per byte (<a href="https://resources.nvidia.com/en-us-hopper-architecture/hpc-datasheet-sc23">NVIDIA H200 datasheet</a>). <a href="#fnref:ridge" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
    <li id="fn:kvsize" role="doc-endnote">
      <p>Per token: 78 layers × 656 B of MLA KV, 21 indexer layers × 132 B of indexer keys (128 FP8 values plus a 4-byte scale), and 788 B for the MTP layer, or 54,728 B in total. For $2^{20}$ = 1,048,576 tokens, that is 54,728 MiB $\approx$ 53.4 GiB. <a href="#fnref:kvsize" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
    </li>
  </ol>
</div>]]></content><author><name>vLLM Team</name></author><category term="glm" /><category term="parallelism" /><category term="kv-cache" /><category term="disaggregation" /><category term="performance" /><summary type="html"><![CDATA[TL;DR: Long agentic contexts push GLM-5.3 against two limits on H200s: KV cache memory and prefill speed. We address both on 16 H200s, split into one prefill node and one decode node:]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://vllm-project.github.io/assets/figures/2026-10-23-glm53-part2-pcp-dcp-hisparse/agentx-pareto.svg" /><media:content medium="image" url="https://vllm-project.github.io/assets/figures/2026-10-23-glm53-part2-pcp-dcp-hisparse/agentx-pareto.svg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">vLLM Delivers Day-0 Support for MiniMax-M3.1-Flash</title><link href="https://vllm-project.github.io/2026/10/23/minimax-m31-flash.html" rel="alternate" type="text/html" title="vLLM Delivers Day-0 Support for MiniMax-M3.1-Flash" /><published>2026-10-23T00:00:00+00:00</published><updated>2026-10-23T00:00:00+00:00</updated><id>https://vllm-project.github.io/2026/10/23/minimax-m31-flash</id><content type="html" xml:base="https://vllm-project.github.io/2026/10/23/minimax-m31-flash.html"><![CDATA[<p align="center">
<img src="/assets/figures/2026-10-23-minimax-m31-flash/hero.png" alt="vLLM x MiniMax-M3.1-Flash day-0 support" width="100%" />
</p>

<p>MiniMax-M3.1-Flash is the latest model in the MiniMax-M3 family, with improvements across reasoning, coding, agentic, and visual tasks. It is also built for inference efficiency, with a native NVFP4 KV cache, NVFP4-quantized MoE weights, and a DSpark draft model for speculative decoding.</p>

<p>vLLM supports MiniMax-M3.1-Flash on day 0 on NVIDIA Blackwell GPUs, on NVIDIA Rubin GPUs with dedicated Rubin kernels, and on AMD MI350-series GPUs, with strong performance on agentic workloads.</p>

<h2 id="tldr">TL;DR</h2>

<ul>
  <li><strong>MiniMax Sparse Attention (MSA)</strong> with an <strong>NVFP4 KV cache</strong> for both the indexer and the attention path, plus <strong>NVFP4 MoE weights</strong> and a <strong>DSpark</strong> drafter.</li>
  <li><strong>Blackwell MSA kernels</strong> use the new CUDA 13.4 <code class="language-plaintext highlighter-rouge">QMUL4</code> instruction to dequantize NVFP4 into FP8 inside the kernel: up to <strong>1.7× faster</strong> indexer QK decode and <strong>1.3× faster</strong> sparse attention decode.</li>
  <li><strong>NVFP4 MegaMoE</strong> with MXFP8 shared-expert fusion and early TMEM release: <strong>20% lower kernel latency</strong> in prefill and <strong>7% higher prefill throughput</strong>.</li>
  <li><strong>Indexer decode context parallelism (DCP)</strong>: up to <strong>3.3× faster</strong> indexer per sparse layer at 512K context on 4× GB300.</li>
  <li><strong>QKV GEMM + norm + RoPE + KV-insert fusion</strong>: <strong>1.1–1.6× faster</strong> prefill at 512+ tokens and about <strong>19% lower P50 TTFT</strong> at TP4.</li>
  <li><strong>FlashInfer PrimiTS</strong> backend for the DSpark drafter attention: <strong>1.3–2× faster</strong> than FlashAttention 4, <strong>5% lower</strong> total forward time.</li>
  <li><strong>Rubin (SM107) MSA kernels</strong> are also integrated into vLLM with state-of-the-art performance.</li>
  <li><strong>AMD MI350 series</strong>: the NVFP4-native MSA kernel, indexer decode context parallelism, dual-batch overlap, and the mono kernel deliver a <strong>2–3×</strong> performance boost across the board.</li>
  <li><strong>Agentic Serving</strong>: on NVIDIA GB300, up to <strong>418.9 tok/s per user</strong> at the latency-sensitive end; on NVIDIA Rubin, up to <strong>724.9 tok/s per user</strong> and <strong>191.5K total tok/s per GPU</strong>; on AMD MI355X, up to <strong>133.3M total tokens per dollar</strong> of TCO on the SemiAnalysis AgentX benchmark.</li>
  <li><strong>Day-0 RL support</strong>: end-to-end RL with veRL, FSDP2, and LoRA on the NVFP4 checkpoint.</li>
</ul>

<h2 id="quick-start">Quick start</h2>

<p>Prebuilt images are available for both vendors:</p>

<ul>
  <li>NVIDIA: <code class="language-plaintext highlighter-rouge">vllm/vllm-openai:minimax-m31-flash</code></li>
  <li>AMD: <code class="language-plaintext highlighter-rouge">vllm/vllm-openai-rocm:minimax-m31-flash</code></li>
</ul>

<p>Note that the model will only be available in the nightly PyPI wheel after the code is reviewed and merged upstream, which usually takes about a week. <!-- TODO: link the upstream vLLM PR once it is open. --> Full recipes are at <a href="https://recipes.vllm.ai/MiniMaxAI/MiniMax-M3.1-Flash">vLLM Recipes</a>, and the checkpoint is at <a href="https://huggingface.co/MiniMaxAI/MiniMax-M3.1-Flash">MiniMaxAI/MiniMax-M3.1-Flash</a>.</p>

<h3 id="tp4-on-nvidia">TP4 on NVIDIA</h3>

<p>We recommend the CUDA 13.4 toolkit for the best performance.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>vllm serve MiniMaxAI/MiniMax-M3.1-Flash <span class="se">\</span>
  <span class="nt">-tp</span> 4 <span class="se">\</span>
  <span class="nt">--reasoning-parser</span> minimax_m3 <span class="se">\</span>
  <span class="nt">--block-size</span> 128 <span class="se">\</span>
  <span class="nt">--kv-cache-dtype</span> nvfp4 <span class="se">\</span>
  <span class="nt">--attention-config</span> <span class="s1">'{"indexer_kv_dtype": "nvfp4"}'</span> <span class="se">\</span>
  <span class="nt">--speculative-config</span> <span class="s1">'{"method":"dspark","num_speculative_tokens":7,"attention_backend":"FLASHINFER_TS","kv_cache_dtype":"fp8","draft_sample_method":"probabilistic"}'</span> <span class="se">\</span>
  <span class="nt">--disable-hybrid-kv-cache-manager</span>
</code></pre></div></div>

<h3 id="tp4-on-amd">TP4 on AMD</h3>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>vllm serve MiniMaxAI/MiniMax-M3.1-Flash <span class="se">\</span>
  <span class="nt">-tp</span> 4 <span class="se">\</span>
  <span class="nt">--reasoning-parser</span> minimax_m3 <span class="se">\</span>
  <span class="nt">--block-size</span> 128 <span class="se">\</span>
  <span class="nt">--kv-cache-dtype</span> nvfp4 <span class="se">\</span>
  <span class="nt">--attention-config</span> <span class="s1">'{"indexer_kv_dtype": "nvfp4", "indexer_decode_cp": true}'</span> <span class="se">\</span>
  <span class="nt">--quantization-config</span>.moe mxfp8 <span class="se">\</span>
  <span class="nt">--speculative-config</span> <span class="s1">'{"method":"dspark","num_speculative_tokens":3,"attention_backend":"TRITON_ATTN","kv_cache_dtype":"fp8","draft_sample_method":"probabilistic"}'</span> <span class="se">\</span>
  <span class="nt">--disable-hybrid-kv-cache-manager</span>
</code></pre></div></div>

<h2 id="msa-primer">MSA primer</h2>

<p>The MiniMax-M3 model family replaces full attention with a variant of block-sparse attention (<a href="https://arxiv.org/abs/2606.13392v1">arXiv 2606.13392</a>) to make inference more efficient. The KV cache is split into blocks of 128 tokens. A lightweight indexer scores every key in the context with one index query per GQA group against a single shared index-key head, then max-pools those scores into one score per block. Main attention then runs exactly, but only over the top 16 blocks, and the most recent block is always kept. That caps each query at 2,048 keys, however long the context is.</p>

<p>The payoff is largest in decode, which is limited by memory bandwidth. Each step still scans the index keys for the whole context, but that is only 128 bytes per token per layer, an eighth of the 1,024 bytes of K/V that dense attention would read (FP8, 4 KV heads × 128 dims). The full K/V is then read for just the 2,048 selected tokens. At long-context decode, per-step HBM traffic drops to about 12.5% of what dense attention reads.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/minimax-m31-msa.html" title="MiniMax Sparse Attention: indexer, top-k block selection, and sparse attention" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 900px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 1: MiniMax Sparse Attention. Each GQA group’s indexer picks its top KV blocks, and every query head in that group attends exactly over only those blocks. Step through it.</em></p>

<h3 id="what-is-new-in-the-minimax-m31-architecture">What is new in the MiniMax-M3.1 architecture</h3>

<p>MiniMax-M3.1 greatly improves inference efficiency over the previous generation: it was natively quantization-aware trained for an NVFP4 KV cache, and its routed MoE weights are stored in NVFP4. The NVFP4 experts shrink the checkpoint from 451.5 GB (MiniMax-M3-MXFP8) to 250.1 GB, which is 44.6% smaller. The NVFP4 KV cache needs 34,560 bytes per token instead of 61,440 bytes in FP8, a saving of 43.75% per token. Together, on four NVIDIA B300 GPUs with DEP4 deployment and 256K-token sequences, M3.1 fits 76 concurrent sequences where M3 with an FP8 KV cache fits 28, about 2.7× as many on the same hardware, which directly raises serving throughput.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/minimax-m31-gpu-memory.html" title="How many MiniMax-M3.1-Flash sequences fit on each GPU" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 900px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 2: MiniMax-M3.1 is quantization-aware trained to use an NVFP4 KV cache for both the indexer and sparse attention. Change the KV cache dtype, parallelism, GPU, or context length to see how many sequences fit.</em></p>

<h2 id="performance-optimizations">Performance optimizations</h2>

<p>vLLM delivers strong MiniMax-M3.1 performance across multiple hardware platforms. On NVIDIA GPUs, we ship kernels optimized for the NVFP4 KV cache. Our MSA repository (<a href="https://github.com/vllm-project/MSA">vllm-project/MSA</a>) contains kernels tuned for different workloads and operations. These include MSA indexer prefill and decode, sparse attention prefill and decode, and an MSA-specific top-k kernel.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/minimax-m31-layer-kernels.html" title="One MiniMax-M3.1 sparse decoder layer, kernel by kernel" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 1100px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 3: One MiniMax-M3.1 sparse decoder layer on Blackwell at decode (M ≤ 32), kernel by kernel. Numbered badges mark the optimizations in this post; click one to highlight its kernels.</em></p>

<h3 id="nvidia-blackwell-optimized-msa-kernels">NVIDIA Blackwell optimized MSA kernels</h3>

<p>The KV cache is stored in NVFP4 while the query stays in FP8, so we cannot use the native NVFP4 tensor core instructions for the matrix multiply. Instead, the kernel dequantizes the NVFP4 KV cache to FP8 and runs an FP8 MMA. To keep the dequantization cost low, we use a new Blackwell-specific PTX instruction introduced in CUDA 13.4, <code class="language-plaintext highlighter-rouge">mul.e4m3x4.e2m1x4.e4m3x4</code> (SASS <code class="language-plaintext highlighter-rouge">QMUL4</code>). It scales four NVFP4 values by their scale factor and produces four FP8 values in a single instruction. This takes far fewer CUDA core instructions than the previous FP16 round-trip path. The result is up to a 1.7× speedup on the indexer QK decode kernel and 1.3× on the sparse attention decode kernel.</p>

<h3 id="nvfp4-megamoe">NVFP4 MegaMoE</h3>

<p>MegaMoE is a key building block for modern expert-parallel (EP) deployments. We extended DeepGEMM’s MegaMoE to NVFP4 precision with fused MXFP8 shared experts, open-sourced in our fork (<a href="https://github.com/vllm-project/DeepGEMM">vllm-project/DeepGEMM</a>). Adding NVFP4 support to MegaMoE is more than a dtype swap. NVFP4 halves the bytes per element and doubles tensor core throughput compared with the previous FP8×FP4 path. The rest of the kernel has to change too, or the pipeline falls out of balance.</p>

<p>One such change is releasing the TMEM stage early in the FC1 epilogue. Previously, the TMEM stage was released only after the epilogue finished. That wait is unnecessary because the epilogue runs entirely in registers. TMEM can be released as soon as the accumulator has been loaded into registers, before any arithmetic happens. This cuts total kernel latency by 20% in prefill, where the faster NVFP4 compute matters most. It also raises overall prefill throughput by 7%.</p>

<h3 id="nvfp4-indexer-dcp-decode-context-parallelism">NVFP4 indexer DCP (decode context parallelism)</h3>

<p>In low-latency serving, each GPU scores its own index head over the full context. Across the four GPUs, that means every indexer layer reads the full index cache four times. Indexer DCP splits the work by context instead. Each GPU scores all four heads over a quarter of the pages. It then sends its local top-16 for each head over NVLink to the GPU that owns that head, which merges the candidates into the final top-16. The selection remains exact, and the indexer runs up to 3.3× faster per sparse layer at 512K context on 4× NVIDIA GB300 GPUs.</p>

<h3 id="qkv-gemm--norm--rope--kv-insert-fusion">QKV GEMM + norm + RoPE + KV insert fusion</h3>

<p>MiniMax-M3.1’s QKV and indexer projections used to write the full QKV tensor to HBM. A second kernel then read it back for norm, RoPE, and KV cache insertion. We fused the whole chain into a single GEMM kernel whose epilogue processes the FP32 accumulator head by head. It applies norm and RoPE to the query and index query. It also quantizes K, V, and the index key to NVFP4 and writes them directly into their caches. The QKV tensor never touches HBM. On GB300, prefill batches of 512 or more tokens run 1.1–1.6× faster, and P50 time-to-first-token (TTFT) drops by about 19% at TP4.</p>

<h3 id="flashinfer-primits-for-the-dspark-drafter">FlashInfer PrimiTS for the DSpark drafter</h3>

<p>MiniMax-M3.1 uses DSpark as its speculative decoding drafter, which runs non-causal GQA with a 4096-token sliding window. Previously, vLLM ran the drafter on FlashAttention 4, which is not optimized for decode shapes. We switched it to FlashInfer’s PrimiTS backend. PrimiTS is 1.3–2× faster than FlashAttention 4 and cuts overall forward time by 5%.</p>

<h3 id="agentic-workload-benchmark-on-nvidia-gb300">Agentic workload benchmark on NVIDIA GB300</h3>

<p>vLLM delivers strong performance on agentic serving workloads. We benchmark our day-0 image on NVIDIA GB300 with the SemiAnalysis AgentX benchmark (detailed in our <a href="https://vllm.ai/blog/2026-09-08-vllm-agentx">previous post</a>). At the latency-sensitive end of the frontier, MiniMax-M3.1-Flash holds 418.9 tokens per second per user. Further along the frontier, it keeps each user above 200 tokens per second while serving 38.6K total tokens per second per GPU. At the throughput end, it reaches 153.8K tokens per second per GPU, about 24× the most interactive point, while each user still sees about 127 tokens per second.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/minimax-m31-agentx-gb300.html" title="MiniMax-M3.1-Flash AgentX Pareto frontier on NVIDIA GB300" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 640px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 4: AgentX Pareto frontier for MiniMax-M3.1-Flash on NVIDIA GB300, with 7 speculative tokens and synthetic acceptance lengths of 3.16–3.26 tokens (including the first token). Hover a point for its metrics.</em></p>

<h3 id="nvidia-rubin-optimized-msa">NVIDIA Rubin optimized MSA</h3>

<p>We also optimized this model on NVIDIA Rubin GPUs. To mitigate the NVFP4 to FP8 conversion overhead, we convert NVFP4 directly to FP16 and run the score MMA in FP16 for the indexer. This cuts dequant instructions by about a third, and the scores become exact rather than carrying the E4M3 re-rounding to run FP8 MMA.</p>

<p>With ≤4 queries, the one-head indexer decode kernel goes further: it applies each block scale once per MMA result with SM107’s packed <code class="language-plaintext highlighter-rouge">fma.rn.f32x2.f16x2</code>, instead of once per K value. This also enables more latency hiding by running three CTAs per SM. Rubin’s larger shared memory (328 KB vs 228 KB on Blackwell) and extra Tensor Memory columns (576 vs. 512 on Blackwell) make that possible.</p>

<p>Finally, because Rubin has more SMs than Blackwell, the work planners size their tiles from the SM count, so the work is spread evenly across all 212 of Rubin’s SMs.</p>

<p>Prefill sparse attention also benefits from locality domain optimizations. We allocate the partial buffers through the CUDA virtual memory API so that 2 MB pages alternate between the two domains, and the combined kernel hands each tile to a CTA whose SM sits in the domain that holds that tile’s data. On Rubin the prefill &amp; decode attention kernels use dense FP8 MMA with K=64 per instruction, which halves the MMA instruction count and runs at twice Blackwell’s FP8 rate.</p>

<h3 id="agentic-workload-benchmark-on-nvidia-rubin">Agentic workload benchmark on NVIDIA Rubin</h3>

<p>On NVIDIA Rubin, MiniMax-M3.1-Flash pushes the frontier further on the same benchmark. At the latency-sensitive end, it holds 724.9 tokens per second per user. Further along the frontier, it keeps each user above 200 tokens per second while serving 157.3K total tokens per second per GPU. At the throughput end, it reaches 191.5K tokens per second per GPU while each user still sees about 134 tokens per second, about 1.5× GB300 at the same per-user rate.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/minimax-m31-agentx-rubin.html" title="MiniMax-M3.1-Flash AgentX Pareto frontier on NVIDIA Rubin" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 640px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 5: AgentX Pareto frontier for MiniMax-M3.1-Flash on NVIDIA Rubin. Hover a point for its configuration and metrics.</em></p>

<h2 id="amd-gpu-support">AMD GPU support</h2>

<p>On AMD GPUs, we bring NVFP4 KV cache support, so AMD deployments can also use the low-precision format to cut KV cache memory. For decode, we add indexer DCP to speed up long-context decode, and a mono kernel that speeds up low-latency inference. For prefill, sequence parallelism and dual-batch overlap cut communication inside the engine, and a new KV cache layout lets each KV block move to the decode node in a single transfer. The MSA and mono kernels are built in <a href="https://github.com/rocm/flydsl">FlyDSL</a>, AMD’s Python DSL for GPU kernels, with help from the FlyDSL team.</p>

<h3 id="nvfp4-msa-kernel">NVFP4 MSA kernel</h3>

<p>MiniMax-M3.1 is trained with an NVFP4 KV cache (QAT) for both the main attention and the indexer, but CDNA4 has no native instruction to dequantize NVFP4. To keep the MSA kernels fast, we turn dequantization into a table lookup. There are only 256 possible E4M3 scales and eight E2M1 magnitudes, so we precompute every scaled value, already rounded to FP8, into a 2 KB table in LDS. One <code class="language-plaintext highlighter-rouge">v_perm_b32</code> byte permute plus one XOR for the sign bits then converts four FP4 values to FP8. The kernel also dequantizes a shared-prefix page only once for up to 64 requests that share it. Together, these make sparse decode attention up to 2.5× faster than converting the selected blocks to FP8 and running the FP8 attention kernel.</p>

<h3 id="nvfp4-indexer-dcp">NVFP4 indexer DCP</h3>

<p>We use the same indexer decode context parallelism on AMD as on NVIDIA, and on CDNA4 it brings an extra win. Without DCP, each GPU at TP4 scores its own index head over the full context, so the index cache is read four times. It also leaves the matrix cores underused. A DSpark-3 decode step has only 4 query rows per request, which fills just 4 of the 16 columns of the 16×16×128 FP8 MFMA. With DCP, each GPU scores all four heads over a quarter of the context, so 4 heads × 4 rows fill all 16 columns. A single kernel exchanges the index queries, scores its blocks, and writes each head’s scores directly into the owning GPU’s memory over Infinity Fabric. A device-side handshake keeps this working inside HIP graphs. The owner then picks the top 16 as before, and because the scores are bit-for-bit identical to the single-GPU version, the selection is exact. On 4× MI355X, the indexer runs up to 2.8× faster per sparse layer on 45 requests of 30K–210K tokens.</p>

<h3 id="sp--dbo-prefill-and-one-read-kv-transfer">SP + DBO prefill and one-read KV transfer</h3>

<p>At TP4, long-prompt prefill on MI355X is bound by communication, both between GPUs inside a node and between the prefill and decode nodes. Inside the engine, dual-batch overlap (DBO) hides the tensor-parallel collectives behind the other microbatch’s compute. Sequence parallelism (SP) cuts the traffic itself. Each GPU keeps a quarter of the tokens, the attention output is exchanged all-to-all in MXFP8 so each GPU runs the full <code class="language-plaintext highlighter-rouge">o_proj</code> on its own tokens, and the MoE output is reduce-scattered. This drops traffic per GPU from about 36 KB to 20 KB per token per layer, and norms, quantization, and the router run on only a quarter of the tokens.</p>

<p>A faster prefill engine only helps if the KV cache can also reach the decode node quickly. vLLM’s layer-by-layer KV cache layout splits each KV block across 125 small pages, and each page needs its own NIXL RDMA read. We switch to a block-outer layout that stores each block in one contiguous 1.82 MB row, so NIXL moves it in a single read. Combined, the engine and KV transfer changes make prefill batches of 16K+ tokens 1.8–2.1× faster on 4× MI355X.</p>

<h3 id="low-latency-mono-kernel">Low-latency mono kernel</h3>

<p>At low concurrency, decode on AMD GPUs is launch-bound: kernel launch overhead takes more time than the math. Mono decode fixes this by running each sparse MoE decoder layer as a single FlyDSL kernel launch. That one launch covers everything from the QKV projection and sparse attention to the tensor-parallel all-reduces and the MXFP4 MoE, replacing roughly 1,170 kernel launches. On MI350X at TP4, this makes the decode step up to 2.3× faster and doubles 8K-in/1K-out throughput at low concurrency. On an agentic-coding trace, it raises interactivity by 50–65%.</p>

<h3 id="agentic-workload-benchmark-on-amd-mi355x">Agentic workload benchmark on AMD MI355X</h3>

<p>Our AMD implementation also delivers strong performance per cost. On the InferenceX AgentX benchmark, MiniMax-M3.1-Flash holds 331.0 tokens per second per user at the latency-sensitive end of the frontier. Further along the frontier, it keeps each user above 170 tokens per second while delivering 34.6M total tokens per dollar of TCO. At the cost-efficient end, it reaches 133.3M tokens per dollar, nearly 10× the most interactive point, while each user still sees about 79 tokens per second.</p>
<iframe class="vllm-embed" src="/assets/interactive_pages/minimax-m31-agentx-mi355x.html" title="MiniMax-M3.1-Flash AgentX Pareto frontier on AMD MI355X" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 820px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 6: AgentX Pareto frontier for MiniMax-M3.1-Flash on AMD MI355X, in total tokens per dollar of TCO. c1 and c4 use a synthetic acceptance length of 3.2 tokens with 7 speculative tokens; the other points use 2.45 tokens with 3 speculative tokens. Hover a point for its metrics.</em></p>

<h2 id="day-0-rl-support">Day-0 RL support</h2>

<p>We run RL on MiniMax-M3.1 starting from its NVFP4 checkpoint and train only rank-32 LoRA adapters. The veRL trainer quantizes the base model the same way the engine serves it, with NVFP4 on the routed experts and MXFP8 on the other projections, and syncs only the adapters to the engine after each step. On the engine side, expert LoRA runs inside FlashInfer’s TRTLLM NVFP4 MoE kernel, so the base experts still run on the normal serving kernel.</p>

<p>Before training, we checked that the trainer and the engine agree in three ways. The engine receives exactly the weights the trainer sends, both route each token to the same experts (routing replay), and both assign close logprobs to the same tokens.</p>

<p>The remaining gap is corrected with token-level importance sampling (TIS), with the importance ratio capped at 2. Because each batch gets a single optimizer step, the trainer uses the rollout logprobs as the old logprobs and skips the extra forward pass that would recompute them.</p>

<p>On DAPO-Math-17K with 16 GB300 GPUs, 200 GRPO steps raise AIME-2024 accuracy from 36.3% to 67.5%. Over the same run, training reward rises from −0.06 to 0.67, and train/rollout KL stays low, falling from 0.040 to 0.024.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/minimax-m31-rl-training.html" title="Day-0 RL on MiniMax-M3.1: AIME-2024 accuracy, train/rollout KL, and training reward over 200 GRPO steps" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 520px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 7: Day-0 RL on MiniMax-M3.1-Flash with veRL on DAPO-Math-17K (16× GB300, 200 GRPO steps): AIME-2024 accuracy, training reward, and train/rollout KL. Use the tabs to switch between them.</em></p>

<h2 id="acknowledgments">Acknowledgments</h2>

<p>We extend our sincere gratitude to the MiniMax team for open-sourcing MiniMax-M3.1-Flash. We also thank Inferact, NVIDIA, and AMD (Hongxia Yang for the mono kernel, Felix Marty, Andy Luo, Felix Li, Hattie Wu, Gilbert Lei, and Peng Sun) for delivering day-0 support for the model in vLLM, as well as the FlyDSL team for their help with the AMD kernels and the vLLM community.</p>

<script>
(function () {
  // Resize embedded interactive figures to their content height (they post it when framed).
  window.addEventListener('message', function (event) {
    var d = event.data;
    if (!d || d.type !== 'vllm-embed-resize' || typeof d.height !== 'number') return;
    var frames = document.querySelectorAll('iframe.vllm-embed');
    for (var i = 0; i < frames.length; i++) {
      if (frames[i].contentWindow === event.source) {
        frames[i].style.height = Math.ceil(d.height) + 'px';
      }
    }
  });
})();
</script>]]></content><author><name>Inferact and the vLLM Team</name></author><category term="minimax" /><category term="day-0-support" /><category term="performance" /><category term="kernels" /><category term="hardware" /><summary type="html"><![CDATA[]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://vllm-project.github.io/assets/figures/2026-10-23-minimax-m31-flash/hero.png" /><media:content medium="image" url="https://vllm-project.github.io/assets/figures/2026-10-23-minimax-m31-flash/hero.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Day-0 Support for Flint on vLLM</title><link href="https://vllm-project.github.io/2026/10/21/flint.html" rel="alternate" type="text/html" title="Day-0 Support for Flint on vLLM" /><published>2026-10-21T09:00:00+00:00</published><updated>2026-10-21T09:00:00+00:00</updated><id>https://vllm-project.github.io/2026/10/21/flint</id><content type="html" xml:base="https://vllm-project.github.io/2026/10/21/flint.html"><![CDATA[<p align="center">
<img src="/assets/figures/2026-10-21-flint/hero.png" alt="Flint on vLLM from day 0" width="100%" />
</p>

<p>vLLM supports <strong>Recursive’s Flint from day 0</strong>. Both its NVFP4 and BF16 checkpoints run on a single GPU, and a single request decodes at <strong>about 500 tokens/s</strong> on one GB200, even with 100K tokens of context.</p>

<p>Flint is a 40B-parameter MoE that activates only about 2.5B parameters per token, with sliding-window attention in most layers and a 262K-token context. It ships as two separate checkpoints: NVFP4 (quantization-aware trained) and BF16.</p>

<h2 id="quick-start">Quick start</h2>

<p>The day-0 Docker image <code class="language-plaintext highlighter-rouge">vllm/vllm-openai:flint</code> (x86_64 and arm64, CUDA 13.0) has Flint support built in:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># NVFP4 checkpoint (GGUF): config and tokenizer come from the BF16 repo</span>
docker run <span class="nt">--gpus</span> all <span class="nt">--ipc</span><span class="o">=</span>host <span class="nt">-p</span> 8000:8000 <span class="se">\</span>
  <span class="nt">-v</span> ~/.cache/huggingface:/root/.cache/huggingface <span class="se">\</span>
  vllm/vllm-openai:flint <span class="se">\</span>
  RecursiveSI/flint-nvfp4-gguf <span class="se">\</span>
  <span class="nt">--hf-config-path</span> RecursiveSI/flint <span class="nt">--tokenizer</span> RecursiveSI/flint <span class="se">\</span>
  <span class="nt">--enable-auto-tool-choice</span> <span class="nt">--tool-call-parser</span> glm47 <span class="se">\</span>
  <span class="nt">--reasoning-parser</span> glm47 <span class="nt">--exclude-tools-when-tool-choice-none</span>

<span class="c"># BF16 checkpoint</span>
docker run <span class="nt">--gpus</span> all <span class="nt">--ipc</span><span class="o">=</span>host <span class="nt">-p</span> 8000:8000 <span class="se">\</span>
  <span class="nt">-v</span> ~/.cache/huggingface:/root/.cache/huggingface <span class="se">\</span>
  vllm/vllm-openai:flint <span class="se">\</span>
  RecursiveSI/flint <span class="se">\</span>
  <span class="nt">--enable-auto-tool-choice</span> <span class="nt">--tool-call-parser</span> glm47 <span class="se">\</span>
  <span class="nt">--reasoning-parser</span> glm47 <span class="nt">--exclude-tools-when-tool-choice-none</span>
</code></pre></div></div>

<p>Flint support is being merged into vLLM (<a href="https://github.com/vllm-project/vllm/pull/62938">#62938</a>). With a vLLM build that includes it, serve the same way:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># NVFP4 checkpoint (GGUF): config and tokenizer come from the BF16 repo</span>
vllm serve RecursiveSI/flint-nvfp4-gguf <span class="se">\</span>
  <span class="nt">--hf-config-path</span> RecursiveSI/flint <span class="nt">--tokenizer</span> RecursiveSI/flint <span class="se">\</span>
  <span class="nt">--enable-auto-tool-choice</span> <span class="nt">--tool-call-parser</span> glm47 <span class="se">\</span>
  <span class="nt">--reasoning-parser</span> glm47 <span class="nt">--exclude-tools-when-tool-choice-none</span>

<span class="c"># BF16 checkpoint</span>
vllm serve RecursiveSI/flint <span class="se">\</span>
  <span class="nt">--enable-auto-tool-choice</span> <span class="nt">--tool-call-parser</span> glm47 <span class="se">\</span>
  <span class="nt">--reasoning-parser</span> glm47 <span class="nt">--exclude-tools-when-tool-choice-none</span>
</code></pre></div></div>

<h2 id="model-architecture">Model architecture</h2>

<p>Flint is a 49-layer pre-norm MoE with hidden size 2048. What sets it apart is how little of it looks at the whole context.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/flint-arch.html" title="Flint architecture: layer stack and the two sublayers" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 1000px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 1: Flint’s layer stack and its two sublayers. Gold marks what differs from a standard pre-norm MoE. <a href="/assets/interactive_pages/flint-arch.html">Open it full-screen</a>.</em></p>

<ul>
  <li><strong>Mostly local attention.</strong> 35 layers attend to a 513-token sliding window with RoPE; the other 14 attend to the full context with no positional encoding. Only those 14 keep KV for the whole sequence, so the cache costs 28 KiB per token.</li>
  <li><strong>Learned attention sinks</strong>, GQA with 32 query and 4 KV heads, and per-head Q/K RMSNorm.</li>
  <li><strong>256 experts, sigmoid top-6, plus a shared expert.</strong> Layers 0 and 1 use a dense MLP instead.</li>
</ul>

<p>The NVFP4 checkpoint is a GGUF file whose blocks are NVIDIA’s NVFP4 format in a different byte order. vLLM repacks it losslessly at load time and runs it weight-only (W4A16), with BF16 activations and KV cache, as Recursive’s reference implementation does. Every Flint kernel follows the reference’s rounding points, and accuracy matches it on GSM8K, GPQA-Diamond, long-context MRCR and a tool-calling suite.</p>

<h2 id="optimizations">Optimizations</h2>

<p>Our first implementation, built from vLLM’s stock layers, was slow at small batch sizes: a decode step ran 1,096 kernels, many of them tuned for much larger batches. We replaced them with Flint-specific kernels one change at a time, checking each against the reference.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/flint-opt-chart.html" title="Flint forward latency after each change" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 760px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 2: Model-forward latency on one GB200 after each change, for batch-1 decode at 100K context and an 8,192-token prefill. Toggle the checkpoint, or show the table for every shape. <a href="/assets/interactive_pages/flint-opt-chart.html">Open it full-screen</a>.</em></p>

<ul>
  <li><strong>Fused Q/K norm, RoPE and KV-cache write</strong> (−8%): one kernel instead of three.</li>
  <li><strong>Small-batch MoE kernels</strong> (−27%): router and expert GEMVs that read only the selected experts’ weights. Also the largest prefill gain.</li>
  <li><strong>Small-batch dense GEMV</strong> (−25%) on the same packed NVFP4 weights as the large-batch kernel.</li>
  <li><strong>Norm and SiLU kernels</strong> (−10%) that follow the reference’s rounding.</li>
  <li><strong>Decode attention</strong> (−5%) with sinks and sliding windows, in CuTe DSL.</li>
  <li><strong>Low-latency decode path</strong> (−14%), shown below.</li>
</ul>

<p>For up to 8 requests, the low-latency path runs each MoE layer as seven kernels: Q/K norm, RoPE, routing and the expert combine are fused into the neighboring GEMV kernels. Each kernel is launched with programmatic dependent launch, so it loads its weights while the previous one is still running.</p>

<iframe class="vllm-embed" src="/assets/interactive_pages/flint-decode-path.html" title="Flint low-latency decode path: seven kernels per MoE layer" loading="lazy" scrolling="no" style="display: block; width: 100%; height: 520px; border: 0; overflow: hidden;"></iframe>

<p><em>Figure 3: The seven kernels of one MoE layer on the low-latency decode path.</em></p>

<p>In total, NVFP4 decode went from 4.81 to 1.78 ms (2.7×), BF16 decode from 3.53 to 2.34 ms (1.5×), and an 8K-token prefill from 207 to 145 ms (1.4×). A forward now runs 346 kernels instead of 1,096. Served end to end, batch-1 decode at 100K context takes 2.06 ms per token (about 485 tokens/s), which is the forward plus the LM head and sampling.</p>

<h2 id="usage-notes">Usage notes</h2>

<ul>
  <li>Flint emits GLM-4.7-style tool calls and thinking blocks, hence the <code class="language-plaintext highlighter-rouge">glm47</code> parsers. <code class="language-plaintext highlighter-rouge">--exclude-tools-when-tool-choice-none</code> drops tool definitions from the prompt when <code class="language-plaintext highlighter-rouge">tool_choice</code> is <code class="language-plaintext highlighter-rouge">"none"</code>, matching the reference.</li>
  <li>The default sampling settings are temperature 1.0, top-p 0.95 and top-k 20. Reasoning counts toward <code class="language-plaintext highlighter-rouge">max_tokens</code>, so allow at least 32K for hard problems.</li>
  <li>The Flint kernels target a single Blackwell GPU (TP=1, BF16 KV cache); other configurations fall back to vLLM’s standard layers.</li>
</ul>

<script>
(function () {
  // Resize embedded interactive figures to their content height (they post it when framed).
  window.addEventListener('message', function (event) {
    var d = event.data;
    if (!d || d.type !== 'vllm-embed-resize' || typeof d.height !== 'number') return;
    var frames = document.querySelectorAll('iframe.vllm-embed');
    for (var i = 0; i < frames.length; i++) {
      if (frames[i].contentWindow === event.source) {
        frames[i].style.height = Math.ceil(d.height) + 'px';
      }
    }
  });
})();
</script>]]></content><author><name>Inferact and Recursive</name></author><category term="flint" /><category term="performance" /><category term="kernels" /><summary type="html"><![CDATA[]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://vllm-project.github.io/assets/figures/2026-10-21-flint/hero.png" /><media:content medium="image" url="https://vllm-project.github.io/assets/figures/2026-10-21-flint/hero.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Introducing vLLM TorchTPU</title><link href="https://vllm-project.github.io/2026/10/20/vllm-torchtpu.html" rel="alternate" type="text/html" title="Introducing vLLM TorchTPU" /><published>2026-10-20T00:00:00+00:00</published><updated>2026-10-20T00:00:00+00:00</updated><id>https://vllm-project.github.io/2026/10/20/vllm-torchtpu</id><content type="html" xml:base="https://vllm-project.github.io/2026/10/20/vllm-torchtpu.html"><![CDATA[<p align="center">
<picture>
<img src="/assets/figures/2026-10-20-vllm-torchtpu/vllm-torchtpu.png" width="100%" />
</picture><br />
</p>

<p>Today we’re releasing <a href="https://github.com/vllm-project/vllm-torchtpu">vLLM TorchTPU</a> (<code class="language-plaintext highlighter-rouge">vllm-torchtpu</code>), a new backend for running vLLM on Google Cloud TPUs. It’s built on Google’s <a href="https://developers.googleblog.com/torchtpu-running-pytorch-natively-on-tpus-at-google-scale/">TorchTPU</a> stack and runs the model definitions that already live in vLLM, so most models that work in vLLM today can be served on TPU without changes to the model code.</p>

<p>This work comes out of the <a href="https://inferact.ai/news/google-tpu-partnership">engineering partnership between Inferact and Google</a> we announced last month. Our goals for the project are to:</p>

<ol>
  <li>Make it easy to bring new models to TPU by reusing vLLM’s existing model code.</li>
  <li>Push TPU inference performance in open source, with Pallas kernels for attention, Mixture-of-Experts, and quantized matmul.</li>
  <li>Keep the vLLM experience the same: the same CLI, OpenAI-compatible server, scheduler, and KV cache manager you use on other hardware.</li>
</ol>

<h3 id="how-it-works">How It Works</h3>

<p><code class="language-plaintext highlighter-rouge">vllm-torchtpu</code> is an out-of-tree vLLM platform plugin. Once installed, vLLM picks it up automatically through the <code class="language-plaintext highlighter-rouge">vllm.platform_plugins</code> entry point.</p>

<p>Models run through vLLM’s standard model runner and are compiled with <code class="language-plaintext highlighter-rouge">torch.compile(backend="tpu")</code>, which lowers to XLA. Each TPU device gets its own worker process, the same way vLLM runs on GPUs, and communication between devices goes through <code class="language-plaintext highlighter-rouge">torch.distributed</code>. This means the scheduler, workers, KV cache manager, and API server are all unmodified upstream vLLM. The TPU-specific work sits underneath them, mostly in a set of JAX/Pallas kernels that are registered as custom ops and called from inside the compiled graph.</p>

<h4 id="getting-started">Getting Started</h4>

<ol>
  <li>
    <p>Install</p>

    <div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code> pip <span class="nb">install </span>vllm-torchtpu
</code></pre></div>    </div>

    <p>This requires Python 3.12 on a Cloud TPU VM, and installs a matching vLLM, <code class="language-plaintext highlighter-rouge">torch</code>, <code class="language-plaintext highlighter-rouge">torch_tpu</code>, and <code class="language-plaintext highlighter-rouge">libtpu</code> alongside the plugin. The <a href="https://github.com/vllm-project/vllm-torchtpu/blob/main/docs/getting_started/installation.md">installation guide</a> also covers <code class="language-plaintext highlighter-rouge">uv</code>, source builds, and <a href="https://github.com/vllm-project/vllm-torchtpu/blob/main/docs/getting_started/docker.md">Docker</a>.</p>
  </li>
  <li>
    <p>Serve a model</p>

    <div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code> vllm serve Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8 <span class="se">\</span>
   <span class="nt">--tensor-parallel-size</span> 8 <span class="se">\</span>
   <span class="nt">--enable-expert-parallel</span> <span class="se">\</span>
   <span class="nt">--kv-cache-dtype</span> fp8 <span class="se">\</span>
   <span class="nt">--max-model-len</span> 16384 <span class="se">\</span>
   <span class="nt">--async-scheduling</span>
</code></pre></div>    </div>

    <p>The first startup compiles TPU graphs for the configured shapes, which can take a few minutes. Set <code class="language-plaintext highlighter-rouge">VLLM_XLA_CACHE_PATH</code> to reuse compiled artifacts across restarts (see <a href="https://github.com/vllm-project/vllm-torchtpu/blob/main/docs/user_guide/compilation_cache.md">Compilation &amp; Warmup Cache</a>).</p>
  </li>
</ol>

<p>Speculative decoding, prefix caching, multi-LoRA, structured outputs, and multimodal inputs are all enabled with the usual vLLM flags. See the <a href="https://github.com/vllm-project/vllm-torchtpu/blob/main/docs/getting_started/quickstart.md">quickstart</a> for more examples, including offline batch inference, multimodal models, and multi-LoRA.</p>

<h3 id="kernels">Kernels</h3>

<p><code class="language-plaintext highlighter-rouge">vllm-torchtpu</code> uses custom Pallas kernels for complex operations that benefit from hand-tuning on TPU. Some examples:</p>

<ul>
  <li>Ragged Paged Attention v3 for MHA/GQA models</li>
  <li>Dense and sparse Multi-head Latent Attention (MLA) for DeepSeek, Kimi, and GLM</li>
  <li>Gated DeltaNet and Kimi Delta Attention for hybrid linear-attention models</li>
  <li>Fused Mixture-of-Experts with expert parallelism</li>
  <li>FP8, INT8, MXFP4, and NVFP4 quantized matmuls</li>
</ul>

<h3 id="scaling-out">Scaling Out</h3>

<p>We’ve focused heavily on the workloads that put the most pressure on serving systems today, especially multi-turn agentic and multimodal traffic, where contexts keep growing and tool outputs can be long.</p>

<h4 id="parallelism">Parallelism</h4>

<p>All six of vLLM’s parallelism dimensions are supported, on both single-host and multi-host TPU slices, and they can be combined:</p>

<table>
  <thead>
    <tr>
      <th style="text-align: left">Dimension</th>
      <th style="text-align: left">Flag</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: left">Tensor Parallelism (TP)</td>
      <td style="text-align: left"><code class="language-plaintext highlighter-rouge">--tensor-parallel-size</code></td>
    </tr>
    <tr>
      <td style="text-align: left">Data Parallelism (DP)</td>
      <td style="text-align: left"><code class="language-plaintext highlighter-rouge">--data-parallel-size</code></td>
    </tr>
    <tr>
      <td style="text-align: left">Pipeline Parallelism (PP)</td>
      <td style="text-align: left"><code class="language-plaintext highlighter-rouge">--pipeline-parallel-size</code></td>
    </tr>
    <tr>
      <td style="text-align: left">Expert Parallelism (EP)</td>
      <td style="text-align: left"><code class="language-plaintext highlighter-rouge">--enable-expert-parallel</code></td>
    </tr>
    <tr>
      <td style="text-align: left">Prefill Context Parallelism (PCP)</td>
      <td style="text-align: left"><code class="language-plaintext highlighter-rouge">--prefill-context-parallel-size</code></td>
    </tr>
    <tr>
      <td style="text-align: left">Decode Context Parallelism (DCP)</td>
      <td style="text-align: left"><code class="language-plaintext highlighter-rouge">--decode-context-parallel-size</code></td>
    </tr>
  </tbody>
</table>

<p>For large MoE models, we usually get the best throughput from data-parallel attention with expert parallelism (for example, <code class="language-plaintext highlighter-rouge">DP=8, TP=1</code> with EP on a single v7x host). This keeps attention local to each device and spreads the experts across the whole slice. For long contexts, PCP and DCP split prefill and the KV cache across devices. The <a href="https://github.com/vllm-project/vllm-torchtpu/blob/main/docs/user_guide/parallelism.md">parallelism guide</a> has more detail and example configurations.</p>

<h4 id="kv-cache-offloading-and-disaggregated-serving">KV Cache Offloading and Disaggregated Serving</h4>

<p><code class="language-plaintext highlighter-rouge">vllm-torchtpu</code> uses <a href="https://github.com/google/tpu-sync">TPU Sync</a>, an open-source C++ library that can read TPU device buffers directly, outside the Python runtime. Through vLLM’s KV connector interface, this gives us:</p>

<ul>
  <li>Zero-copy KV cache offloading to host DRAM, so the prefix cache for long multi-turn sessions isn’t limited by HBM.</li>
  <li>Disaggregated prefill/decode serving across TPU hosts with low KV transfer overhead. Prefill and decode can use different layouts, for example prefill on <code class="language-plaintext highlighter-rouge">PCP=4, TP=2</code> and decode on <code class="language-plaintext highlighter-rouge">DP=8, TP=1</code>, and the KV cache is resharded during transfer.</li>
</ul>

<p>See the <a href="https://github.com/vllm-project/vllm-torchtpu/blob/main/docs/user_guide/disaggregated_serving.md">disaggregated serving guide</a> to set it up.</p>

<h4 id="speculative-decoding-and-prefix-caching">Speculative Decoding and Prefix Caching</h4>

<p>Speculative decoding supports MTP, EAGLE-3, DFlash, DSpark, n-gram, and suffix decoding (<a href="https://github.com/vllm-project/vllm-torchtpu/blob/main/docs/user_guide/speculative_decoding.md">guide</a>). Automatic prefix caching also works for hybrid models like Qwen3.5 and Kimi K3, where linear-attention state is cached along with the KV cache.</p>

<h3 id="models-features-and-whats-next">Models, Features, and What’s Next</h3>

<p><code class="language-plaintext highlighter-rouge">vllm-torchtpu</code> can serve most models supported by vLLM, with TPU-specific kernel, quantization, and parallelism work for the Qwen, DeepSeek, Kimi, GLM, Llama, GPT-OSS, and Gemma families. TPU v7x (Ironwood) is the recommended hardware and is tested in CI on every pull request; v6e, v5e, and v5p are experimental.</p>

<p>The <a href="https://github.com/vllm-project/vllm-torchtpu/blob/main/docs/user_guide/supported_models.md">Supported Models &amp; Features</a> page has the full list of validated checkpoints and features, with how to enable each one. The <a href="https://github.com/vllm-project/vllm-torchtpu/tree/main/support_matrices/nightly">nightly support matrices</a> track TPU v7x correctness and benchmark results from CI.</p>

<h4 id="whats-next">What’s Next?</h4>

<p>We want new open models from the major families (Qwen, DeepSeek, GLM, Kimi, Gemma, GPT-OSS) to run on TPU on the day they’re released. Some of what’s coming, from the <a href="https://github.com/vllm-project/vllm-torchtpu/blob/main/docs/roadmap.md">public roadmap</a>:</p>

<ul>
  <li>An automated CI pipeline that onboards, benchmarks, and publishes support matrices for new open-weight models within 24 hours of release.</li>
  <li>Prefix-, cache-, and session-aware routing, and llm-d TPU memory-tier routing.</li>
  <li>PyTorch interfaces for <a href="https://github.com/openxla/tokamax">Tokamax</a> kernels, shared with other projects in the TorchTPU ecosystem.</li>
  <li>Diffusion model serving through <code class="language-plaintext highlighter-rouge">vllm-omni</code>.</li>
</ul>

<p><a href="https://github.com/vllm-project/vllm-torchtpu/blob/main/CONTRIBUTING.md">Contributions are welcome!</a></p>

<h3 id="tpu-capacity-for-contributors">TPU Capacity for Contributors</h3>

<p>We’re also opening a Community Contribution TPU Capacity Pool. If you’re building on <code class="language-plaintext highlighter-rouge">vllm-torchtpu</code>, you can apply for free TPU time, and core vLLM maintainers at Inferact will help with design and PR reviews.</p>

<p><a href="https://docs.google.com/forms/d/1Jm0uUXvcwYJRrvRojfS2RzMLjaqlt2a7lNyALFZs-nQ/viewform">Apply for contributor TPU access here.</a></p>

<h3 id="try-it-out">Try It Out</h3>

<ul>
  <li><a href="https://github.com/vllm-project/vllm-torchtpu/blob/main/docs/getting_started/quickstart.md">Quickstart</a></li>
  <li><a href="https://github.com/vllm-project/vllm-torchtpu/blob/main/docs/getting_started/tpu_setup.md">Cloud TPU Setup</a></li>
  <li><a href="https://github.com/vllm-project/vllm-torchtpu/blob/main/docs/deployment/v7x_recipes.md">TPU v7x (Ironwood) Serving Recipes</a></li>
  <li><a href="https://github.com/AI-Hypercomputer/tpu-recipes/tree/main/inference/ironwood/vLLM/vLLM-TorchTPU">vLLM TorchTPU Recipes on Ironwood</a></li>
  <li><a href="https://github.com/vllm-project/vllm-torchtpu/blob/main/docs/deployment/kubernetes.md">Kubernetes Deployment</a></li>
  <li><a href="https://github.com/vllm-project/vllm-torchtpu/blob/main/CONTRIBUTING.md">Contributing Guide</a></li>
</ul>

<p>If you have questions or want to get involved, find us in <code class="language-plaintext highlighter-rouge">#sig-tpu</code> on the <a href="https://slack.vllm.ai">vLLM Developer Slack</a>.</p>]]></content><author><name>Inferact and Google Teams</name></author><category term="hardware" /><summary type="html"><![CDATA[]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://vllm-project.github.io/assets/figures/2026-10-20-vllm-torchtpu/vllm-torchtpu.png" /><media:content medium="image" url="https://vllm-project.github.io/assets/figures/2026-10-20-vllm-torchtpu/vllm-torchtpu.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Achieving near-zero-downtime scaling in Elastic Expert Parallelism</title><link href="https://vllm-project.github.io/2026/10/19/elastic-ep-near-zero-downtime.html" rel="alternate" type="text/html" title="Achieving near-zero-downtime scaling in Elastic Expert Parallelism" /><published>2026-10-19T00:00:00+00:00</published><updated>2026-10-19T00:00:00+00:00</updated><id>https://vllm-project.github.io/2026/10/19/elastic-ep-near-zero-downtime</id><content type="html" xml:base="https://vllm-project.github.io/2026/10/19/elastic-ep-near-zero-downtime.html"><![CDATA[<p>Traditionally, changing the number of GPUs in a vLLM service required adding or removing entire model replicas or restarting the engine with a different GPU count. As models grow larger, each replica needs more GPUs, so scaling by replica adds or removes GPUs in increasingly large increments. Restarting vLLM to scale DeepSeek V4 Pro from 16 to 20 GB200 GPUs stopped serving for <strong>197 seconds</strong> (see the <a href="#performance-on-deepseek-v4-pro">performance section</a> for details), leaving those expensive GPUs allocated without generating tokens.</p>

<p>In our <a href="https://vllm.ai/blog/2026-05-14-elastic-expert-parallelism">first Elastic EP post</a>, we showed how vLLM could add or remove GPUs from a running DEP deployment (data-parallel attention with expert-parallel MoE) without restarting it. While we avoided a restart, serving still stopped throughout reconfiguration as we initialized new workers, prepared the expanded communication groups, loaded model weights, and repeated kernel warmup and CUDA graph capture. In our DeepSeek V4 Pro benchmark, this pause lasted <strong>100 seconds when scaling from 16 to 20 GPUs</strong> and <strong>56 seconds when scaling back to 16 GPUs</strong> (full details in the <a href="#performance-on-deepseek-v4-pro">performance section</a>).</p>

<p>In this post, we describe how asynchronous preparation and <a href="https://github.com/ai-dynamo/nixl/blob/main/examples/device/ep/README.md">NIXL EP</a> enabled Elastic EP reconfiguration with near-zero downtime. In the same benchmark, we reduced downtime to <strong>0.82 seconds when scaling from 16 to 20 GPUs</strong> and <strong>1.96 seconds when scaling back to 16 GPUs</strong>, allowing us to scale up and down with almost no impact on serving performance.</p>

<h2 id="overlapping-topology-preparation-with-serving">Overlapping topology preparation with serving</h2>

<p>We reorganized vLLM’s reconfiguration flow into two phases: background preparation and a short commit. Existing workers use separate background threads to prepare and warm up target communication, transfer model weights, and synchronize execution-related information (such as autotuning results) with joining workers, while continuing to serve requests with their current communication groups and CUDA graphs. In parallel, joining workers initialize, receive model weights, and prepare their communication and GPU execution. During the commit phase, vLLM briefly pauses its schedulers, activates the prepared topology, and resumes serving. These changes were introduced in <a href="https://github.com/vllm-project/vllm/pull/47288">asynchronous preparation</a> and <a href="https://github.com/vllm-project/vllm/pull/51885">prepare/commit optimizations</a>.</p>

<p>Preparation covers four main tasks:</p>

<ol>
  <li><strong>Initialize joining workers.</strong> Start their processes and allocate storage for the model and execution.</li>
  <li><strong>Prepare communication.</strong> Set up the target communication groups and expand the EP communicator.</li>
  <li><strong>Transfer model weights.</strong> Transfer the required weights from existing workers to joining workers over NVLink or RDMA.</li>
  <li><strong>Prepare execution.</strong> Complete the required compilation, kernel warmup, tuning setup, and CUDA graph construction on joining workers.</li>
</ol>

<p>After the commit phase, asynchronous Expert Parallel Load Balancing (EPLB) allows new workers to begin handling attention while existing workers handle expert computation. EPLB then redistributes experts across the expanded group in the background.</p>

<p>The main challenge is preparing communication and GPU execution without involving or disrupting the workers that are serving requests.</p>

<h2 id="expand-ep-communication-in-place">Expand EP communication in place</h2>

<p>Before NIXL EP, the EP communication backends available in vLLM used fixed membership: each instance was created for a specific set of ranks. Adding or removing ranks requires a new instance. Even when that instance can be created in the background, two problems remain.</p>

<p>First, the old and new instances need separate communication buffers and other resources, including memory registrations, IPC handles, and RDMA Queue Pairs (QPs). Keeping both instances alive increases communication memory usage and requires repeating setup rather than reusing existing resources.</p>

<p>Second, switching EP communicators changes the buffers and communication state used by the EP communication kernels. This invalidates previously captured CUDA graphs, which must be recaptured before serving can resume. That requires repeating warmup and graph construction for many batch shapes across all retained workers. In our DeepSeek V4 Pro benchmark, even with asynchronous preparation, performing warmup and graph recapture during the commit phase resulted in serving pauses of <strong>58 seconds during scale-up</strong> and <strong>44 seconds during scale-down</strong>.</p>

<p>To solve these problems, we designed <strong>NIXL EP</strong>, an EP communication library tailor-made for Elastic EP. It adds or removes ranks in place, reusing the same NIXL agent, buffers, and connections. New peers can be connected while existing workers continue serving, and only joining peers need new connections and registrations. NIXL EP also keeps captured EP dispatch and combine entries valid across reconfiguration, allowing retained workers to reuse their existing CUDA graphs.</p>

<p>During preparation, vLLM’s background thread connects joining peers without activating them. The commit phase then activates the prepared peers without replacing the communicator.</p>

<p><img src="/assets/figures/2026-10-05-elastic-ep-near-zero-downtime/figure02-nixl-ep-lifecycle.png" alt="The same NIXL EP communicator progresses from the current active group to connected inactive joining peers, then activates the target group at commit." /></p>

<p><em>Figure 1. Connecting and activating new EP peers. Green ranks are active; gray ranks are connected but masked. During the commit phase, new peers are activated without replacing the agent or buffers.</em></p>

<p>vLLM still creates new DP coordination groups and EPLB groups for the target topology, <strong>but their communication runs outside the captured model forward pass</strong>, so switching to them does not invalidate CUDA graphs.</p>

<h2 id="preserve-cuda-graphs-on-existing-workers">Preserve CUDA graphs on existing workers</h2>

<p>A CUDA graph records GPU operations so that vLLM can replay a forward pass without repeatedly launching each operation from the CPU. A captured kernel node includes its launch configuration and argument values, including pointers to input and output tensors. Memory contents can change between replays, but the recorded pointers must remain valid. These requirements are part of the <a href="https://docs.pytorch.org/docs/2.14/notes/cuda.html#cuda-graphs">CUDA graph execution contract</a>.</p>

<p>vLLM <a href="https://docs.vllm.ai/en/latest/design/cuda_graphs/">captures separate graphs for different batch shapes and execution modes</a> and runs warmup forward passes before each capture.</p>

<p>Preserving captured CUDA graphs requires more than keeping the communicator object alive. NIXL EP also keeps kernel launch configurations, graph-visible communication arguments, and input and output tensor addresses stable across reconfiguration. Its kernels read active group membership from device state that can be updated in place.</p>

<p>We also changed vLLM to keep the captured arguments, launch configurations, and input and output tensor addresses of the surrounding compute kernels stable across reconfiguration:</p>

<ul>
  <li>We reuse retained workers’ fused-MoE execution objects instead of rebuilding them for a different active EP size.</li>
  <li>We keep the addresses and layouts of graph-visible workspaces and dispatch outputs stable across reconfiguration so that captured expert kernels can continue using them. Dispatch outputs also serve as inputs to expert computation. If their addresses or layouts changed with EP size, captured expert kernels would still use the old pointers and offsets.</li>
  <li>We preserve the backing storage of expert-routing tensors and update mappings in place. This allows EPLB to change the mapping contents without moving the tensors used by captured kernels.</li>
</ul>

<p>Together, these changes allow retained workers to <a href="https://github.com/vllm-project/vllm/pull/54985">reuse their existing CUDA graphs</a> after both scale-up and scale-down.</p>

<h2 id="prepare-joining-workers-independently">Prepare joining workers independently</h2>

<p>Existing workers have graphs to preserve. Joining workers have none.</p>

<p>Joining workers normally prepare by running model forward passes with EP dispatch and combine, as well as exchanging batch information with other workers. These steps require other workers to participate, but existing workers are already serving real requests on the current topology.</p>

<p>NIXL EP lets each joining worker temporarily mask every remote EP peer during warmup and graph preparation. Only that worker’s local rank is active for EP communication. We also modified vLLM so that these preparation passes do not wait for DP batch information from other workers. This lets joining workers run their dummy batches and capture CUDA graphs without requiring existing workers to participate.</p>

<p><img src="/assets/figures/2026-10-05-elastic-ep-near-zero-downtime/figure04-independent-capture.png" alt="Existing workers serve with their current peers active and joining peers masked. Each joining worker keeps only itself active for local warmup and graph capture, masking all remote peers, including other joining workers." /></p>

<p><em>Figure 2. Green ranks are active for EP communication; gray ranks are masked. Existing workers serve together while each joining worker masks all remote EP peers for preparation.</em></p>

<p>After capture, NIXL EP can reactivate peers without invalidating the graphs. Joining workers reuse their locally captured graphs when they begin serving as part of the expanded group.</p>

<h2 id="performance-on-deepseek-v4-pro">Performance on DeepSeek V4 Pro</h2>

<p>All experiments in this section used <a href="https://huggingface.co/deepseek-ai/DeepSeek-V4-Pro/tree/b5968e9190ef611bbf34a7229255be88a0e937c1">DeepSeek V4 Pro</a> on GB200 GPUs, with TP=1 and DP/EP sizes of 16 and 20. Model weights were pre-downloaded in safetensors format on shared Lustre storage and loaded using the default <code class="language-plaintext highlighter-rouge">--load-format auto</code>. Measurements used warm kernel-compilation caches (Triton, TileLang, and FlashInfer).</p>

<h3 id="scale-up-and-scale-down-timings">Scale-up and scale-down timings</h3>

<p>The table shows which stages run while serving is paused and which run in the background while existing workers continue serving.</p>

<table>
  <thead>
    <tr>
      <th>Stage</th>
      <th>A: Blocking</th>
      <th>B: Async preparation</th>
      <th>C: Async preparation + graph reuse</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Initialize joining workers</td>
      <td>Serving paused</td>
      <td>Background</td>
      <td>Background</td>
    </tr>
    <tr>
      <td>Prepare target communication</td>
      <td>Serving paused</td>
      <td>Background</td>
      <td>Background</td>
    </tr>
    <tr>
      <td>Transfer model weights</td>
      <td>Serving paused</td>
      <td>Background</td>
      <td>Background</td>
    </tr>
    <tr>
      <td>Warmup and graph capture on joining workers</td>
      <td>Serving paused</td>
      <td>Serving paused</td>
      <td>Background</td>
    </tr>
    <tr>
      <td>Warmup and graph capture on existing workers</td>
      <td>Serving paused</td>
      <td>Serving paused</td>
      <td>Not needed (existing graphs stay valid)</td>
    </tr>
    <tr>
      <td>Activate the target topology</td>
      <td>Serving paused</td>
      <td>Serving paused</td>
      <td>Serving paused</td>
    </tr>
  </tbody>
</table>

<p>Configuration C is supported <strong>only by NIXL EP</strong>.</p>

<ul>
  <li><strong>Downtime:</strong> the observed serving interruption, when in-flight requests stop progressing and new requests are not admitted.</li>
  <li><strong>Total time:</strong> the duration of the full scaling operation, including preparation.</li>
</ul>

<p>The two durations are measured separately.</p>

<table>
  <thead>
    <tr>
      <th>Metric</th>
      <th style="text-align: right">A: Blocking</th>
      <th style="text-align: right">B: Async preparation</th>
      <th style="text-align: right">C: Async preparation + graph reuse</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>16 to 20 GPUs: downtime</td>
      <td style="text-align: right">99.62 s</td>
      <td style="text-align: right">58.04 s</td>
      <td style="text-align: right"><strong>0.82 s</strong></td>
    </tr>
    <tr>
      <td>20 to 16 GPUs: downtime</td>
      <td style="text-align: right">56.25 s</td>
      <td style="text-align: right">44.07 s</td>
      <td style="text-align: right"><strong>1.96 s</strong></td>
    </tr>
    <tr>
      <td>16 to 20 GPUs: total time</td>
      <td style="text-align: right">99.72 s</td>
      <td style="text-align: right">97.27 s</td>
      <td style="text-align: right">92.34 s</td>
    </tr>
    <tr>
      <td>20 to 16 GPUs: total time</td>
      <td style="text-align: right">56.21 s</td>
      <td style="text-align: right">51.46 s</td>
      <td style="text-align: right">9.32 s</td>
    </tr>
  </tbody>
</table>

<p>All configurations passed numerical correctness checks, including checks on every joining worker.</p>

<h3 id="maintaining-the-slo-while-adding-gpus">Maintaining the SLO while adding GPUs</h3>

<p>We served DeepSeek V4 Pro on 16 GPUs, then gradually increased the incoming request rate from about 8 to 16 requests per second. We replayed the same 11,391-request scenario against three deployments: one stayed at 16 GPUs, one restarted with 20 GPUs, and one scaled to 20 GPUs using Elastic EP with NIXL EP. The service-level objective (SLO) was a rolling p95 time to first token below 5 seconds.</p>

<p><img src="/assets/figures/2026-10-05-elastic-ep-near-zero-downtime/figure00-pytorch-slo.png" alt="Elastic EP stays below the SLO throughout the scenario. During preparation, its serving performance matches the static 16-GPU deployment. After scaling, it matches the recovered 20-GPU deployment's performance." /></p>

<p><em>Figure 3. End-to-end serving under rising request load. Curves show 30-second rolling p95 outcomes, with failed requests assigned a 30-second penalty rather than a measured TTFT.</em></p>

<ul>
  <li>Elastic EP completed all 11,391 requests and stayed below the SLO throughout the scenario.</li>
  <li>During preparation, Elastic EP matched the static 16-GPU deployment’s serving performance, with no visible degradation from background preparation.</li>
  <li>After scaling, Elastic EP matched the recovered 20-GPU deployment’s performance, with no visible post-scale degradation.</li>
</ul>

<h2 id="try-elastic-ep">Try Elastic EP</h2>

<p>Background preparation, CUDA graph reuse, and independent graph capture on joining workers are all available today in the latest <a href="https://pypi.org/project/vllm/">vLLM</a> and <a href="https://pypi.org/project/nixl/">NIXL</a> releases. Install them with pip and start using Elastic EP.</p>

<p>For a complete usage example, see the <a href="https://github.com/vllm-project/vllm/blob/v0.30.0/tests/distributed/test_elastic_ep.py#L224"><code class="language-plaintext highlighter-rouge">cuda_graphs_heavy_nixl_ep</code> case in vLLM’s Elastic EP test</a>. The example includes the server configuration and scaling API calls. It scales from two GPUs to four and back while sending requests, checking serving during preparation and model accuracy around each resize.</p>

<h2 id="what-comes-next">What comes next</h2>

<h3 id="restore-warm-workers-with-dynamo-snapshot">Restore warm workers with Dynamo Snapshot</h3>

<p>We have effectively solved the long serving interruption. The next challenge is getting new capacity ready sooner. We plan to integrate <a href="https://developer.nvidia.com/blog/nvidia-dynamo-snapshot-fast-startup-for-inference-workloads-on-kubernetes/">Dynamo Snapshot</a> so joining workers can restore initialized process and CUDA state instead of repeating compilation, kernel warmup, graph construction, and other startup work.</p>

<p>Communication for the target topology must be prepared separately because it is not restored from the snapshot. Restoring large model weights from checkpoint storage can dominate restore time, so we plan to keep Elastic EP’s GPU-to-GPU weight transfer from existing workers instead.</p>

<h3 id="achieve-state-of-the-art-ep-communication-with-nixl-ep">Achieve state-of-the-art EP communication with NIXL EP</h3>

<p>We aim for state-of-the-art dispatch and combine performance with NIXL EP while maintaining full support for Elastic EP and fault tolerance. An upcoming NIXL EP performance update is the next step toward that goal (see the <a href="https://github.com/ai-dynamo/nixl/issues/2383">NIXL EP roadmap RFC</a>).</p>

<h3 id="connect-elastic-ep-to-dynamo-and-llm-d-orchestration">Connect Elastic EP to Dynamo and llm-d orchestration</h3>

<p>With the engine-level capability in place, the next step is to use Elastic EP from orchestrator autoscalers. Work toward this integration is already underway across the vLLM, Dynamo, and llm-d communities.</p>

<p>These efforts include <a href="https://github.com/vllm-project/vllm/pull/43202">vLLM’s external-load-balancer work</a> and <a href="https://github.com/ai-dynamo/dynamo/issues/13121">Dynamo’s Elastic EP proposal</a>.</p>

<p>If you run inference at scale, we encourage you to try Elastic EP and share your workloads and operational requirements. If you build inference infrastructure, we welcome contributions to vLLM Elastic EP and NIXL EP. Let’s get Elastic EP running in production.</p>

<h2 id="acknowledgements">Acknowledgements</h2>

<ul>
  <li>Tyler Michael Smith and Sage Moore from Red Hat for their invaluable feedback and thorough reviews throughout this work.</li>
  <li>Linoy Geva (NVIDIA) for her work on serving performance during preparation.</li>
  <li>The entire NIXL team for their efforts on NIXL EP.</li>
  <li>Tzu-Ling Kan, Julien Mancuso, and the entire Dynamo team for their efforts to support Elastic EP in Dynamo.</li>
</ul>]]></content><author><name>Itay Alroy (NVIDIA)</name></author><category term="large-scale-serving" /><category term="elastic-ep" /><category term="expert-parallelism" /><category term="moe" /><category term="nixl" /><category term="cuda-graphs" /><summary type="html"><![CDATA[Traditionally, changing the number of GPUs in a vLLM service required adding or removing entire model replicas or restarting the engine with a different GPU count. As models grow larger, each replica needs more GPUs, so scaling by replica adds or removes GPUs in increasingly large increments. Restarting vLLM to scale DeepSeek V4 Pro from 16 to 20 GB200 GPUs stopped serving for 197 seconds (see the performance section for details), leaving those expensive GPUs allocated without generating tokens.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://vllm-project.github.io/assets/figures/2026-10-05-elastic-ep-near-zero-downtime/figure00-pytorch-slo.png" /><media:content medium="image" url="https://vllm-project.github.io/assets/figures/2026-10-05-elastic-ep-near-zero-downtime/figure00-pytorch-slo.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry></feed>