Chinese AI lab DeepSeek has open-sourced DeepInfer, the software it uses to run its own models at scale. The code went up on GitHub on 20 October 2026 under the Apache 2.0 licence. According to its README, “DeepInfer is the high-performance inference framework that powers DeepSeek’s large-scale production services.”
The release is narrower than that description might suggest. DeepSeek says it “provides offline inference with the core features needed for serving at scale”, but the parts that make a full serving system, including the cache and load balancing, are held back. It currently supports a single model, DeepSeek-V4.1-Flash, on two kinds of hardware: NVIDIA SM100 GPUs and Huawei Ascend 950 NPUs. By 28 October the repository had more than 23,000 stars on GitHub.
What DeepInfer includes
Inference is the work of running a trained model to produce answers. The README lists the features in this release:
- Optimised kernels, model and sampler runtime
- Parallelism: attention DP / balanced CP, MoE EP + EPLB
- DSpark and confidence-scheduled verification
- SWA bounded replay
- Asynchronous scheduling (a “zero-overhead batch scheduler”)
- Batch-invariant inference and deterministic sampling
- Structured outputs
The optimised kernels draw on DeepSeek’s own open-source libraries, including FlashMLA, DeepGEMM and DeepEP, plus TileKernels, DeepSelect and custom TileLang kernels. DSpark and confidence-scheduled verification “accelerate decoding with draft tokens and use confidence estimates to schedule verification”, with a default maximum draft length of five.
Two features target reproducibility. Batch-invariant inference is meant to “keep model results identical across different batch compositions”, while deterministic sampling aims to “produce identical outputs for identical input tokens and sampling parameters”. The README marks both as “NVIDIA only”. Structured outputs can constrain generation to a regex, JSON schema or EBNF grammar.
Three pieces are left out
DeepSeek is explicit about the gaps. Under the heading “Required for a complete inference service (not included in this release)”, the README lists “a KV cache system”, “VE/Prefill/Decode disaggregation (most required engine functionality is already implemented)” and “load balancing across data-parallel replicas for both prefill and decode”.
The KV cache stores intermediate results so they do not have to be recomputed, and disaggregation splits the compute-heavy prefill stage from the decode stage across different machines. In a deployment Q&A published in the same repository, DeepSeek explains why: the KV cache management and load-balancing components “are tightly coupled to our internal infrastructure, so that code is not yet fully open-sourced.” It points readers to a Zhihu blog post that describes their design instead.
How DeepSeek runs it in production
The Q&A gives a rare look at the production system. DeepSeek says the V4.1 Flash service was built around three goals: running on accelerators from several vendors, using “ordinary 8-GPU machines for prefill, ordinary 64–128-GPU supernodes for decode”, and retaining the KV cache for more than 72 hours so that repeated prompts need not be recomputed. The cache sits on DeepSeek’s 3FS distributed file system, which it says provides roughly 100 PiB of SSD storage, with cached data kept for three days for agent traffic and seven days for chatbot traffic.
The headline claim is about scale: “A single cluster currently serves 155 trillion tokens per day, with overall revenue of US$38 per GPU-hour (at valley pricing),” DeepSeek writes, valley pricing being its off-peak rate. It says the smallest efficient deployment is 64 GPUs for prefill plus 64 for decode, and that its load balancing reaches roughly 80% of a perfectly balanced offline benchmark. These are DeepSeek’s own figures and have not been independently checked.
Alongside DeepInfer, DeepSeek released deepseek-recipe, which converts between common API formats and model tokens. The Hugging Face model card describes it as Rust libraries with Python bindings, and says the V4.1-Flash-1017 weights are under the MIT licence with a one-million-token context window. DeepSeek adds that inference code for future models “will continue to be open-sourced in DeepInfer”.
Hardware, set-up and benchmarks
Prerequisites are Linux, GCC 13.0 or later, Python 3.12, and either CUDA 13 for NVIDIA or CANN 9.2 for Ascend. The default checkpoint, DeepSeek-V4.1-Flash-1017, is downloaded from Hugging Face on first run. The README does not compare performance between NVIDIA and Ascend; its benchmark charts were “measured on 4 SM100 GPUs for prefill and 64 for decode”, and it provides a script for others to reproduce them. “DeepInfer was originally built primarily on vLLM, with additional inspiration from SGLang and TensorRT-LLM,” the README says.
DeepSeek is publishing the engine, not the operations
The split DeepSeek has drawn is telling. The kernels, schedulers and sampling code are released; the cache, routing and disaggregation that turn an engine into a service stay inside the company. That is the line between software anyone can study and the operational know-how that makes 155 trillion tokens a day affordable. A team picking up DeepInfer today gets a strong reference implementation for one model on two kinds of chip, but would still need to build the storage and balancing layers that DeepSeek describes only in prose. Ascend support stands out: it gives Huawei hardware a documented, production-grade path for a leading open model at a time when DHS has ordered DeepSeek products out of US civilian agency systems, so the code’s audience may be shaped by geography as much as engineering.
A production number that others can test
DeepSeek’s revenue figure of US$38 per GPU-hour comes without costs, so it says nothing about margins. What the release does provide is a benchmark script and published charts, which means outside teams can measure how close they get on their own hardware. That is a more useful check than any headline throughput claim. Other labs are already building on DeepSeek’s open work: Baidu says its Unlimited-OCR document models set out to push DeepSeek-OCR “one step further”. If future DeepSeek models really ship their inference code here first, DeepInfer becomes the place to watch for how each one is meant to run.
Sources
- GitHub: deepseek-ai/DeepInfer, README, 20 October 2026
- GitHub: DeepSeek V4.1 Flash Inference Deployment Q&A (DeepInfer docs)
- Hugging Face: deepseek-ai/DeepSeek-V4.1-Flash-1017 model card
Get TSN’s biggest tech stories, explained.
News and insights across AI, tech, crypto and cybersecurity. Every source linked. Unsubscribe anytime.
Get the newsletterRelated stories
- Baidu Releases ERNIE 5.5 Flash Preview on the Qianfan API
- DeepSeek Releases DeepSeek-V4.1-Flash-1017 Open-Weight Update
- China Protests as DHS Orders DeepSeek Out of US Civilian Agency Systems
- Baidu Releases Unlimited-OCR 2 for Documents Hundreds of Pages Long
Follow @tsnmediahub on X for breaking AI news as it happens.
Follow on X





