<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Qwen3 on lo0 — Tech Blog</title><link>https://blog.lo0.es/en/tags/qwen3/</link><description>Recent content in Qwen3 on lo0 — Tech Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Fri, 12 Jun 2026 05:30:00 +0200</lastBuildDate><atom:link href="https://blog.lo0.es/en/tags/qwen3/index.xml" rel="self" type="application/rss+xml"/><item><title>Serving reasoning models: the invisible scratchpad that decides your latency and your bill</title><link>https://blog.lo0.es/en/posts/serving-reasoning-models-invisible-scratchpad-latency-bill/</link><pubDate>Fri, 12 Jun 2026 05:30:00 +0200</pubDate><guid>https://blog.lo0.es/en/posts/serving-reasoning-models-invisible-scratchpad-latency-bill/</guid><description>&lt;h2 id="tldr">TL;DR&lt;/h2>
&lt;p>A reasoning model generates, before the answer you see, a &lt;strong>thinking block&lt;/strong>, hundreds or thousands of tokens enclosed between &lt;code>&amp;lt;think&amp;gt;&lt;/code> and &lt;code>&amp;lt;/think&amp;gt;&lt;/code>, that the user does not read but that &lt;strong>consumes the same compute, the same VRAM and the same bill&lt;/strong> as any other token. Serving them in production is not &amp;ldquo;serving a bigger model&amp;rdquo;: it is serving a model whose cost per request is &lt;strong>variable and, by default, uncontrolled&lt;/strong>. Three levers change the equation: choosing well between &lt;strong>think / non-think mode&lt;/strong> (the hybrid models of 2026 allow it within the same weights), setting a &lt;strong>reasoning budget&lt;/strong> (&lt;code>thinking_token_budget&lt;/code> in vLLM, s1-style &lt;em>budget forcing&lt;/em>) and &lt;strong>measuring the impact on the KV cache&lt;/strong> (a 30k-token reasoning chain can eat ~9 GB of KV in FP16). Managed well, you gain accuracy where it matters; managed badly, you pay up to &lt;strong>113× more energy&lt;/strong> for an answer that did not need that much thinking.&lt;/p>
&lt;hr>
&lt;h2 id="the-analogy">The analogy&lt;/h2>
&lt;p>Picture a candidate sitting a competitive exam. Before writing the good answer on the official sheet, they fill three sheets of scratch paper: they try approaches, correct themselves, discard. Those scratch sheets are not handed in, the board only reads the final answer, but the candidate has spent ink, time and half an hour of the exam on them.&lt;/p>
&lt;p>A reasoning model does exactly that. The &lt;code>&amp;lt;think&amp;gt;…&amp;lt;/think&amp;gt;&lt;/code> block is the scratch paper: it reasons out loud, contradicts itself, backtracks, and finally emits the &amp;ldquo;clean&amp;rdquo; answer. The production problem is that &lt;strong>you pay for the scratch paper too&lt;/strong>: every reasoning token takes a slot in the batch, grows the KV cache and adds to the bill just like an output token. And, like any nervous candidate, the model tends to &lt;strong>overthink&lt;/strong>: it writes five sheets when one would have done.&lt;/p>
&lt;p>The operational question in this post is not &amp;ldquo;does it reason well?&amp;rdquo;, but &amp;ldquo;how much scratch paper do I let it write, and when do I take the pen away?&amp;rdquo;.&lt;/p>
&lt;hr>
&lt;h2 id="what-changes-when-the-model-thinks">What changes when the model &amp;ldquo;thinks&amp;rdquo;&lt;/h2>
&lt;p>In a normal model, a request is: prompt → output tokens. In a reasoning model the sequence has two stretches:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Reasoning block&lt;/strong> (&lt;code>&amp;lt;think&amp;gt; … &amp;lt;/think&amp;gt;&lt;/code>): the chain of thought (CoT). Long, variable, normally hidden from the end user.&lt;/li>
&lt;li>&lt;strong>Final answer&lt;/strong>: what the user sees.&lt;/li>
&lt;/ol>
&lt;p>vLLM models this explicitly. When started with a &lt;em>reasoning parser&lt;/em>, the output carries a &lt;code>reasoning_content&lt;/code> field separate from &lt;code>content&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">vllm serve deepseek-ai/DeepSeek-R1-Distill-Qwen-32B &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --reasoning-parser deepseek_r1
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The parser detects the thinking delimiters and separates both stretches in the API response (&lt;a href="https://docs.vllm.ai/en/stable/features/reasoning_outputs/">vLLM · Reasoning Outputs&lt;/a>). This matters for serving for one practical reason: if your gateway or your UI does not separate &lt;code>reasoning_content&lt;/code> from &lt;code>content&lt;/code>, you will end up showing the scratch paper, or, worse, recording it in logs and traces without meaning to.&lt;/p>
&lt;div class="diagram" style="max-width:780px;margin:1rem auto;">
&lt;svg viewBox="0 0 780 210" role="img" aria-label="Anatomy of a request to a reasoning model: prompt, thinking block with budget, final answer" xmlns="http://www.w3.org/2000/svg">
&lt;defs>&lt;marker id="rzm" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto">&lt;path d="M0,0 L10,5 L0,10 z" fill="currentColor"/>&lt;/marker>&lt;/defs>
&lt;style>.bx{fill:none;stroke:currentColor;stroke-width:1.3}.dsh{fill:none;stroke:currentColor;stroke-width:1.3;stroke-dasharray:5 3}.tl{font:600 12px sans-serif;fill:currentColor}.ts{font:11px sans-serif;fill:currentColor}.ar{fill:none;stroke:currentColor;stroke-width:1.3;marker-end:url(#rzm)}&lt;/style>
&lt;text x="20" y="28" class="tl">Request&lt;/text>
&lt;rect class="bx" x="20" y="38" width="120" height="50" rx="6"/>
&lt;text x="32" y="60" class="ts">prompt + system&lt;/text>
&lt;text x="32" y="76" class="ts">(visible · billable)&lt;/text>
&lt;path class="ar" d="M140,63 L180,63"/>
&lt;text x="190" y="28" class="tl">Reasoning block &amp;lt;think&amp;gt; … &amp;lt;/think&amp;gt;&lt;/text>
&lt;rect class="dsh" x="190" y="38" width="360" height="80" rx="6"/>
&lt;text x="204" y="60" class="ts">hundreds–thousands of tokens HIDDEN from the user&lt;/text>
&lt;text x="204" y="78" class="ts">grow the KV cache · add to the bill as output&lt;/text>
&lt;text x="204" y="96" class="ts">cap: thinking_token_budget → forces &amp;lt;/think&amp;gt;&lt;/text>
&lt;path class="ar" d="M550,78 L590,78"/>
&lt;text x="600" y="28" class="tl">Answer&lt;/text>
&lt;rect class="bx" x="600" y="38" width="150" height="80" rx="6"/>
&lt;text x="612" y="64" class="ts">final content&lt;/text>
&lt;text x="612" y="82" class="ts">(all the user&lt;/text>
&lt;text x="612" y="98" class="ts">ever sees)&lt;/text>
&lt;text x="20" y="150" class="tl">Cost per request = prompt + reasoning + answer&lt;/text>
&lt;text x="20" y="172" class="ts">Reasoning is invisible in the UI but NOT on the GPU or in the bill. It is the variable that unbalances your cost per request.&lt;/text>
&lt;text x="20" y="192" class="ts">Operational rule: separate reasoning_content from content at the gateway, and set a thinking budget per route.&lt;/text>
&lt;/svg>
&lt;/div>
&lt;hr>
&lt;h2 id="the-2026-landscape-from-the-model-that-always-reasons-to-the-switchable-hybrid">The 2026 landscape: from the model that &amp;ldquo;always reasons&amp;rdquo; to the switchable hybrid&lt;/h2>
&lt;p>The first generation (o1, DeepSeek-R1, QwQ-32B) were models that always reasoned. In 2026 the dominant pattern is the hybrid: a single set of weights that switches between &lt;em>think&lt;/em> and &lt;em>non-think&lt;/em>.&lt;/p>
&lt;ul>
&lt;li>DeepSeek-V3.1 introduced a hybrid reasoning architecture in a single model: &lt;code>DeepSeek-V3.1-Think&lt;/code> for complex problems and a faster direct mode for the trivial, switchable by the user (&lt;a href="https://www.infoq.com/news/2025/09/deepseek-v31-hybrid/">InfoQ&lt;/a>). Important for serving: reasoning is off by default and is turned on with &lt;code>thinking=True&lt;/code> in &lt;code>chat_template_kwargs&lt;/code>.&lt;/li>
&lt;li>Qwen3 brings &lt;em>Hybrid Thinking Modes&lt;/em> and an explicit Thinking Budget to bound the reasoning compute; in its series thinking is on by default (like QwQ-32B).&lt;/li>
&lt;li>gpt-oss shows a different reasoning structure from the R1/Qwen family, which in practice means that &lt;strong>the parser and the delimiters are not universal&lt;/strong>: each family has its own.&lt;/li>
&lt;/ul>
&lt;p>The architectural consequence is clear: in 2026 you no longer decide &amp;ldquo;a model that reasons&amp;rdquo; vs &amp;ldquo;one that does not&amp;rdquo;, but &lt;strong>when you let the same model reason&lt;/strong>. That turns reasoning into a &lt;em>routing&lt;/em> and budgeting decision, not a model-catalogue one. It connects directly with &lt;a href="https://blog.lo0.es/en/posts/llm-inference-router-l7-switchboard/">the L7 inference router&lt;/a>: the &amp;ldquo;cheap&amp;rdquo; route turns thinking off; the &amp;ldquo;expensive&amp;rdquo; one turns it on with a cap.&lt;/p>
&lt;hr>
&lt;h2 id="the-economics-why-the-scratch-paper-drives-up-the-bill">The economics: why the scratch paper drives up the bill&lt;/h2>
&lt;p>Here is the heart of the problem. Reasoning tokens are invisible to the user but real in compute and in billing. Providers charge them as output tokens; API providers bill those &lt;em>reasoning tokens&lt;/em> at the output price, not for free (&lt;a href="https://medium.com/@Elongated_musk/test-time-compute-quietly-changed-the-economics-of-inference-9d0b8d77641c">Test-Time Compute Quietly Changed the Economics of Inference&lt;/a>). On-premise there is no external invoice, but there is a cost: they occupy batch slots, KV VRAM and watts.&lt;/p>
&lt;p>The billable cost (or the equivalent cost in GPU·hours) of a request is:&lt;/p>
$$\text{compute tokens} = \text{prompt} + \underbrace{\text{reasoning tokens}}_{\text{hidden, variable}} + \text{visible answer}$$
&lt;p>The middle term is the one that runs out of control. On hard tasks the reasoning/visible-answer ratio can be enormous, and empirical analysis has measured up to 113× the energy cost against standard inference on certain coding tasks (&lt;a href="https://towardsdatascience.com/inference-scaling-test-time-compute-why-reasoning-models-raise-your-compute-bill/">Towards Data Science · Inference Scaling&lt;/a>).&lt;/p>
&lt;p>And it does not always buy accuracy. The overthinking phenomenon is documented: more thinking does not guarantee a better answer, and beyond a certain point it makes things worse. There is work showing that &lt;strong>shorter chains are up to 34.5 % more accurate&lt;/strong> than the longest one sampled for the same question (&lt;a href="https://arxiv.org/pdf/2505.17813">Don&amp;rsquo;t Overthink it&lt;/a>), plus studies on the &amp;ldquo;mirage&amp;rdquo; of test-time scaling (&lt;a href="https://arxiv.org/pdf/2506.04210">Mirage of Test-Time Scaling&lt;/a>) and on when &lt;em>more thinking hurts&lt;/em> (&lt;a href="https://arxiv.org/html/2604.10739v1">When More Thinking Hurts&lt;/a>). The first large-scale study of test-time scaling, more than &lt;strong>30 billion tokens&lt;/strong> generated with 8 open-source LLMs from 7B to 235B across 4 reasoning datasets, systematises where it scales and where it does not (&lt;a href="https://arxiv.org/abs/2512.02008">The Art of Scaling Test-Time Compute&lt;/a>).&lt;/p>
&lt;p>The operational reading: &lt;strong>reasoning is a cost you have to budget for, not a &amp;ldquo;more quality&amp;rdquo; switch you leave on full all the time.&lt;/strong>&lt;/p>
&lt;hr>
&lt;h2 id="controlling-the-thinking-budget">Controlling the thinking budget&lt;/h2>
&lt;p>Three mechanisms, from coarsest to finest.&lt;/p>
&lt;h3 id="1-switching-think--non-think">1. Switching think / non-think&lt;/h3>
&lt;p>The cheapest thing is not to reason when it is not needed. On hybrid models, turn thinking off for classification, extraction, formatting, trivial answers:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-python" data-lang="python">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># DeepSeek-V3.1: reasoning OFF by default; turned on explicitly&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">chat_template_kwargs&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="p">{&lt;/span>&lt;span class="s2">&amp;#34;thinking&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="kc">True&lt;/span>&lt;span class="p">}&lt;/span> &lt;span class="c1"># only on the &amp;#34;hard&amp;#34; route&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This is 80 % of the saving for 20 % of the effort: route by difficulty and reserve thinking for what actually pays for it.&lt;/p>
&lt;h3 id="2-setting-a-cap-thinking_token_budget">2. Setting a cap: &lt;code>thinking_token_budget&lt;/code>&lt;/h3>
&lt;p>vLLM ships a &lt;em>sampling parameter&lt;/em> &lt;code>thinking_token_budget&lt;/code> that counts reasoning tokens and, on reaching the limit, forces the block to close (&lt;code>reasoning_end_str&lt;/code>, typically &lt;code>&amp;lt;/think&amp;gt;&lt;/code>), making the model answer straight away. If it is not specified, there is no limit other than &lt;code>max_tokens&lt;/code> (&lt;a href="https://github.com/vllm-project/vllm/pull/37112">PR #37112&lt;/a>, &lt;a href="https://shuyo.wordpress.com/2026/03/26/adding-reasoning-budget-to-vllm-reasoning-token-limit/">implementation note&lt;/a>). Underneath, a &lt;code>ReasoningBudgetLogitsProcessor&lt;/code> injects something like &lt;em>&amp;ldquo;Let me stop thinking and answer now.&lt;code>&amp;lt;/think&amp;gt;&lt;/code>&amp;rdquo;&lt;/em> when the cap is reached.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Define the delimiters of the reasoning block&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">vllm serve Qwen/Qwen3-32B &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --reasoning-parser qwen3 &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --reasoning-config &lt;span class="s1">&amp;#39;{&amp;#34;reasoning_start_str&amp;#34;:&amp;#34;&amp;lt;think&amp;gt;&amp;#34;,&amp;#34;reasoning_end_str&amp;#34;:&amp;#34;&amp;lt;/think&amp;gt;&amp;#34;}&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-json" data-lang="json">&lt;span class="line">&lt;span class="cl">&lt;span class="c1">// per request: cut the scratch paper off at 1024 tokens
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="nt">&amp;#34;messages&amp;#34;&lt;/span>&lt;span class="p">:[&lt;/span>&lt;span class="err">...&lt;/span>&lt;span class="p">],&lt;/span> &lt;span class="nt">&amp;#34;thinking_token_budget&amp;#34;&lt;/span>&lt;span class="p">:&lt;/span> &lt;span class="mi">1024&lt;/span>&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="3-budget-forcing-state-of-the-art">3. Budget forcing (state of the art)&lt;/h3>
&lt;p>The technique that popularised fine-grained control is &lt;strong>budget forcing&lt;/strong>, from the s1 paper: to spend &lt;em>less&lt;/em>, thinking is terminated by forcing the end delimiter; to spend &lt;em>more&lt;/em>, the end is suppressed and the word &amp;ldquo;Wait&amp;rdquo; is appended, which pushes the model to review and often correct its own reasoning. With this, &lt;code>s1-32B&lt;/code> (a Qwen2.5-32B-Instruct fine-tuned on just 1,000 examples) &lt;strong>beat o1-preview by as much as 27 %&lt;/strong> on AIME24/MATH (&lt;a href="https://arxiv.org/abs/2501.19393">s1: Simple Test-Time Scaling&lt;/a>). The serving lesson: the budget is not only a cost cap, it is a &lt;strong>bidirectional quality lever&lt;/strong>.&lt;/p>
$$\text{accuracy} \approx f(\text{reasoning tokens}) \quad\text{with a maximum, not monotonic}$$
&lt;p>The curve rises, saturates and on many tasks falls. Your job is to operate it near the knee, not at the extreme.&lt;/p>
&lt;hr>
&lt;h2 id="the-impact-almost-nobody-measures-the-kv-cache">The impact almost nobody measures: the KV cache&lt;/h2>
&lt;p>This is where reasoning really bites serving. Every token of scratch paper &lt;strong>is one more token in the KV cache&lt;/strong>. A long reasoning chain inflates the working memory just like a long input context.&lt;/p>
&lt;p>The KV size grows linearly with the sequence (reasoning included):&lt;/p>
$$\text{KV bytes} = 2 \times L \times h_{kv} \times d_{head} \times s \times b$$
&lt;p>where \(L\) is layers, \(h_{kv}\) KV heads (few, with GQA), \(d_{head}\) the per-head dimension, \(s\) the sequence length and \(b\) the bytes per element. The term reasoning blows up is \(s\): a &amp;ldquo;normal&amp;rdquo; 500-token answer and one with 8,000 tokens of thinking do not take up the same space, not by a long way.&lt;/p>
&lt;p>The real numbers are frightening: for a distilled reasoning model with standard attention such as &lt;code>DeepSeek-R1-Distill-Llama-70B&lt;/code>, &lt;strong>a single 30,000-token reasoning chain consumes ~9 GB of KV in FP16&lt;/strong>, which quantising the KV to FP8 reduces to ~4.5 GB, one of the highest-impact optimisations for chain-of-thought workloads (&lt;a href="https://www.spheron.network/blog/kv-cache-optimization-guide/">Spheron · KV Cache Optimization&lt;/a>). Multiply that by concurrency and you understand why a cluster that served 200 simultaneous requests of a &amp;ldquo;normal&amp;rdquo; model drops to 40 with the same model reasoning.&lt;/p>
&lt;p>Two state-of-the-art nuances worth knowing:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Prefix caching is not free here.&lt;/strong> The empirical study of reasoning-model serving finds that &lt;em>prefix caching&lt;/em> clearly improves speed on models of 14B or more, but hurts on 7B models (cache management costs more than it saves) (&lt;a href="https://arxiv.org/pdf/2510.18672">Reasoning Language Model Inference Serving Unveiled&lt;/a>). And since the bulk of the reasoning cost sits in the decode (generating tokens one by one), prefix caching, which only speeds up the prefill, barely touches the expensive phase. It connects with &lt;a href="https://blog.lo0.es/en/posts/prefix-cache-hit-rate-engineering/">prefix cache: engineering the hit rate&lt;/a>.&lt;/li>
&lt;li>&lt;strong>Reasoning-specific KV compression.&lt;/strong> Techniques such as R-KV have appeared, compressing the KV by exploiting the redundancy typical of chains of thought (the model repeats itself and rambles), recovering memory without touching quality (&lt;a href="https://arxiv.org/pdf/2505.24133">R-KV&lt;/a>).&lt;/li>
&lt;/ul>
&lt;p>The most profitable and available lever today is still &lt;strong>KV in FP8&lt;/strong> (see &lt;a href="https://blog.lo0.es/en/posts/fp8-end-to-end-enable-measure-quality-decide/">FP8 end to end&lt;/a>) combined with a reasoning budget that avoids 30k-token tails in the first place.&lt;/p>
&lt;hr>
&lt;h2 id="reasoning--structured-output-order-matters">Reasoning + structured output: order matters&lt;/h2>
&lt;p>If you serve &lt;em>structured output&lt;/em> (JSON with a schema) and reasoning at the same time, there is a subtle trap: the grammar must not be applied during the thinking block. The model needs free text to reason; forcing the schema inside the &lt;code>&amp;lt;think&amp;gt;&lt;/code> breaks the reasoning. vLLM solves it by having the structured-output engine (xgrammar) use the reasoner&amp;rsquo;s &lt;code>end_token_id&lt;/code> to skip the constraint while the block lasts and apply it only to the final answer (&lt;a href="https://docs.vllm.ai/en/stable/features/reasoning_outputs/">vLLM · Reasoning Outputs&lt;/a>). If you build this by hand on another engine, remember: &lt;strong>first let it think, then impose the form&lt;/strong>. It links with &lt;a href="https://blog.lo0.es/en/posts/structured-output-bitmask-outlines-xgrammar-llguidance/">structured output&lt;/a>.&lt;/p>
&lt;hr>
&lt;h2 id="reference-architecture">Reference architecture&lt;/h2>
&lt;p>On the blog&amp;rsquo;s example cluster, a node of 4×H100 SXM (80 GB, NVLink), a sensible topology for serving reasoning without wrecking the SLO:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>A cheap difficulty classifier&lt;/strong> up front (a small model or rules) that picks the route. Most of the traffic does not need to think.&lt;/li>
&lt;li>&lt;strong>Fast route (non-think):&lt;/strong> the same hybrid model with reasoning off. Low TTFT, predictable cost.&lt;/li>
&lt;li>&lt;strong>Reasoning route (think):&lt;/strong> reasoning on &lt;strong>with &lt;code>thinking_token_budget&lt;/code> by default&lt;/strong> (say 1–2k tokens) and the option to raise it per request for the genuinely hard cases.&lt;/li>
&lt;li>KV in FP8 in the engine on the reasoning route, plus per-request reasoning-length metrics exported to your observability (&lt;a href="https://blog.lo0.es/en/posts/instrumenting-vllm-otel-measuring-optimisations/">instrumenting vLLM with OTel&lt;/a>).&lt;/li>
&lt;/ol>
&lt;p>To prototype this routing outside the cluster, an RTX 5090 (Blackwell, 32 GB) serves a 7–14B reasoning model and lets you validate parsers, budgets and the &lt;code>reasoning_content&lt;/code>/&lt;code>content&lt;/code> separation before touching the H100s. Do not expect to serve a 32B in &lt;em>think&lt;/em> mode at high concurrency on a consumer card: the reasoning KV eats the 32 GB in no time.&lt;/p>
&lt;p>Sizing starts, as always, from an SLO; the difference is that now the &amp;ldquo;answer size&amp;rdquo; in your &lt;a href="https://blog.lo0.es/en/posts/capacity-planning-on-premise-llm-inference/">capacity planning&lt;/a> has to count the scratch paper, not just the visible answer.&lt;/p>
&lt;hr>
&lt;h2 id="operational-pitfalls-and-honest-scepticism">Operational pitfalls (and honest scepticism)&lt;/h2>
&lt;ol>
&lt;li>&lt;strong>Leaking &lt;code>reasoning_content&lt;/code>.&lt;/strong> If the gateway does not separate it, you end up showing or logging the scratch paper, which may contain wrong attempts, sensitive data or language you do not want in your UI. Always separate it at L7.&lt;/li>
&lt;li>&lt;strong>Serving reasoning &amp;ldquo;just in case&amp;rdquo;.&lt;/strong> Overthinking is real and sometimes lowers accuracy. Do not turn &lt;em>think&lt;/em> on by default: turn it on per route, with a budget.&lt;/li>
&lt;li>&lt;strong>Forgetting the KV.&lt;/strong> The most common mistake: sizing concurrency from the length of the visible answer. The KV is dictated by the total sequence, reasoning included. Measure p50/p95 &lt;code>reasoning tokens&lt;/code> per endpoint.&lt;/li>
&lt;li>&lt;strong>Prefix caching as a silver bullet.&lt;/strong> On small models it can make things worse, and in any case it does not touch the decode, which is where the reasoning cost goes.&lt;/li>
&lt;li>&lt;strong>Assuming universal delimiters.&lt;/strong> R1, Qwen3 and gpt-oss do not share a reasoning structure. Use the right &lt;code>--reasoning-parser&lt;/code> per family and test &lt;em>streaming&lt;/em> (the parser has to separate correctly token by token).&lt;/li>
&lt;li>&lt;strong>Believing more compute = more intelligence.&lt;/strong> The state of the art (s1, short-m@k, &amp;ldquo;When More Thinking Hurts&amp;rdquo;) points the other way in many cases: there is a knee, and operating beyond it is burning watts. Test-time compute is a tool with diminishing, and sometimes negative, returns, not a linear lever.&lt;/li>
&lt;/ol>
&lt;p>A note of caution for June 2026: the field of reasoning control (budget forcing, reasoning-specific KV compression, thinking &lt;em>early-exit&lt;/em>) moves fast and almost all of it is very recent. The specific figures, the 113×, the 34.5 %, the 9 GB, depend on model, task and configuration; take them as an &lt;strong>order of magnitude for design&lt;/strong>, not as constants. Measure on your own workload before committing to SLOs.&lt;/p>
&lt;hr>
&lt;h2 id="closing">Closing&lt;/h2>
&lt;p>Serving a reasoning model means serving a model whose cost per request &lt;strong>you decide with the thinking budget&lt;/strong>, not the catalogue. The chain goes: route by difficulty → turn &lt;em>think&lt;/em> off where it adds nothing → set &lt;code>thinking_token_budget&lt;/code> by default on the route that thinks → quantise the KV to FP8 → measure reasoning length as a first-class metric. Do that, and reasoning becomes a capability you pay for only when it buys accuracy. Do not, and your cluster will serve a fifth of the users while the model fills sheets of scratch paper nobody is going to read.&lt;/p>
&lt;h2 id="sources">Sources&lt;/h2>
&lt;ul>
&lt;li>vLLM · Reasoning Outputs — &lt;a href="https://docs.vllm.ai/en/stable/features/reasoning_outputs/">https://docs.vllm.ai/en/stable/features/reasoning_outputs/&lt;/a>&lt;/li>
&lt;li>vLLM PR #37112 · reasoning_budget — &lt;a href="https://github.com/vllm-project/vllm/pull/37112">https://github.com/vllm-project/vllm/pull/37112&lt;/a>&lt;/li>
&lt;li>Adding Reasoning Budget to vLLM — &lt;a href="https://shuyo.wordpress.com/2026/03/26/adding-reasoning-budget-to-vllm-reasoning-token-limit/">https://shuyo.wordpress.com/2026/03/26/adding-reasoning-budget-to-vllm-reasoning-token-limit/&lt;/a>&lt;/li>
&lt;li>s1: Simple Test-Time Scaling — &lt;a href="https://arxiv.org/abs/2501.19393">https://arxiv.org/abs/2501.19393&lt;/a>&lt;/li>
&lt;li>The Art of Scaling Test-Time Compute — &lt;a href="https://arxiv.org/abs/2512.02008">https://arxiv.org/abs/2512.02008&lt;/a>&lt;/li>
&lt;li>Don&amp;rsquo;t Overthink it (short-m@k) — &lt;a href="https://arxiv.org/pdf/2505.17813">https://arxiv.org/pdf/2505.17813&lt;/a>&lt;/li>
&lt;li>Mirage of Test-Time Scaling — &lt;a href="https://arxiv.org/pdf/2506.04210">https://arxiv.org/pdf/2506.04210&lt;/a>&lt;/li>
&lt;li>When More Thinking Hurts — &lt;a href="https://arxiv.org/html/2604.10739v1">https://arxiv.org/html/2604.10739v1&lt;/a>&lt;/li>
&lt;li>Reasoning Language Model Inference Serving Unveiled — &lt;a href="https://arxiv.org/pdf/2510.18672">https://arxiv.org/pdf/2510.18672&lt;/a>&lt;/li>
&lt;li>R-KV: Redundancy-aware KV Cache Compression — &lt;a href="https://arxiv.org/pdf/2505.24133">https://arxiv.org/pdf/2505.24133&lt;/a>&lt;/li>
&lt;li>Spheron · KV Cache Optimization Guide (2026) — &lt;a href="https://www.spheron.network/blog/kv-cache-optimization-guide/">https://www.spheron.network/blog/kv-cache-optimization-guide/&lt;/a>&lt;/li>
&lt;li>Test-Time Compute Quietly Changed the Economics of Inference — &lt;a href="https://medium.com/@Elongated_musk/test-time-compute-quietly-changed-the-economics-of-inference-9d0b8d77641c">https://medium.com/@Elongated_musk/test-time-compute-quietly-changed-the-economics-of-inference-9d0b8d77641c&lt;/a>&lt;/li>
&lt;li>Inference Scaling (Test-Time Compute) · Towards Data Science — &lt;a href="https://towardsdatascience.com/inference-scaling-test-time-compute-why-reasoning-models-raise-your-compute-bill/">https://towardsdatascience.com/inference-scaling-test-time-compute-why-reasoning-models-raise-your-compute-bill/&lt;/a>&lt;/li>
&lt;li>DeepSeek-V3.1 Hybrid Reasoning · InfoQ — &lt;a href="https://www.infoq.com/news/2025/09/deepseek-v31-hybrid/">https://www.infoq.com/news/2025/09/deepseek-v31-hybrid/&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>MoE inference: the call centre with 256 specialists and 8 taking each call — fundamentals, expert parallel and the economics of DeepSeek-V3</title><link>https://blog.lo0.es/en/posts/moe-inference-fundamentals-expert-parallel-deepseek-economics/</link><pubDate>Sat, 30 May 2026 08:00:00 +0200</pubDate><guid>https://blog.lo0.es/en/posts/moe-inference-fundamentals-expert-parallel-deepseek-economics/</guid><description>&lt;blockquote>
&lt;p>This post goes into an architectural decision in the Deploy stage of the &lt;a href="https://blog.lo0.es/en/posts/six-stage-llmops-pipeline-architecture-and-deep-dive/">six-stage LLMOps pipeline&lt;/a>. It complements those on &lt;a href="https://blog.lo0.es/en/posts/kv-cache-working-memory-llm-inference/">KV cache&lt;/a> (which does not change with MoE), &lt;a href="https://blog.lo0.es/en/posts/flashattention-librarian-io-awareness-async-blackwell-asymmetry/">FlashAttention&lt;/a> (still the attention kernel, also dense in every current MoE), &lt;a href="https://blog.lo0.es/en/posts/quantization-llm-inference-fp8-int4-gguf/">Quantization&lt;/a> (FP8/NVFP4 over expert weights is what lets DeepSeek-V3 fit into a modest cluster) and &lt;a href="https://blog.lo0.es/en/posts/speculative-decoding-fundamentals-maths-state-of-play/">Speculative decoding&lt;/a> (MTP in DeepSeek-V3 is native speculative decoding).&lt;/p>
&lt;/blockquote>
&lt;h2 id="you-are-here-deploy">You are here: DEPLOY&lt;/h2>
&lt;div class="diagram" style="max-width:780px;margin:1rem auto;">
&lt;svg viewBox="0 0 780 90" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="you are here: Deploy">
&lt;style>.box{stroke:#444;stroke-width:1.4;rx:6}.active{fill:#7ad88f;stroke-width:3}.idle{fill:#f4f4f4}.lbl{font:600 12px sans-serif;fill:#222}.arr{stroke:#666;stroke-width:1.4;fill:none;marker-end:url(#moem)}.cyc{stroke:#888;stroke-width:1.2;fill:none;stroke-dasharray:4 2;marker-end:url(#moem)}&lt;/style>
&lt;defs>&lt;marker id="moem" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto">&lt;path d="M0,0 L10,5 L0,10 z" fill="#666"/>&lt;/marker>&lt;/defs>
&lt;text x="390" y="20" text-anchor="middle" class="lbl">You are here: DEPLOY · compute sparsity without memory sparsity&lt;/text>
&lt;rect x="30" y="35" width="110" height="35" class="box idle"/>&lt;text x="85" y="58" text-anchor="middle" class="lbl">1 · Data&lt;/text>
&lt;rect x="155" y="35" width="110" height="35" class="box idle"/>&lt;text x="210" y="58" text-anchor="middle" class="lbl">2 · Tune&lt;/text>
&lt;rect x="280" y="35" width="110" height="35" class="box idle"/>&lt;text x="335" y="58" text-anchor="middle" class="lbl">3 · Eval&lt;/text>
&lt;rect x="405" y="35" width="110" height="35" class="box active"/>&lt;text x="460" y="58" text-anchor="middle" class="lbl">4 · Deploy&lt;/text>
&lt;rect x="530" y="35" width="110" height="35" class="box idle"/>&lt;text x="585" y="58" text-anchor="middle" class="lbl">5 · Observe&lt;/text>
&lt;rect x="655" y="35" width="110" height="35" class="box idle"/>&lt;text x="710" y="58" text-anchor="middle" class="lbl">6 · Retrain&lt;/text>
&lt;path class="arr" d="M140,52 L155,52"/>&lt;path class="arr" d="M265,52 L280,52"/>&lt;path class="arr" d="M390,52 L405,52"/>&lt;path class="arr" d="M515,52 L530,52"/>&lt;path class="arr" d="M640,52 L655,52"/>
&lt;path class="cyc" d="M710,72 L710,82 L85,82 L85,72"/>
&lt;/svg>
&lt;/div>
&lt;h2 id="tldr">TL;DR&lt;/h2>
&lt;p>A Mixture of Experts (MoE) replaces the transformer&amp;rsquo;s dense FFN layer with &lt;strong>N parallel experts plus a router&lt;/strong> that picks the &lt;code>k&lt;/code> experts relevant to each token. The operational consequence is that the model&amp;rsquo;s &lt;strong>total&lt;/strong> parameters (how many were trained and how many must be loaded into VRAM) decouple from the &lt;strong>active parameters per token&lt;/strong> (how many take part in each forward). DeepSeek-V3 has 671 B total but only 37 B active per token; Qwen3-235B-A22B is 235 B total and 22 B active; Mixtral 8x22B is 141 B and 39 B; Llama 4 Maverick is 400 B and 17 B. Compute per token falls to &lt;code>2·N_active&lt;/code> FLOPs, half that of a dense Llama-3-70B in DeepSeek-V3&amp;rsquo;s case, but memory stays proportional to &lt;code>N_total&lt;/code>: MoE &lt;em>sparsity&lt;/em> is &lt;strong>compute sparsity, not memory sparsity&lt;/strong>. Since each expert sees only &lt;code>batch·k/N&lt;/code> tokens per step, the memory-bound regime persists at a much higher batch than in dense. Serving DeepSeek-V3 671 B FP8 at low latency requires &lt;strong>expert parallel&lt;/strong> (EP) at scale, EP=32 in prefill and EP=144 in decode in DeepSeek&amp;rsquo;s production deployment, where the dominant bottleneck stops being HBM and becomes the &lt;strong>all-to-all of dispatch and combine&lt;/strong> between GPUs. As of May 2026, the pieces that make this viable are &lt;strong>DeepEP&lt;/strong> (FP8-native all-to-all CUDA kernels, intra-node NVLink plus inter-node RDMA), &lt;strong>EPLB&lt;/strong> (balancing by replicating &lt;em>hot&lt;/em> experts) and &lt;strong>Wide-EP&lt;/strong> on NVL72 (72 GPUs in one coherent NVLink domain). This post takes apart the mechanism, the maths (FLOPs/token, all-to-all bytes), the updated table of MoE models as of May 2026, the parallelisms (TP / EP / DP+EP / Wide-EP), the operational pitfalls (memory wall, cold experts, imbalance) and the real reproducible numbers on H100, B200 and GB200 NVL72.&lt;/p>
&lt;h2 id="the-analogy-the-call-centre-with-256-specialists">The analogy: the call centre with 256 specialists&lt;/h2>
&lt;p>A serious call centre handling complex technical queries runs on &lt;strong>specialists&lt;/strong>, not generalists. You have 256 operators on the payroll, each an expert in their sub-domain: employment law, mortgages, income tax, probate, and so on. But each incoming call only needs the attention of &lt;strong>eight&lt;/strong> specific specialists (top-8 routing): a client&amp;rsquo;s query about tax relief on a mortgage for an inherited second home involves the income tax person, the mortgage person, the capital gains person, and so on. The receptionist (the router) listens to the first second of the call, decides which eight specialists are relevant, conferences them in and combines their answers with weights.&lt;/p>
&lt;p>Three immediate consequences, identical to those of MoE in production:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>You pay 256 salaries&lt;/strong> (every expert is loaded in VRAM) but you only &lt;strong>spend the time of 8&lt;/strong> (only k experts take part in the forward of each token). Your payroll cost scales with &lt;code>N_total&lt;/code>; your cost per minute of call scales with &lt;code>N_active&lt;/code>.&lt;/li>
&lt;li>&lt;strong>If all the operators fit in one office&lt;/strong> (a single GPU), fine: paper just moves between desks. But &lt;strong>if they do not fit&lt;/strong>, you have to open branches: the conference call between operators in different branches goes over a telephone line between buildings (intra-node NVLink, inter-node InfiniBand) and that line &lt;strong>becomes the dominant bottleneck&lt;/strong> once dozens of branches are coordinating.&lt;/li>
&lt;li>&lt;strong>If one week every client asks about income tax&lt;/strong>, the three income tax operators saturate while the probate ones sit idle. You need &lt;strong>a system that replicates the hot operators&lt;/strong> across several branches to absorb peaks, and that &lt;strong>pairs hot with cold&lt;/strong> so that no branch goes idle.&lt;/li>
&lt;/ol>
&lt;p>The receptionist is the &lt;strong>router&lt;/strong>. The branches are the GPUs. The conference call between branches is the &lt;strong>all-to-all&lt;/strong> (dispatch plus combine). The system for replicating hot operators is &lt;strong>EPLB&lt;/strong>. The good telephone line is &lt;strong>DeepEP&lt;/strong>. And when someone designs a building where all 72 branches fit together with very fast internal cabling, that is &lt;strong>NVL72&lt;/strong>.&lt;/p>
&lt;h2 id="the-bare-mechanism">The bare mechanism&lt;/h2>
&lt;p>A classic MoE layer replaces the dense FFN (&lt;code>y = FFN(x) = down(act(up(x) · gate(x)))&lt;/code> in SwiGLU) with:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Router&lt;/strong>: a linear projection &lt;code>g(x) = W_router · x&lt;/code> produces &lt;code>N&lt;/code> scores. A softmax over those scores gives affinity probabilities.&lt;/li>
&lt;li>&lt;strong>Top-k selection&lt;/strong>: the &lt;code>k&lt;/code> experts with the highest score are chosen. Their &lt;code>softmax_topk&lt;/code> weights are normalised to sum to 1.&lt;/li>
&lt;li>&lt;strong>Parallel compute&lt;/strong>: each of the &lt;code>k&lt;/code> selected experts runs its own FFN over &lt;code>x&lt;/code>. The &lt;code>N - k&lt;/code> not selected sit idle for this token.&lt;/li>
&lt;li>&lt;strong>Weighted combination&lt;/strong>: the output is &lt;code>y = Σ_{i ∈ topk} w_i · Expert_i(x)&lt;/code>.&lt;/li>
&lt;/ol>
&lt;p>Variants the market consolidated in 2025-2026:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Shared experts&lt;/strong>: on top of the &lt;code>k&lt;/code> routed ones, there are &lt;code>s&lt;/code> experts that always run (1 or 2). They capture general knowledge every token needs. DeepSeek-V3 uses 1 shared + 8 routed; Mixtral uses 0 shared.&lt;/li>
&lt;li>&lt;strong>Fine-grained experts&lt;/strong>: more small experts instead of a few large ones (DeepSeek: 256 vs Mixtral: 8). This allows better specialisation because the top-k combination covers more sub-domains.&lt;/li>
&lt;li>&lt;strong>Auxiliary-loss-free routing&lt;/strong> (DeepSeek-V3): instead of adding a balancing loss during training, it dynamically adjusts a bias in the routing. It keeps balance without polluting the main loss.&lt;/li>
&lt;/ul>
&lt;p>Attention is still &lt;strong>dense&lt;/strong> in every current MoE model (Mixtral, DeepSeek, Qwen3-MoE, Llama 4, Kimi K2). Only the FFN is replaced. That is why FlashAttention v3/v4 is still used as-is; DeepSeek&amp;rsquo;s MLA is an optimisation orthogonal to MoE.&lt;/p>
&lt;h2 id="the-relevant-moe-models-in-may-2026">The relevant MoE models in May 2026&lt;/h2>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Model&lt;/th>
&lt;th>Date&lt;/th>
&lt;th>Total&lt;/th>
&lt;th>Active&lt;/th>
&lt;th>Experts&lt;/th>
&lt;th>Top-k&lt;/th>
&lt;th>Shared&lt;/th>
&lt;th>Notes&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Mixtral 8x7B&lt;/td>
&lt;td>Dec 2023&lt;/td>
&lt;td>47 B&lt;/td>
&lt;td>13 B&lt;/td>
&lt;td>8&lt;/td>
&lt;td>2&lt;/td>
&lt;td>0&lt;/td>
&lt;td>The one that normalised MoE in open weights&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Mixtral 8x22B&lt;/td>
&lt;td>Apr 2024&lt;/td>
&lt;td>141 B&lt;/td>
&lt;td>39 B&lt;/td>
&lt;td>8&lt;/td>
&lt;td>2&lt;/td>
&lt;td>0&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Grok-1 (open)&lt;/td>
&lt;td>Mar 2024&lt;/td>
&lt;td>314 B&lt;/td>
&lt;td>~86 B&lt;/td>
&lt;td>8&lt;/td>
&lt;td>2&lt;/td>
&lt;td>0&lt;/td>
&lt;td>Weights opened by xAI&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>DeepSeekMoE 16B&lt;/td>
&lt;td>Jan 2024&lt;/td>
&lt;td>16 B&lt;/td>
&lt;td>2.8 B&lt;/td>
&lt;td>64+2&lt;/td>
&lt;td>6&lt;/td>
&lt;td>2&lt;/td>
&lt;td>Introduces fine-grained + shared&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>DeepSeek-V2&lt;/td>
&lt;td>May 2024&lt;/td>
&lt;td>236 B&lt;/td>
&lt;td>21 B&lt;/td>
&lt;td>160+2&lt;/td>
&lt;td>6&lt;/td>
&lt;td>2&lt;/td>
&lt;td>+ MLA&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Snowflake Arctic&lt;/td>
&lt;td>Apr 2024&lt;/td>
&lt;td>480 B&lt;/td>
&lt;td>17 B&lt;/td>
&lt;td>128&lt;/td>
&lt;td>2&lt;/td>
&lt;td>10 B dense residual&lt;/td>
&lt;td>Dense-MoE hybrid&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Hunyuan-Large&lt;/td>
&lt;td>Nov 2024&lt;/td>
&lt;td>389 B&lt;/td>
&lt;td>52 B&lt;/td>
&lt;td>16+1&lt;/td>
&lt;td>1+shared&lt;/td>
&lt;td>1&lt;/td>
&lt;td>Cross-layer KV cache&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>DeepSeek-V3&lt;/strong>&lt;/td>
&lt;td>Dec 2024&lt;/td>
&lt;td>671 B&lt;/td>
&lt;td>37 B&lt;/td>
&lt;td>256+1&lt;/td>
&lt;td>8&lt;/td>
&lt;td>1&lt;/td>
&lt;td>MLA + MTP, aux-loss-free, FP8 training&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Llama 4 Scout&lt;/td>
&lt;td>Apr 2025&lt;/td>
&lt;td>109 B&lt;/td>
&lt;td>17 B&lt;/td>
&lt;td>16&lt;/td>
&lt;td>1+shared&lt;/td>
&lt;td>1&lt;/td>
&lt;td>Designed for 1 H100 node&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Llama 4 Maverick&lt;/td>
&lt;td>Apr 2025&lt;/td>
&lt;td>400 B&lt;/td>
&lt;td>17 B&lt;/td>
&lt;td>128&lt;/td>
&lt;td>1+shared&lt;/td>
&lt;td>1&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Qwen3-235B-A22B&lt;/td>
&lt;td>Apr 2025&lt;/td>
&lt;td>235 B&lt;/td>
&lt;td>22 B&lt;/td>
&lt;td>128&lt;/td>
&lt;td>8&lt;/td>
&lt;td>0&lt;/td>
&lt;td>—&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Kimi K2 (Moonshot)&lt;/td>
&lt;td>2025&lt;/td>
&lt;td>1 T&lt;/td>
&lt;td>32 B&lt;/td>
&lt;td>384&lt;/td>
&lt;td>8&lt;/td>
&lt;td>(MLA)&lt;/td>
&lt;td>Trained with MuonClip&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>DeepSeek-V3.2-Exp&lt;/td>
&lt;td>Sep 2025&lt;/td>
&lt;td>671 B&lt;/td>
&lt;td>37 B&lt;/td>
&lt;td>256+1&lt;/td>
&lt;td>8&lt;/td>
&lt;td>1&lt;/td>
&lt;td>+ DeepSeek Sparse Attention&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Three operational observations:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>The active/total ratio falls with every generation&lt;/strong>: Mixtral 8x7B was 28 %, DeepSeek-V3 is 5.5 %, Llama 4 Maverick is 4.3 %. What the industry discovered is that &lt;strong>sparsity can be very aggressive without losing quality&lt;/strong>, provided &lt;code>N&lt;/code> is large enough and the routing is well learned. Fine specialisation is worth more than per-expert capacity.&lt;/li>
&lt;li>&lt;strong>The flagships of the large providers (OpenAI, Anthropic, Google) are almost certainly MoE&lt;/strong>, but the architectures are not published. The only semi-credible leak (Hotz, Jul 2023) claimed GPT-4 was an 8×~220 B MoE; no official confirmation.&lt;/li>
&lt;li>&lt;strong>DeepSeek-V3 marks the inflection point&lt;/strong>: open weights, frontier-class, MoE with aggressive sparsity and compatible with FP8 quantisation. It is the model that forced the ecosystem (vLLM, SGLang, TensorRT-LLM) to optimise wide-EP in 2025.&lt;/li>
&lt;/ol>
&lt;h2 id="the-maths-that-matters">The maths that matters&lt;/h2>
&lt;p>Three numbers drive the whole architectural decision with MoE.&lt;/p>
&lt;p>&lt;strong>Compute per token.&lt;/strong> A dense transformer spends roughly &lt;code>2N&lt;/code> FLOPs per token in the forward pass (with &lt;code>N&lt;/code> = total parameters). A MoE spends &lt;code>2·N_active&lt;/code> FLOPs per token (the &lt;code>N_total - N_active&lt;/code> experts do not take part). For DeepSeek-V3: 2 × 37 B = &lt;strong>74 GFLOPs/token&lt;/strong>. For dense Llama-3-70B: 2 × 70 B = &lt;strong>140 GFLOPs/token&lt;/strong>. &lt;strong>DeepSeek does half the compute per token&lt;/strong> of Llama-3-70B while offering capacity equivalent to a model almost 10 × larger.&lt;/p>
&lt;p>&lt;strong>Total memory.&lt;/strong> But &lt;strong>all&lt;/strong> the experts must be loaded in VRAM at some point in the forward pass. The sparsity is in compute, not memory. Weight memory:&lt;/p>
$$\text{Memory}_{\text{weights}} \approx N_{\text{total}} \cdot \text{bytes per param}$$
&lt;p>For DeepSeek-V3 FP8 (1 byte): 685 GB. It does not fit in 8×H100 SXM (640 GB). You need either extra quantisation or 16+ GPUs. For Mixtral 8x22B FP8: 141 GB, comfortably inside 2×H100. For Qwen3-235B-A22B FP8: 235 GB, fits in 4×H100.&lt;/p>
&lt;p>&lt;strong>All-to-all bytes per MoE layer.&lt;/strong> When experts are spread across GPUs (EP), each token has to travel to the GPUs where its &lt;code>k&lt;/code> experts live. The volume per MoE layer is roughly:&lt;/p>
$$\text{bytes a2a/layer} \approx 2 \cdot \text{batch} \cdot \text{seq len} \cdot d_{\text{model}} \cdot k \cdot \text{bytes}$$
&lt;p>(the factor 2 is dispatch plus combine). For DeepSeek-V3 with &lt;code>d_model = 7168&lt;/code>, &lt;code>k = 8&lt;/code>, &lt;code>batch = 4096&lt;/code>, FP8 (1 byte): each MoE layer moves ~470 MB; multiplied by 61 MoE layers in DeepSeek-V3, the complete step adds &lt;strong>~29 GB of inter-GPU traffic&lt;/strong> in MoE comms alone. That is of the order of a GPU&amp;rsquo;s HBM bandwidth in a single step. This is why bandwidth and NVLink/InfiniBand topology determine how large EP can be before comms saturate.&lt;/p>
&lt;p>&lt;strong>Persistent memory-bound regime.&lt;/strong> Here is the least intuitive consequence. In dense, raising the batch moves the operation from memory-bound to compute-bound: with enough tokens per batch, the weights are amortised over more operations. In MoE, each expert sees only &lt;code>batch · k / N&lt;/code> tokens. For Qwen3-235B (k=8, N=128) with batch=128, each expert processes &lt;strong>8 tokens per step&lt;/strong>. To reach the compute-bound regime of the tensor cores (arithmetic intensity ~100-200 FLOPs/byte) you need batches in the &lt;strong>thousands&lt;/strong>, around 1,600 according to recent estimates for Qwen3 (Memory-Bound MoE Serving, arXiv:2512.09277). The operational consequence: &lt;strong>MoE scales throughput with batch more linearly than dense&lt;/strong>, but it also needs far larger batches to get close to its compute ceiling.&lt;/p>
&lt;h2 id="expert-parallel-and-the-all-to-all-bottleneck">Expert parallel and the all-to-all bottleneck&lt;/h2>
&lt;p>There are three main ways to parallelise a MoE across GPUs:&lt;/p>
&lt;p>&lt;strong>Tensor Parallel (TP, Megatron-style).&lt;/strong> Splits each weight matrix across GPUs by width or height. Every GPU processes all tokens and all layers. Comms per layer: 2 all-reduces. It works well for dense; for MoE it leaves the routing sparsity unexploited (each GPU holds fragments of every expert).&lt;/p>
&lt;p>&lt;strong>Expert Parallel (EP).&lt;/strong> Splits &lt;strong>whole experts&lt;/strong> across GPUs: 256 experts / 32 GPUs = 8 experts per GPU. Each token, after routing, travels to the GPUs where its top-k &lt;code>k&lt;/code> experts live. Comms per MoE layer: an &lt;strong>all-to-all dispatch&lt;/strong> (tokens towards experts) plus an &lt;strong>all-to-all combine&lt;/strong> (outputs back). The cost grows with EP size and becomes the bottleneck when EP &amp;gt; 8.&lt;/p>
&lt;p>&lt;strong>DP + EP / Wide-EP.&lt;/strong> Replicates the model across DP groups; inside each group, EP shards the experts. &lt;strong>Wide-EP&lt;/strong> takes EP to the full dimension of a rack (NVL72, 72 GPUs in a coherent NVLink domain). Each expert receives more tokens per step, so arithmetic intensity in each expert&amp;rsquo;s GEMMs improves and per-GPU throughput rises. vLLM reports &lt;strong>1.8× throughput per GPU with wide-EP&lt;/strong> against smaller setups on DeepSeek-V3 (vLLM blog, Dec 2025).&lt;/p>
&lt;div class="diagram" style="max-width:780px;margin:1.5rem auto;">
&lt;svg viewBox="0 0 780 380" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Expert Parallel with all-to-all dispatch and combine">
&lt;style>
.gpu{fill:#eaf3ff;stroke:#1f5fa8;stroke-width:1.4;rx:8}
.exp{fill:#fff4d6;stroke:#a48000;stroke-width:1.2;rx:4}
.tok{fill:#cdebd0;stroke:#2a7a40;stroke-width:1.2;rx:4}
.router{fill:#e6d0ff;stroke:#5a2db0;stroke-width:1.4;rx:6}
.lbl{font:600 12px sans-serif;fill:#222}
.sub{font:400 10px sans-serif;fill:#555}
.disp{stroke:#cc6622;stroke-width:1.5;fill:none;marker-end:url(#mma)}
.comb{stroke:#226699;stroke-width:1.5;fill:none;stroke-dasharray:4 2;marker-end:url(#mma)}
&lt;/style>
&lt;defs>&lt;marker id="mma" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto">&lt;path d="M0,0 L10,5 L0,10 z" fill="#444"/>&lt;/marker>&lt;/defs>
&lt;text x="20" y="22" class="lbl">MoE layer with Expert Parallel: EP=4 (4 GPUs, 8 experts/GPU)&lt;/text>
&lt;rect x="20" y="40" width="170" height="60" class="router"/>
&lt;text x="105" y="62" text-anchor="middle" class="lbl">Router (W_router)&lt;/text>
&lt;text x="105" y="78" text-anchor="middle" class="sub">softmax → top-k=2&lt;/text>
&lt;text x="105" y="92" text-anchor="middle" class="sub">per token&lt;/text>
&lt;rect x="20" y="115" width="80" height="35" class="tok"/>&lt;text x="60" y="138" text-anchor="middle" class="lbl">tokens&lt;/text>
&lt;text x="220" y="60" class="sub">all-to-all dispatch (FP8)&lt;/text>
&lt;path class="disp" d="M195,75 L300,160"/>
&lt;path class="disp" d="M195,80 L450,160"/>
&lt;path class="disp" d="M195,85 L600,160"/>
&lt;path class="disp" d="M195,90 L720,160"/>
&lt;rect x="240" y="160" width="120" height="120" class="gpu"/>
&lt;text x="300" y="178" text-anchor="middle" class="lbl">GPU 0&lt;/text>
&lt;rect x="252" y="190" width="42" height="20" class="exp"/>&lt;text x="273" y="204" text-anchor="middle" class="sub">E0&lt;/text>
&lt;rect x="296" y="190" width="42" height="20" class="exp"/>&lt;text x="317" y="204" text-anchor="middle" class="sub">E1&lt;/text>
&lt;rect x="252" y="215" width="42" height="20" class="exp"/>&lt;text x="273" y="229" text-anchor="middle" class="sub">E2&lt;/text>
&lt;rect x="296" y="215" width="42" height="20" class="exp"/>&lt;text x="317" y="229" text-anchor="middle" class="sub">E3&lt;/text>
&lt;text x="300" y="255" text-anchor="middle" class="sub">experts 0-7&lt;/text>
&lt;text x="300" y="270" text-anchor="middle" class="sub">(8 experts)&lt;/text>
&lt;rect x="390" y="160" width="120" height="120" class="gpu"/>
&lt;text x="450" y="178" text-anchor="middle" class="lbl">GPU 1&lt;/text>
&lt;rect x="402" y="190" width="42" height="20" class="exp"/>&lt;text x="423" y="204" text-anchor="middle" class="sub">E8&lt;/text>
&lt;rect x="446" y="190" width="42" height="20" class="exp"/>&lt;text x="467" y="204" text-anchor="middle" class="sub">E9&lt;/text>
&lt;text x="450" y="255" text-anchor="middle" class="sub">experts 8-15&lt;/text>
&lt;rect x="540" y="160" width="120" height="120" class="gpu"/>
&lt;text x="600" y="178" text-anchor="middle" class="lbl">GPU 2&lt;/text>
&lt;rect x="552" y="190" width="42" height="20" class="exp"/>&lt;text x="573" y="204" text-anchor="middle" class="sub">E16&lt;/text>
&lt;rect x="596" y="190" width="42" height="20" class="exp"/>&lt;text x="617" y="204" text-anchor="middle" class="sub">E17&lt;/text>
&lt;text x="600" y="255" text-anchor="middle" class="sub">experts 16-23&lt;/text>
&lt;rect x="660" y="160" width="100" height="120" class="gpu"/>
&lt;text x="710" y="178" text-anchor="middle" class="lbl">GPU 3&lt;/text>
&lt;rect x="668" y="190" width="42" height="20" class="exp"/>&lt;text x="689" y="204" text-anchor="middle" class="sub">E24&lt;/text>
&lt;rect x="712" y="190" width="42" height="20" class="exp"/>&lt;text x="733" y="204" text-anchor="middle" class="sub">E25&lt;/text>
&lt;text x="710" y="255" text-anchor="middle" class="sub">experts 24-31&lt;/text>
&lt;text x="220" y="310" class="sub">all-to-all combine (weighted sum returns to the origin)&lt;/text>
&lt;path class="comb" d="M300,280 L195,330"/>
&lt;path class="comb" d="M450,280 L195,330"/>
&lt;path class="comb" d="M600,280 L195,330"/>
&lt;path class="comb" d="M710,280 L195,330"/>
&lt;rect x="100" y="325" width="200" height="35" class="tok"/>
&lt;text x="200" y="346" text-anchor="middle" class="lbl">y = Σ w_i · Expert_i(x)&lt;/text>
&lt;/svg>
&lt;/div>
&lt;p>Quick decision table:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Case&lt;/th>
&lt;th>Recommendation&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Small MoE that fits in 1 node (Mixtral 8x7B, Llama 4 Scout)&lt;/td>
&lt;td>TP only or EP=2 intra-node&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Medium MoE (Mixtral 8x22B, Qwen3-235B) on 1-2 H100 nodes&lt;/td>
&lt;td>EP=8 intra-node, optionally TP=2&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Large MoE (DeepSeek-V3) on a multi-node cluster&lt;/td>
&lt;td>TP × EP cross-node (e.g. TP=4 × EP=8 on 32 GPUs)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Large MoE with NVL72 available&lt;/td>
&lt;td>Wide-EP=72 (decode), EP=32 (prefill)&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>DeepSeek&amp;rsquo;s production deployment combines &lt;strong>Prefill EP=32&lt;/strong> (4 nodes × 8 GPUs) with &lt;strong>Decode EP=144&lt;/strong> (18 nodes × 8 GPUs). The prefill/decode split fits conceptually with &lt;a href="https://blog.lo0.es/en/posts/disaggregated-serving-prefill-decode-specialised-pods/">Disaggregated serving&lt;/a>: prefill is compute-bound and benefits from moderate EP; decode is memory-bound and benefits from Wide-EP, which raises the tokens per expert per step.&lt;/p>
&lt;h2 id="deepep-eplb-and-wide-ep-the-pieces-that-unblocked-2025">DeepEP, EPLB and Wide-EP: the pieces that unblocked 2025&lt;/h2>
&lt;p>&lt;strong>DeepEP&lt;/strong> (DeepSeek, opened in February 2025) is a library of all-to-all CUDA kernels optimised specifically for MoE EP. Four important properties:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Native FP8 dispatch&lt;/strong>: tokens travel in FP8, halving the bandwidth consumed.&lt;/li>
&lt;li>&lt;strong>Mixing intra-node NVLink with inter-node RDMA&lt;/strong>: the kernel picks the optimal route according to topology.&lt;/li>
&lt;li>&lt;strong>CPU bypass&lt;/strong>: the GPU→GPU dispatch goes over RDMA without touching the host.&lt;/li>
&lt;li>&lt;strong>Aligned with DeepSeek-V3&amp;rsquo;s group-limited gating&lt;/strong>: the routing prefers experts in the same node group where possible, minimising inter-node traffic.&lt;/li>
&lt;/ul>
&lt;p>In 2025 Tencent contributed optimisations that added +30 % on the normal kernels. There is a ROCm port for AMD.&lt;/p>
&lt;p>&lt;strong>EPLB (Expert Parallelism Load Balancer)&lt;/strong> solves the runtime imbalance problem: even when the model is well balanced in global distribution, &lt;strong>a specific batch can heavily activate certain experts&lt;/strong> (prompts in a single language, a single domain). EPLB &lt;strong>replicates the hot experts&lt;/strong> across several GPUs (redundant experts) and packs them heuristically with cold experts to minimise load variance. It has two modes: hierarchical (for prefill with medium EP) and global (for decode with Wide-EP). It is integrated into SGLang and vLLM.&lt;/p>
&lt;p>&lt;strong>Wide-EP on NVL72&lt;/strong> is the peak setup of 2026: 72 Blackwell GPUs in a coherent NVLink domain (1.8 TB/s bidirectional per GPU, intra-rack). Each expert receives many more tokens per step, so arithmetic intensity improves and so does throughput per GPU. Combined with NVFP4 over expert weights and FP8 over attention, SGLang reported on GB200 NVL72 &lt;strong>26,156 tok/s/GPU in prefill and 13,386 tok/s/GPU in decode&lt;/strong> for DeepSeek-V3 (LMSYS, Sep 2025), a &lt;strong>3.8× prefill and 4.8× decode versus H100&lt;/strong>.&lt;/p>
&lt;h2 id="operational-pitfalls">Operational pitfalls&lt;/h2>
&lt;p>&lt;strong>HBM fragmentation from expert weights.&lt;/strong> With EP=8 in 1 node, each GPU holds N/8 experts, each a tuple of matrices (&lt;code>gate&lt;/code>, &lt;code>up&lt;/code>, &lt;code>down&lt;/code>). If N=256, that is 32 FFNs per GPU. The allocator can fragment; in some cases you need a more conservative &lt;code>--gpu-memory-utilization&lt;/code> than usual.&lt;/p>
&lt;p>&lt;strong>Cold experts.&lt;/strong> In real distributions some experts are activated by &amp;lt;1 % of tokens. EPLB compensates by replicating hot ones, but the cold ones sit occupying HBM without taking part, &amp;ldquo;dead&amp;rdquo; memory. When real demand diverges a lot from the training distribution, this shows.&lt;/p>
&lt;p>&lt;strong>Continuous batching.&lt;/strong> It works with MoE, but the effective batch size per expert is &lt;code>batch_total · k / N&lt;/code>. With large N and a moderate batch, each expert sees very few tokens per step. You need a &lt;code>batch_total&lt;/code> far larger than in dense to match per-GPU throughput.&lt;/p>
&lt;p>&lt;strong>Speculative decoding + MoE.&lt;/strong> They interact &lt;strong>well&lt;/strong>. MoE sparsity keeps the memory-bound regime at high batch, which is exactly the regime where speculative decoding wins most. DeepSeek-V3 integrates &lt;strong>MTP&lt;/strong> (Multi-Token Prediction), speculative decoding native to the model, with no external draft, with acceptance around 85-90 % on the second token (see &lt;a href="https://blog.lo0.es/en/posts/speculative-decoding-fundamentals-maths-state-of-play/">Speculative decoding&lt;/a> for the mechanism).&lt;/p>
&lt;p>&lt;strong>MLA and FlashMLA are not MoE.&lt;/strong> DeepSeek-V3 combines MoE with &lt;strong>Multi-head Latent Attention&lt;/strong> (MLA), an attention variant that reduces the KV cache ~10× against standard MHA. MLA and MoE are orthogonal: MLA optimises attention, MoE optimises the FFN. For serving DeepSeek you use the specific &lt;strong>FlashMLA&lt;/strong> kernel (not FA3 directly).&lt;/p>
&lt;p>&lt;strong>DSA (DeepSeek Sparse Attention)&lt;/strong> in DeepSeek-V3.2-Exp (Sep 2025) introduces sparsity in attention too. The first time at the frontier that sparsity is applied in both attention and FFN.&lt;/p>
&lt;h2 id="implications-for-on-premise-hardware">Implications for on-premise hardware&lt;/h2>
&lt;p>&lt;strong>On an RTX 4090 (24 GB).&lt;/strong> Large MoEs are out of reach. What does fit: Mixtral 8x7B AWQ-INT4 (~24 GB of weights, no headroom for KV cache, so it really requires TP=2 across two 4090s); DeepSeekMoE 16B BF16 (~33 GB, does not fit whole; INT4 ~8 GB, fits with room to spare). The interesting case is &lt;strong>llama.cpp with &lt;code>--n-cpu-moe&lt;/code>&lt;/strong>: expert weights offloaded to RAM (CPU), attention and shared experts on the GPU. It lets you run DeepSeek-V3 IQ4 (~400 GB) on a workstation with 1-2 GPUs plus 512 GB of RAM at modest throughput, but it opens the door to a low-budget setup.&lt;/p>
&lt;p>&lt;strong>On a generic 4×H100 SXM cluster (320 GB, NVLink, native FP8).&lt;/strong> These fit comfortably:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Mixtral 8x22B FP8&lt;/strong> (~141 GB) with TP=2 or EP=4. Low latency, excellent throughput.&lt;/li>
&lt;li>&lt;strong>Qwen3-235B-A22B FP8&lt;/strong> (~235 GB) with TP=4 or EP=4. Plenty of room.&lt;/li>
&lt;li>&lt;strong>Llama 4 Scout 109B FP8&lt;/strong> (~110 GB) with TP=2 or TP=4. Designed by Meta to serve well on one H100 node.&lt;/li>
&lt;/ul>
&lt;p>What does &lt;strong>not&lt;/strong> fit in 4×H100: DeepSeek-V3 FP8 (~685 GB) without aggressive quantisation. Options: (1) scale to 8-16 H100; (2) use AWQ INT4 over routed experts plus FP16 over activated ones (~400 GB), which fits in 8×H100; (3) wait for Blackwell or use AMD MI300X (192 GB/GPU, so DeepSeek-V3 FP8 on 4×MI300X).&lt;/p>
&lt;p>The rule of thumb as of May 2026: &lt;strong>one 4×H100 node comfortably serves MoEs up to ~200 B total in FP8; for DeepSeek-V3 you have to scale to 2 nodes or wait for B200 NVL72&lt;/strong> (where the whole model fits with room for enormous batches).&lt;/p>
&lt;h2 id="what-we-have-not-covered">What we have not covered&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>MLA and FlashMLA in detail&lt;/strong>: DeepSeek&amp;rsquo;s KV cache optimisation, orthogonal to MoE.&lt;/li>
&lt;li>&lt;strong>DeepSeek Sparse Attention (DSA)&lt;/strong> introduced in V3.2-Exp: the first production implementation of attention sparsity for frontier models.&lt;/li>
&lt;li>&lt;strong>MoE during training&lt;/strong>: load balancing losses, drop policies, auxiliary terms vs aux-loss-free, Kimi K2&amp;rsquo;s MuonClip.&lt;/li>
&lt;li>&lt;strong>MoE + LoRA&lt;/strong>: how adapter fine-tuning is done on a MoE, and what happens to the routing.&lt;/li>
&lt;li>&lt;strong>LLM-d&lt;/strong> and other open-source platforms that materialise Wide-EP on Kubernetes.&lt;/li>
&lt;/ul>
&lt;h2 id="see-also">See also&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/kv-cache-working-memory-llm-inference/">KV cache: working memory&lt;/a> — structurally the KV cache is the same as in dense (attention is dense in every current MoE); MLA is the specific optimisation DeepSeek adds on top.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/pagedattention-vllm-block-manager/">PagedAttention deep dive&lt;/a> — handling the KV cache in physical blocks stays identical under MoE; only the FFN changes.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/flashattention-librarian-io-awareness-async-blackwell-asymmetry/">FlashAttention v1/v2/v3/v4&lt;/a> — the attention kernel is reused as-is; FlashMLA is the variant specific to DeepSeek&amp;rsquo;s MLA, adding a latent compression step to the FA pattern.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/quantization-llm-inference-fp8-int4-gguf/">Quantization for LLM inference&lt;/a> — FP8/NVFP4 over expert weights is what makes DeepSeek-V3 fit into a modest cluster and what lets NVL72 reach its peak numbers.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/speculative-decoding-fundamentals-maths-state-of-play/">Speculative decoding&lt;/a> — MTP in DeepSeek-V3 is native speculative decoding; MoE&amp;rsquo;s persistent memory-bound regime means speculative wins more in MoE than in dense at medium batch.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/disaggregated-serving-prefill-decode-specialised-pods/">Disaggregated serving: prefill and decode&lt;/a> — DeepSeek&amp;rsquo;s real deployment separates prefill (EP=32) and decode (EP=144) pools; disaggregation is a prerequisite for Wide-EP.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/continuous-batching-orca-vllm-chunked-prefill-goodput/">Continuous batching&lt;/a> — the other side of the coin. MoE needs far larger batches than dense for the same per-GPU throughput because each expert sees &lt;code>batch · k / N&lt;/code> tokens per step; the iterative scheduler is what makes it viable at scale.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/six-stage-llmops-pipeline-architecture-and-deep-dive/">The six-stage LLMOps pipeline&lt;/a> — the master map where Deploy is stage 4.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/capacity-planning-on-premise-llm-inference/">Capacity planning for on-premise LLM inference&lt;/a> — MoE sizing differs from dense: the &amp;ldquo;MoE case&amp;rdquo; section there quantifies the VRAM cost dominated by total weights and the TPOT dominated by active weights per token.&lt;/li>
&lt;li>&lt;a href="https://blog.lo0.es/en/posts/device-native-architectures-fine-grained-moe-pre-attention-router/">Device-native architectures: fine-grained MoE and pre-attention router&lt;/a> — MoE taken to the fine-grained extreme and designed from scratch for device: the pre-attention router prefetches experts from SSD in parallel with attention, hiding the storage I/O.&lt;/li>
&lt;/ul>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>Shazeer, N. et al. &lt;em>Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer&lt;/em>. ICLR 2017. &lt;a href="https://arxiv.org/abs/1701.06538">https://arxiv.org/abs/1701.06538&lt;/a>&lt;/li>
&lt;li>Lepikhin, D. et al. &lt;em>GShard: Scaling Giant Models with Conditional Computation&lt;/em>. ICLR 2021. &lt;a href="https://arxiv.org/abs/2006.16668">https://arxiv.org/abs/2006.16668&lt;/a>&lt;/li>
&lt;li>Fedus, W., Zoph, B., Shazeer, N. &lt;em>Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity&lt;/em>. JMLR 2022. &lt;a href="https://arxiv.org/abs/2101.03961">https://arxiv.org/abs/2101.03961&lt;/a>&lt;/li>
&lt;li>Gale, T., Narayanan, D., Young, C., Zaharia, M. &lt;em>MegaBlocks: Efficient Sparse Training with Mixture-of-Experts&lt;/em>. MLSys 2023. &lt;a href="https://arxiv.org/abs/2211.15841">https://arxiv.org/abs/2211.15841&lt;/a>&lt;/li>
&lt;li>Mistral AI. &lt;em>Mixtral of Experts&lt;/em>. 2024. &lt;a href="https://arxiv.org/abs/2401.04088">https://arxiv.org/abs/2401.04088&lt;/a>&lt;/li>
&lt;li>DeepSeek-AI. &lt;em>DeepSeekMoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Models&lt;/em>. 2024. &lt;a href="https://arxiv.org/abs/2401.06066">https://arxiv.org/abs/2401.06066&lt;/a>&lt;/li>
&lt;li>DeepSeek-AI. &lt;em>DeepSeek-V2&lt;/em>. 2024. &lt;a href="https://arxiv.org/abs/2405.04434">https://arxiv.org/abs/2405.04434&lt;/a>&lt;/li>
&lt;li>DeepSeek-AI. &lt;em>DeepSeek-V3 Technical Report&lt;/em>. 2024. &lt;a href="https://arxiv.org/abs/2412.19437">https://arxiv.org/abs/2412.19437&lt;/a>&lt;/li>
&lt;li>Tencent. &lt;em>Hunyuan-Large&lt;/em>. 2024. &lt;a href="https://arxiv.org/abs/2411.02265">https://arxiv.org/abs/2411.02265&lt;/a>&lt;/li>
&lt;li>DeepEP repo: &lt;a href="https://github.com/deepseek-ai/DeepEP">https://github.com/deepseek-ai/DeepEP&lt;/a>&lt;/li>
&lt;li>EPLB repo: &lt;a href="https://github.com/deepseek-ai/EPLB">https://github.com/deepseek-ai/EPLB&lt;/a>&lt;/li>
&lt;li>DeepSeek open-infra-index, &lt;em>V3/R1 Inference System Overview&lt;/em>: &lt;a href="https://github.com/deepseek-ai/open-infra-index">https://github.com/deepseek-ai/open-infra-index&lt;/a>&lt;/li>
&lt;li>vLLM blog, &lt;em>Large-Scale Serving DeepSeek&lt;/em> (Dec 2025): &lt;a href="https://blog.vllm.ai/2025/12/17/large-scale-serving.html">https://blog.vllm.ai/2025/12/17/large-scale-serving.html&lt;/a>&lt;/li>
&lt;li>vLLM blog, &lt;em>WideEP en GB200&lt;/em> (Feb 2026): &lt;a href="https://blog.vllm.ai/2026/02/03/dsr1-gb200-part1.html">https://blog.vllm.ai/2026/02/03/dsr1-gb200-part1.html&lt;/a>&lt;/li>
&lt;li>LMSYS blog, &lt;em>DeepSeek 96 H100 PD+EP&lt;/em> (May 2025): &lt;a href="https://www.lmsys.org/blog/2025-05-05-large-scale-ep/">https://www.lmsys.org/blog/2025-05-05-large-scale-ep/&lt;/a>&lt;/li>
&lt;li>LMSYS blog, &lt;em>DeepSeek GB200 NVL72 part II&lt;/em> (Sep 2025): &lt;a href="https://www.lmsys.org/blog/2025-09-25-gb200-part-2/">https://www.lmsys.org/blog/2025-09-25-gb200-part-2/&lt;/a>&lt;/li>
&lt;li>NVIDIA Dynamo + GB200 NVL72 for MoE: &lt;a href="https://developer.nvidia.com/blog/how-nvidia-gb200-nvl72-and-nvidia-dynamo-boost-inference-performance-for-moe-models/">https://developer.nvidia.com/blog/how-nvidia-gb200-nvl72-and-nvidia-dynamo-boost-inference-performance-for-moe-models/&lt;/a>&lt;/li>
&lt;li>Tensor Economics, &lt;em>MoE Inference Economics from First Principles&lt;/em>: &lt;a href="https://www.tensoreconomics.com/p/moe-inference-economics-from-first">https://www.tensoreconomics.com/p/moe-inference-economics-from-first&lt;/a>&lt;/li>
&lt;li>Cohere, &lt;em>Why MoE models get more from speculative decoding&lt;/em>: &lt;a href="https://cohere.com/blog/mixture-of-experts-models-get-more-from-speculative-decoding">https://cohere.com/blog/mixture-of-experts-models-get-more-from-speculative-decoding&lt;/a>&lt;/li>
&lt;/ul></description></item></channel></rss>