Primers · AI infrastructure

DeepSeek Opened the Engine Room

In April 2025, DeepSeek published a short note explaining why its inference engine would stay closed. On October 20, 2026, it published the engine: DeepInfer, the framework that serves its flagship model in production, kernels, scheduler, and speculative decoding included. What did not ship is the part of the machine that decides how cheaply the engine runs.

Researched October 2026  ·  AIInfrastructure
An open machine in a data center passing glowing tokens along a conveyor past rows of chips, with one locked metal door at the far end

The brief

“Introducing DeepInfer, our in-house inference framework, now fully open source! Powering DeepSeek-V4.1-Flash at scale with high throughput and low latency. We’re sharing our production stack to help the community lower compute costs, reduce energy use, and make AI more affordable.”

DeepSeek, @deepseek_ai · X, October 20, 2026, opening a four-post thread

The repository behind the post is real and unusually complete: the serving code for one model, DeepSeek-V4.1-Flash, on two chip families, NVIDIA’s SM100 graphics processors and Huawei’s Ascend 950 neural processing units, released for offline inference under the Apache 2.0 license. Beside it sits a deployment Q&A in which DeepSeek answers its own hardest questions, including what the release leaves out. By its account, one production cluster serves 155 trillion tokens a day and earns $38 of revenue per GPU-hour at off-peak pricing.

In April 2025 DeepSeek wrote down why its inference engine would stay closed; on October 20, 2026 it published the engine.

The 2025 note gave three reasons: the code had diverged too far from the vLLM serving framework it forked, it was coupled too tightly to internal cluster tools, and the team had no bandwidth to maintain a public copy. The plan was to contribute parts upstream instead. DeepInfer’s own README closes the loop with a shrug: the framework was “originally built primarily on vLLM,” and now the fork is the release.

Sourcing, up front

Every benchmark on this page is DeepSeek’s own: values read off the charts published in the repository, and production figures from its deployment Q&A. The repository ships the sweep scripts needed to reproduce the charts, but no independent rerun had been published when this page was researched, and DeepSeek’s charts carry no rival framework’s curve. Where DeepSeek has published nothing, this page says so instead of estimating.

The sentence to rememberDeepSeek published the engine that serves its flagship model, and kept the cache system and the load balancers that decide how cheaply that engine runs.

Figure 1: one chart, two products

Throughput and speed are the same budget spent two ways, and DeepSeek’s chart prices both ends of it.

Serving a model splits into prefill, reading the prompt, and decode, generating the answer one step at a time. Decode is where the money goes, and its central choice is batch size: how many requests share each step. DeepSeek’s published decode chart fixes the setting (64 SM100 GPUs, experts spread across all of them, a 131,072-token context) and walks the batch from 8 requests per GPU rank to 256. Speculative decoding is on: a small draft proposes \(n = 3\) tokens per step and the full model verifies them, accepting a fraction \(p = 0.75\) of drafted tokens on average. That makes each step worth more than one token:

$$\tau = 1 + n \cdot p = 1 + 3 \times 0.75 = 3.25$$
τ (tau) expected tokens produced per decode step n draft tokens proposed and verified per step, fixed at 3 in this chart p average acceptance probability per drafted token, 0.75 in this chart

The 1 is the token the verifying pass itself produces; the \(n \cdot p\) term is the drafted tokens that survive. Because each step banks \(\tau = 3.25\) tokens, a user’s speed divided by 3.25 gives the steps per second the hardware actually runs, the number that sets latency. Walk the chart:

DeepSeek’s decode chart, walked: pick the batch the fleet runs at
0 10k 20k tokens per second, per user tokens/s per GPU 8 32 64 128 256
output, tokens/s per GPU
speed, tokens/s per user
decode steps per second
tokens per GPU-hour

Values read off DeepSeek’s published decode chart (expert parallelism across 64 GPUs, context 131,072, \(\tau = 3.25\)), approximate as chart reading is. Steps per second and tokens per GPU-hour are this page’s arithmetic on those values. The prefill chart tells the other half: up to about 89,400 tokens/s per GPU on 4 GPUs, at which rate a full 131,072-token context prefills in about 1.5 seconds.

Six parts do the work

Nothing in the box is a demo part: the kernels, the draft checker, and the scheduler are the pieces DeepSeek lists for its own service.

FlashMLAattention over the compressed key-value cache
DeepGEMMthe matrix multiplications
DeepEPmoving tokens between experts on different GPUs
TileKernelsshared building blocks for writing kernels
DeepSelecttop-k selection, picking which experts fire
TileLang kernelssmaller custom kernels written in tree

Every operation the model runs passes through one of these libraries. Most are the same projects DeepSeek open-sourced during its February 2025 Open Source Week; the engine is what they were always parts of. The release even prices its own honesty: the open FlashMLA decode kernel skips one hand-tuned SASS optimization, an assembly-level tuning, and so runs 5 to 10 percent slower than the internal build, which DeepSeek says puts the open engine at most 5 percent behind end to end.

Speculative decoding lets a small draft model guess the next tokens so the big model can verify several in one pass. DeepSeek’s DSpark adds a confidence head: each drafted token gets a predicted acceptance probability, and only the strong prefix is sent for verification. Weak drafts are dropped before they burn compute. Tap through one round:

DeepSeek’s production numbers: dynamic verification checks 3.2 to 4.4 of the 5 drafted tokens per step, about 30 percent fewer than a fixed check, while the accepted length stays essentially unchanged (3.20 vs 3.29 tokens). The win depends on load: +5.4 percent throughput at 60 sequences per GPU rank, +11.0 percent at 96, and minus 1.5 percent at 16, where the confidence check costs more than the skipped work saves.

EP8 · 128 requests19,200 tok/s
EP64 · 128 requests22,800 tok/s

The model routes each token to 6 of its 384 routed experts. Decode spreads those experts across 64 GPUs, 6 per GPU, plus redundant copies of the hottest experts, 7 per GPU in practice, placed by EPLB, expert-parallel load balancing. The point of going wide is visible in the bars: at the same 128 requests per rank, the 64-GPU layout produces about 19 percent more output per GPU than the 8-GPU layout, because no single GPU waits on a popular expert. The balance is not perfect: DeepSeek reports the slowest rank running about 9 percent over the mean in decode. Prefill runs the opposite shape, small expert parallelism on ordinary 8-GPU machines, while decode gets the 64 to 128 GPU supernodes.

GPU forward idle forward idle fwd CPU sample plan sample plan sample
GPU forward N forward N+1 forward N+2 CPU sample N plan N+2 clean up N

The scheduler is on by default and follows the pattern DeepSeek credits to SGLang and NanoFlow: the central processor never sits in the graphics processor’s way, so the expensive hardware runs a continuous lane of forward passes.

2,560 tokens an exact rebuild would rerun the last 128 are replayed

The model’s sliding-window attention only ever looks back 128 tokens, but a reused conversation prefix still needs its window state rebuilt before generation can resume. The exact rebuild would run the last 2,560 tokens through 20 decoder layers. Bounded replay recomputes only the last 128, storing the window state instead, which DeepSeek says nearly halves the decoder’s prefill work. The stored state is small enough to keep per sequence:

$$S = 20 \times 134 \times 528\ \text{B} = 1{,}415{,}040\ \text{B} \approx 1.4\ \text{MB}$$
S sliding-window state stored per sequence 20 decoder layers keeping window state 134 tokens stored per layer: the 128-token window plus 6 tokens of speculative backtracking room 528 B per token of window key-value data in MXFP8 format

The state lives in host memory on the machine that produced it. A cache hit replays almost nothing; a miss costs one small recompute instead of a rebuild.

Normally, a request’s arithmetic changes with its batchmates: sums are reduced in different orders, floating-point rounding shifts, and the same prompt can produce different tokens at different loads. A vending machine that pours a different drink depending on how long the line is would be broken; serving stacks shipped that behavior for years because pinning the math costs speed. DeepInfer can pin it:

prompt: “The capital of France is”
output: “Paris, a city that…”

Batch size 1. Switch the batch and watch the output line: it does not move.

Batch invariance is a switch in this release, not the default, and on NVIDIA hardware only. Deterministic sampling goes further and additionally needs a fixed per-sequence seed and speculative decoding off. The customers are debugging, evaluation, and any setting where “it answered differently under load” is not an acceptable sentence.

What stayed home

The release is the engine; the moat that remains is the pantry and the seating plan around it.

Like a restaurant publishing its recipes while keeping its pantry supplier and its maître d’, the cooking here is genuinely shared and the economics of a full house are not in the cookbook. The pantry is the cache: it decides how much of each conversation is already computed. The seating plan is load balancing: it decides whether every GPU works at the same pace. DeepSeek’s README lists the withheld parts itself:

In the box
  • The engine for DeepSeek-V4.1-Flash, offline inference
  • Six kernel libraries, plus TileLang kernels in tree
  • DSpark with confidence-scheduled verification
  • Wide expert parallelism with EPLB balancing policy
  • The asynchronous scheduler and structured outputs
  • The sweep scripts that reproduce the published charts
Still internal
  • The key-value cache system (theirs runs on about 100 pebibytes of solid-state storage, keeping prefixes 3 days for agent traffic and 7 for chat)
  • Vision-encoder, prefill, and decode disaggregation
  • Load balancing across data-parallel replicas
  • One SASS optimization in the internal attention kernel

The withheld list has a price tag, and DeepSeek published it: with its internal balancers, production reaches about 80 percent of a perfectly balanced offline benchmark, and the balancers are part of what is not in the box. The box also assumes a fleet: the smallest efficient deployment in the Q&A is 64 prefill GPUs plus 64 decode GPUs. None of this makes the release small. It makes the release an engine, honestly labeled, inside a machine that is still private.

Key voices

DeepSeek says the open engine runs within 5 percent of the one making its money; the parts list says the last stretch of its cost advantage never left the building.

DeepSeek
The lab itself, in April 2025 and again in October 2026
Changed its mind, in writing, twice

The April 2025 note is a model of a reasoned no: the full engine was considered and declined for divergence, infrastructure coupling, and maintenance bandwidth, with parts promised upstream instead. The October 2026 deployment Q&A then answers the same genre of questions with unusual candor, including the ones that shrink the release: the withheld components, the 80 percent balancing figure, the 5 percent kernel gap. Read together, the two documents are the claim and its own audit.

The April 2025 note: The Path to Open-Sourcing the DeepSeek Inference Engine
Simon Mo
Chief executive of Inferact, the company behind vLLM
Breadth and day-0 support, not one lab’s engine

The incumbent answer to DeepInfer arrived the same day: Google announced vLLM and SGLang inference engines on its TPU accelerators, with Simon Mo quoted for the shared engines’ strategy, supporting most open model families and landing optimized support on launch day. Where DeepInfer is one lab’s production stack for one model, the shared engines sell range: whatever model ships, they run it first.

Google Developers Blog: Announcing New vLLM and SGLang Inference Engines on TPU
epistasis
Commenter in the Hacker News launch thread, October 20, 2026
The host is the product

From the buyer’s side of the same question: different third-party providers serving the same open weights have performed very differently in independent testing, “likely due to hosting differences like this.” Weights are free and identical; the serving layer is where providers diverge, which is exactly the layer DeepInfer just published and exactly the layer its withheld list still guards.

Hacker News: DeepSeek open-sources DeepInfer discussion

The disagreement is genuine and both sides can be right at once. DeepSeek’s claim is narrow and checkable: the open engine, measured alone, sits within 5 percent of the internal one. The skeptics’ claim is about everything around the engine: caches, balancing, and operations decide the bill at scale, and those stayed home. The strongest evidence for the second claim is DeepSeek’s own withheld list.

Where leaders think this goes

Everyone is opening the stack; the split is over which layer was the moat.

Positions as of October 2026. Every camp names its people.

Where they agree
The stack opens layer by layer
DeepSeek’s own sequence is the evidence: kernels and infrastructure in February 2025, the engine and the token-processing recipe in October 2026, and a written commitment in the Q&A that inference code for future models “will continue to be open-sourced in DeepInfer.” Each release moves one layer of the serving stack from private to public.
DeepSeek, by its release history and its Q&A commitment
Where they agree
Serving quality is a differentiator even with open weights
Third-party hosts of identical open weights perform measurably differently, and DeepSeek behaves as if serving is worth guarding: the cache system and the balancers are the pieces it kept. If serving were a commodity, there would be nothing left to withhold.
epistasis (Hacker News) · DeepSeek, by its withheld list
Where they split
Does publishing the engine commoditize serving?

Side A: mostly yes. The production engine, its kernels, and the reproduction scripts are public under Apache 2.0. Anyone can now stand up the same stack DeepSeek serves from, and by DeepSeek’s own measure the public engine is within 5 percent of the private one. What remains is operations, and operations can be hired.

Side B: the moat moved, it did not fall. The economics of serving live in cache hit rates and fleet-wide balance, and both systems stayed internal. DeepSeek’s own figures concede the terrain: production reaches only about 80 percent of a perfectly balanced run, and its charts show no rival framework’s curve to close the argument.

Side A: the release’s scope, DeepSeek · Side B: the withheld list and the 80 percent figure, also DeepSeek
The long shot
Prefill and decode split across data centers
DeepSeek’s Q&A calls cross-data-center prefill and decode “technically feasible” precisely because the compressed cache travels well, budgeting roughly 400 gigabits per second of interconnect per 8 GPUs. This is one party’s feasibility note, not a deployment: DeepSeek says its own charts stay inside single scale-up domains, and nobody runs this publicly.
DeepSeek Q&A only · marked as a long shot

The long arc

The kernels came out in a week in 2025; the engine took eighteen more months and a new model to follow.

From parts week to the whole engine
February 24 to 28, 2025 · Open Source Week

The parts, one a day

DeepSeek open-sources a layer of its serving stack daily: FlashMLA for attention, DeepEP for expert communication, DeepGEMM for matrix math, DualPipe with EPLB for parallelism, and the 3FS file system, closing with an overview of the V3 and R1 inference system and its production data.

5 days · the components come out; the engine they belong to does not
April 2025 · The note

Why the engine stays closed

DeepSeek writes that it considered open-sourcing the full inference engine and decided against it: the codebase had diverged too far from its vLLM fork, it was coupled too tightly to internal infrastructure, and maintenance bandwidth was limited. The commitment instead: extract standalone features and contribute optimizations upstream.

3 reasons · divergence, coupling, bandwidth, each answered by the 2026 release
September 10, 2026 · The model

V4.1-Flash arrives built for cheap serving

DeepSeek launches V4.1-Flash: a 552-billion-parameter mixture-of-experts model with a causal encoder-decoder design, 8 billion active parameters for input and 16 billion for output, native visual understanding, and a key-value cache needing a quarter of the accelerator memory and an eighth of the solid-state storage of the previous generation.

552B total · 8B active on input, 16B on output, per DeepSeek’s launch thread
October 17, 2026 · The checkpoint

The weights land on Hugging Face

The V4.1-Flash-1017 checkpoint appears under the MIT license: 40 layers, 384 routed experts plus a shared expert, a 1,048,576-token maximum context, and the DSpark configuration, 3 prediction layers drafting in blocks of 5, visible in the model’s own configuration file. The DeepInfer repository is created the day before.

1M tokens · maximum context in the published configuration
October 20, 2026 · The engine

DeepInfer, plus the honest appendix

DeepSeek publishes DeepInfer under Apache 2.0: the engine, the deployment Q&A with its production figures and withheld list, and deepseek-recipe, the token-processing component aligned with the official API. The launch thread closes, in launch-day coverage’s account, with the line: “Open models. Open kernels. Open inference.”

10,450 stars · and 107 open issues within the repository’s first day
October 20, 2026 · The other bet

The shared engines plant their flag

The same day, Google announces vLLM and SGLang inference engines on TPU with day-0 support pledges for new models and accelerators. Two strategies for the same layer, announced within hours: one lab’s production stack, published whole, against the community engines’ breadth across every model and chip.

Same day · depth from one lab vs breadth from the shared engines

Swipe, tap the arrows, or use the arrow keys.

Takeaways

DeepInfer is the most complete production serving stack a frontier lab has published, and its own documents are the best guide to its limits: one model, two chip families, offline inference only, with the cache and balancing layers that shape real cost still internal. The engine room is open. The building around it is not, and DeepSeek, to its credit, published the list that proves it.

Keep exploring

Sources

  1. DeepSeek, X thread opener, October 20, 2026. x.com/deepseek_ai
  2. DeepSeek, DeepInfer repository: README, feature list, scope limits, and benchmark charts. github.com/deepseek-ai/DeepInfer
  3. DeepSeek, “DeepSeek V4.1 Flash Inference Deployment Q&A,” DeepInfer repository document. github.com/deepseek-ai/DeepInfer (Q&A)
  4. DeepSeek, DeepInfer evaluation README (reference Pass@1 values, labeled indicative). github.com/deepseek-ai/DeepInfer (eval)
  5. DeepSeek, DeepSeek-V4.1-Flash-1017 model page and configuration, Hugging Face. huggingface.co/deepseek-ai
  6. DeepSeek, “The Path to Open-Sourcing the DeepSeek Inference Engine,” April 2025. github.com/deepseek-ai/open-infra-index
  7. DeepSeek, Open Infra index: the February 2025 Open Source Week releases. github.com/deepseek-ai/open-infra-index
  8. DeepSeek, deepseek-recipe repository: production token encoding and decoding. github.com/deepseek-ai/deepseek-recipe
  9. Google Developers Blog, “Announcing New vLLM and SGLang Inference Engines on TPU,” October 20, 2026. developers.googleblog.com
  10. Hacker News, “DeepSeek open-sources DeepInfer,” launch discussion, October 20, 2026. news.ycombinator.com

Production figures (155 trillion tokens a day, $38 per GPU-hour, the 80 percent balancing figure, the 5 percent kernel gap) are DeepSeek’s own, from its deployment Q&A. Chart values were read off DeepSeek’s published Pareto charts and are approximate; steps per second and tokens per GPU-hour are arithmetic on those values. No independent rerun of the repository’s sweep scripts had been published when this page was researched. The launch thread’s middle posts were not retrievable verbatim through the available APIs; this primer quotes the opener verbatim and builds on the repository documents the thread links.