USMarkTechPost10-20 22:31

DeepSeek Open-Sources DeepInfer, the Inference Framework Behind DeepSeek-V4.1-Flash

DeepSeek has open-sourced DeepInfer, the inference framework that runs its production services. The DeepSeek DeepInfer inference framework is the engine behind DeepSeek-V4.1-Flash. It ships under the Apache 2.0 license. DeepSeek also released deepseek-recipe, its MIT-licensed token encoding and decoding layer. For developers, this is a rare look at a frontier lab’s real serving stack.

DeepInfer is a high-performance inference engine from DeepSeek for its own models. According to it’s GitHub README, it powers DeepSeek’s large-scale production services. This release covers offline inference with the core features needed at scale. It was originally built primarily on vLLM, with ideas from SGLang and TensorRT-LLM.

The deployment Q&A gives production context. A single cluster serves 155 trillion tokens per day. DeepSeek reports overall revenue of US$38 per GPU-hour at valley pricing.

The engine stacks DeepSeek’s kernels: FlashMLA, DeepGEMM, DeepEP, TileKernels, DeepSelect and custom TileLang kernels. On top sit 5 system-level ideas.

Attention uses data parallelism. The MoE layers use expert parallelism with an expert-parallel load balancer (EPLB). Decode runs EP64 to EP128 inside a supernode. Prefill uses the smallest EP that memory allows, typically EP2 to EP8.

A draft model proposes 5 tokens per step. A Confidence Head predicts each draft token’s acceptance rate. The scheduler then verifies only the most valuable prefix. Per the Q&A, this cuts verified draft tokens by about 30% (5.00 to 3.2 to 4.4). Accepted length barely moves (3.29 vs 3.20).

On a cache hit, DeepInfer recomputes only the last 128 tokens of sliding-window attention state. That makes recomputation cost constant, regardless of context length. In the decoder layers, DeepSeek says this nearly halves total prefill compute.

CPU batch scheduling overlaps with GPU execution, so the GPU never idles between steps. Batch-invariant inference and deterministic sampling are available on NVIDIA only. Structured outputs support regex, JSON schema and EBNF grammars.

DeepSeek publishes Pareto curves for DeepSeek-V4.1-Flash at 131,072 context. Prefill ran on 4 SM100 GPUs; decode ran on 64. Figures below are read from those charts and are self-reported.

DSpark’s dynamic verification adds 4% to 7% throughput at about 60 sequences per rank. At 16 sequences per rank it is 1.5% slower than fixed 5-token verification.

A full service still needs a KV cache system and VE/Prefill/Decode disaggregation. It also needs load balancing across data-parallel replicas. DeepSeek team states that those components are tightly coupled to internal infrastructure.

Hardware is narrow. Builds require Linux, GCC 13 or later, Python 3.12, and CUDA 13 or CANN 9.2. The smallest efficient production unit is 64 prefill GPUs plus 64 decode GPUs. The internal FlashMLA decoding kernel is 5% to 10% faster than the public one. End-to-end, DeepSeek puts the gap at 5% or less.

Check out the GitHub repo, deployment Q&A, deepseek-recipe and the model card. All credit goes to the researcher of this project. Also, feel free to follow us on Twitter and don’t forget to join our 150k+ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.

Asif Razzaq is the CEO of Marktechpost AI Media Inc.. As a visionary entrepreneur and engineer, Asif is committed to harnessing the potential of Artificial Intelligence for social good. His most recent endeavor is the launch of an Artificial Intelligence Media Platform, Marktechpost, which stands out for its in-depth coverage of machine learning and deep learning news that is both technically sound and easily understandable by a wide audience. The platform boasts of over 2 million monthly views, illustrating its popularity among audiences.

Datalab Releases OmniParseBench: An Open OCR Benchmark With 16,288 Pass/Fail Tests

The newsletter 70,000+ AI builders read. Model releases, tools and research, without the hype.

Practitioner-first AI/ML news and analysis, read by 1M+ developers and researchers every month.