
DeepInfer: DeepSeek's open inference stack and its gaps
DeepSeek published the source for DeepInfer on 20 October 2026, under the Apache 2.0 licence, in the repository deepseek-ai/DeepInfer. DeepInfer is the layer between a trained checkpoint and the API that answers requests, which makes it the layer that decides what a token costs to produce. Until last month it was private.
What you get is a tuned engine for one model on two accelerator families. What you do not get is the rest of the service around it.
What shipped in the DeepInfer release
The release is one model wide. DeepInfer supports DeepSeek-V4.1-Flash and nothing else, and by default loads the 1017 checkpoint from 17 October. There is no path to V3, no path to a Qwen or Llama checkpoint, and no flag that makes it general purpose. Future DeepSeek models will land in the same repository, the company says.
The public build is offline inference: export DEEPINFER_ACCELERATOR as nvidia or ascend, build against CUDA 13 or CANN 9.2, and run the bundled example. Linux, GCC 13 and Python 3.12 in an empty environment are required, because the build links its own kernels.
The engine began as a fork of vLLM, with ideas from SGLang and Nvidia's TensorRT-LLM, and the credits say so. vLLM thanked DeepSeek and said it would fold the useful parts back into its own V4.1-Flash support. It is also a reversal: in April 2025 DeepSeek said it would not open-source the engine and shipped kernel libraries instead. FlashMLA, DeepGEMM and DeepEP are inside this release now, and TileLang reached Huawei's chips on 30 September 2026.
Inside the engine:
- Optimised kernels: FlashMLA, DeepGEMM, DeepEP, TileKernels, DeepSelect and custom TileLang kernels.
- Attention data parallelism, balanced context parallelism, and MoE expert parallelism with expert load balancing.
- DSpark speculative decoding with confidence-scheduled verification, and SWA bounded replay.
- Asynchronous scheduling, on by default, plus structured outputs constrained by regex, JSON schema or an EBNF grammar.
- Batch-invariant inference and deterministic sampling, both Nvidia only.
A companion package, deepseek-recipe, produces the same token sequence the public API produces, which matters at migration: a tokeniser that disagrees with the hosted one breaks prompt caching, billing and evals at once.
The three techniques that carry the throughput claim
Speculative decoding is the headline. DSpark uses a draft model that proposes up to five tokens at a time and a confidence head that estimates which the main model will accept. Verification goes only to the likeliest candidates, so the engine checks roughly 30% fewer draft tokens per step than a flat schedule would. DeepSeek puts the gain at 4% to 7% more throughput at its own production load, and says a variable verification length adds another 6% over verifying a fixed five. Small numbers, and exactly the kind that decide whether a cluster pays for itself.
SWA bounded replay attacks prefill. V4.1-Flash uses sliding-window attention, and DeepSeek no longer persists that window's cache, because its useful life is minutes rather than days. On a cache miss the engine replays only a bounded suffix, 140 tokens by default, instead of recomputing the whole context, which DeepSeek says nearly halves prefill computation. The suffix must cover the attention window plus the maximum backtracking length, so heavy tool-call backtracking makes the default the wrong number.
The third piece is scheduling. Asynchronous scheduling overlaps CPU batch assembly with work already queued on the device. Batch-invariant inference keeps results identical across batch compositions, and deterministic sampling returns identical output for identical input and parameters. Both are off by default, need environment variables, and work only on Nvidia hardware.
| Technique | What it saves | Where it runs | How to turn it on |
|---|---|---|---|
| DSpark plus confidence scheduling | Verification work per step | Nvidia and Ascend | DEEPINFER_ENABLE_MTP_VARLEN=1 |
| SWA bounded replay | Prefill on a cache miss | Nvidia and Ascend | DEEPINFER_YOCO_PREFILL_KEEP_TOKENS |
| Asynchronous scheduling | Scheduler stall | Nvidia and Ascend | On by default |
| Batch-invariant inference | Drift across batch shapes | Nvidia only | DEEPINFER_BATCH_INVARIANT=1 |
| Deterministic sampling | Run-to-run variation | Nvidia only | Same flag, with seq_seed |
DeepInfer runs on SM100 and Ascend 950, and those are not the same target
Two families are supported. The first is Nvidia's SM100, the Blackwell data-centre compute capability. The second is Huawei's Ascend 950: the 950PR for prefill, with 128GB of Huawei's HiBL memory and 1.6TB/s of bandwidth, and the 950DT for decoding and training, with 144GB and 4TB/s. DeepSeek's own deployment follows that split, with expert parallelism at a width of 2 to 8 in prefill and 64 to 128 in decode.
Nothing older is on the list. Hopper and earlier Nvidia parts are not supported, so an H100 or H200 fleet cannot run this engine at all.
The two targets do not carry the same features. Batch-invariant inference and deterministic sampling are flagged Nvidia only, so a product that needs identical output across batch shapes, or reproducible sampling for an audit, has already made the hardware choice. Every published performance figure was measured on SM100 too, and no Ascend throughput number exists. A Huawei deployment is a plan against an unmeasured target, which is not the same as a bad one.
Supply is the practical constraint there. Huawei has said its capacity does not meet domestic demand, and Huawei Cloud's 1,024-card Ascend 950 Lingqu cluster went commercial in China on 30 September 2026, with global availability from 30 November 2026. Buying the accelerators is a procurement question, and it arrives before the software ones.
What is missing: three services you still have to build
The README is honest about omissions. A KV cache system, the split between prefill and decode across separate machines, and load balancing across data-parallel replicas for both phases are left to the operator. The first two are described in a DeepSeek blog post rather than shipped as code, because DeepSeek says they are coupled to its internal infrastructure.
Each is a system, not a config file. The KV cache decides how much of a conversation you serve from memory and how much you pay to recompute; DeepSeek reports an average input cache hit rate of 96% on its own traffic, a figure that owes as much to multi-day retention as to the engine. Disaggregation decides whether one pool of machines handles both phases or two do, which changes how you bin hardware. Load balancing decides whether expensive accelerators sit idle behind a hot shard.
Then there is the floor. DeepSeek calls the smallest efficient deployment 64 accelerators for prefill and another 64 for decoding; its benchmarks used 4 SM100s for prefill and 64 for decode, each within one scale-up domain. You are not standing this up on eight rented GPUs with three services still unwritten.
The production numbers, and what they do not prove
DeepSeek's deployment notes put one cluster at 155 trillion tokens a day. It also published live V4.1-Flash figures: average first-token latency of 400 milliseconds, generation at 230 tokens a second, 300 on code, and that 96% cache hit rate. These make the pricing plausible, and they are the ones to use when you argue about serving cost with your finance team.
They are also self-reported. No independent benchmark existed at publication, and every performance chart was measured by DeepSeek on DeepSeek hardware with DeepSeek's traffic. A 96% hit rate comes from a consumer product where millions of sessions open with the same system prompt and agent loops resend the same long prefix; your traffic may look nothing like it. Averages hide the tail, and a serving decision needs the tail.
The useful reading is narrower than the headline. If your bill is dominated by output tokens on long-context agent traffic, this release tells you what to ask a serving vendor about, in order of effect: prefix caching, speculative decoding, prefill shortening. That list is public now, whoever you buy serving from.
If you are weighing it up, work through this order
- Confirm the model. If V4.1-Flash is not the model you serve, DeepInfer is a reading assignment, for the reasons in picking a model by task rather than by leaderboard: the engine exists for one checkpoint.
- Confirm the accelerators. SM100 or Ascend 950. If your fleet is Hopper, stop here and wait for a port.
- Confirm your reproducibility needs. Batch-invariant and deterministic sampling are Nvidia only.
- Confirm the scale. Below a hundred accelerators you are running a science project around an engine that assumes a serving platform. Cost the missing services too: a cache tier, disaggregation and cross-replica balancing are headcount, not flags.
- Check the jurisdiction. US federal civilian agencies were ordered off DeepSeek products in October 2026. If you sell to that market, read the order before it reaches your funnel, and take advice rather than mine.
The October roundup on this site covers the model side of the same fortnight, if you want the wider picture behind the rest of that month's AI releases.
FAQ
Does DeepInfer run on H100 or H200 GPUs?
No. The README lists Nvidia SM100 and Huawei Ascend 950, and Hopper is not on either list. The kernels it depends on, FlashMLA and DeepGEMM among them, are written for the newer generation, so support means porting them rather than flipping a flag. If your capacity is H100, this release does not apply yet, and no timeline is published.
Is DeepInfer free to use commercially?
The framework is Apache 2.0, which permits commercial use, modification and redistribution as long as you keep the licence and notices. The licence is the least of it: the V4.1-Flash weights carry their own terms, and the KV cache, disaggregation and load-balancing layers are yours to write. Free code is not a free service.
How does DeepInfer compare with vLLM, SGLang or TensorRT-LLM?
There is no independent comparison yet, and DeepSeek does not claim one. DeepInfer began as a vLLM fork and borrows from the other two, but it is narrower: one model on two accelerator families, tuned for that model, while the general engines serve many models across many GPU generations. Serve more than one model and the general engine is still right.
Next week, price the gap rather than the engine. Take your V4.1-Flash traffic, list the three services the README omits, and mark each as "we have it", "we can build it in a quarter" or "we cannot". If most land in the third column, this release changed what you know about serving cost, not what you run. If you buy anything through this site, the label comes first and the disclosure page sets the terms.
Two companion pieces on this site: what the four demo projects on the V4.1-Flash-1017 page actually show, and why that launch page leads with the Forbidden City instead of a benchmark.