DeepInfer

The engine behind DeepSeek's own production serving, opened up for teams with NVIDIA or Ascend chips

DeepInfer: High-performance, large-scale inference framework for DeepSeek models

Category
AI models & inference
Audience
Data & ML
Language
Python
Licence
Apache-2.0

Updated

DeepInfer is an inference framework for serving DeepSeek's large language models on your own accelerators, released by DeepSeek as the same engine that runs its production service. It is aimed at infrastructure and ML engineers who already host DeepSeek weights on a GPU fleet and want the serving stack the model was tuned against instead of a general-purpose engine they have to tune themselves. Anyone looking for a chat app, or for one runtime that serves a mixed model zoo, should keep walking: this is a Python serving layer, first pushed on October 16, 2026, and it currently supports exactly one checkpoint.

What it does

DeepInfer loads a DeepSeek checkpoint and runs inference on it with the optimizations DeepSeek uses internally. The README lists the feature set:

  • Optimized kernels plus a tuned model and sampler runtime
  • Parallelism: attention data parallelism, balanced context parallelism, and mixture-of-experts expert parallelism with EPLB load balancing
  • DSpark with confidence-scheduled verification, which accelerates decoding with draft tokens
  • Sliding-window-attention bounded replay in the decoder
  • Asynchronous, zero-overhead batch scheduling
  • Batch-invariant inference and deterministic sampling
  • Structured outputs, which lock generation to a schema

Two of those deserve a plain-English note. Batch-invariant inference means a request returns the same result no matter which other requests happen to be batched alongside it, which is normally the thing that makes GPU serving irreproducible. Deterministic sampling builds on that: identical input tokens with identical sampling parameters produce identical output. DeepSeek marks batch invariance as NVIDIA only.

The README calls this release offline inference with the core features needed for serving at scale, so read it as the engine, not as a finished hosted API product.

How it works

Most of the speed comes from kernels DeepSeek had already published as separate repositories: FlashMLA, DeepGEMM, DeepEP, TileKernels and DeepSelect, plus custom TileLang kernels inside this tree. DeepInfer is the layer that assembles them with the parallelism and scheduling strategy, and the README is explicit that these are the same kernels and parallelism from the production stack.

Features are switched on through environment variables. DEEPINFER_ENABLE_MTP_VARLEN=1 enables draft-token decoding, DEEPINFER_USE_NEXTN_DECODE caps the draft length (default 5), DEEPINFER_YOCO_PREFILL_TRUNCATION_MODE=compact with DEEPINFER_YOCO_PREFILL_KEEP_TOKENS=140 are the stated defaults for V4.1 bounded replay, and DEEPINFER_BATCH_INVARIANT=1 turns on batch invariance. Asynchronous scheduling is on by default. Bounded replay carries one constraint worth respecting: the retained suffix must cover the sliding-window attention window plus the maximum backtracking length.

One honest gap: there are no numbers. "High-performance" is DeepSeek's own description of its own stack, not an independent measurement, and nothing on the repository's front page quantifies throughput, latency or a speedup over anything else.

Getting started

Hardware is the gate. According to the coverage of this release, DeepInfer runs only on NVIDIA SM100 class chips or Huawei Ascend accelerators, and no other hardware is supported yet. The project does not list an operating system, a VRAM floor or a minimum node count, so size the deployment from the model rather than from a stated requirement.

Cost works out like this: the framework itself is free under Apache-2.0, and no API key or subscription is involved anywhere. What you pay for is the hardware and the power to run it, because you are hosting a large DeepSeek model yourself. The weights are not in this repository either; DeepSeek-V4.1-Flash is downloaded separately.

The code lives at github.com/deepseek-ai/DeepInfer and is a plain git clone, with no installer or separate release build. The saved README cuts off before the install commands, so follow the repository's own setup instructions rather than any one-line recipe quoted elsewhere.

When to use it / when not

The main catch is narrowness in two directions at once: one supported model, DeepSeek-V4.1-Flash, on two chip families. Everything else has to wait for upstream support.

Use it instead of a general-purpose engine such as vLLM or SGLang when you are serving DeepSeek-V4.1-Flash on supported chips and you specifically need reproducible output, schema-constrained generation, or the expert-parallel setup DeepSeek runs in production. Don't use it if your fleet is consumer NVIDIA cards, AMD or Apple Silicon, if you need Llama, Qwen or Mistral served by the same runtime, or if you want something settled: the repository was created on October 16, 2026 and last pushed four days later, with 9,350 stars and 811 forks on a tree that is days old.

Alternatives

The realistic comparison is the engine you already run. vLLM and SGLang serve many model families across more hardware and have years of deployment behind them, at the price of not being the exact stack a DeepSeek model was tuned on. If you only want the fast pieces, the kernel repositories (FlashMLA, DeepGEMM, DeepEP) are separately usable inside another runtime.

Take DeepInfer seriously if you run DeepSeek-V4.1-Flash in production on SM100 or Ascend hardware and the gap between your throughput and DeepSeek's own bothers you, or if you are a researcher who needs bit-identical results across batch compositions, which very few serving stacks offer at all. Everyone else is better off watching: the engineering is public and the license is permissive, but with one model and two chip families supported, this is a release for a specific fleet rather than a general upgrade.

More in AI models & inference

All of AI models & inference →