DeepInfer is a high-performance inference framework open-sourced by DeepSeek, used to support DeepSeek's large-scale production services. According to the official description, this open-source release provides offline inference capabilities and includes the core features required for large-scale serving.
-
Purpose DeepInfer is positioned as a high-performance, large-scale inference framework for DeepSeek models. The open-source release provides offline inference and covers several core capabilities needed in large-scale serving; a complete inference service also depends on some components not included in this release.
-
Supported models The currently supported model is DeepSeek-V4.1-Flash. Offline inference uses the checkpoint by default: deepseek-ai/DeepSeek-V4.1-Flash-1017, which will be downloaded to the Hugging Face cache on first run; to run from a local copy, set DEEPINFER_HF_MODEL_DIR=/path/to/DeepSeek-V4.1-Flash-1017.
-
Main capabilities
-
Optimized kernels, model and sampler runtime.
-
Parallel strategies: Attention DP / balanced CP, MoE EP + EPLB.
-
DSpark and confidence-scheduled verification: use draft tokens to accelerate decoding, and use confidence estimation to schedule verification. DEEPINFER_ENABLE_MTP_VARLEN=1 must be set; DEEPINFER_USE_NEXTN_DECODE controls the maximum draft length (default: 5).
-
Decoder SWA bounded replay: reduce decoder prefill work by replaying only a bounded suffix. The default V4.1 settings require setting DEEPINFER_YOCO_PREFILL_TRUNCATION_MODE=compact and DEEPINFER_YOCO_PREFILL_KEEP_TOKENS=140; the retained suffix must cover the SWA window plus the maximum backtrack length.
-
Asynchronous scheduling: overlap CPU batch scheduling with device execution, enabled by default.
-
Batch-invariant inference: keep model results consistent across different batch compositions, can be enabled via DEEPINFER_BATCH_INVARIANT=1 enabled.
-
Deterministic sampling: produces identical outputs for the same input tokens and sampling parameters. Requires setting DEEPINFER_BATCH_INVARIANT=1 DEEPINFER_ENABLE_MTP_VARLEN=0, and passing a fixed seq_seed to SamplingParams.
-
Structured output: constrains generation to a regex, JSON schema, or EBNF grammar. Pass so_args={"schema_type": ..., "schema": ...} to SamplingParams; see examples for details.
IV. Optimized kernels Includes FlashMLA, DeepGEMM, DeepEP, TileKernels, DeepSelect, and custom TileLang kernels.
V. Supported hardware NVIDIA SM100 GPUs; Huawei Ascend 950 NPUs paired with aarch64 hosts.
VI. What a complete inference service requires but this release does not include A KV cache system; VE/Prefill/Decode disaggregation (most of the required engine functionality is already implemented); data-parallel replica load balancing for prefill and decode. The official guidance suggests consulting the inference deployment Q&A for production architecture and deployment details.
VII. 2026.11.28 update (DeepSeek-V4.1-Flash performance update) This update applies system optimizations for the Ascend 950DT NPU and achieves significant decode performance improvements on SM100 GPUs. Ascend 950DT NPU: adds fused attention, Mega Gate, Mega-MHC, FP8 einsum output, native DeepSelect, batch-invariant inference, and deterministic sampling; uses UDMA to optimize EPLB expert shuffling, and uses hugepages to optimize KV cache allocation. Runtime: captures target sampling and verification in the device graph and combines them with fused pinned-host I/O, overlaps prefill post-processing with model execution, and optimizes CP, SWA, EPLB, and startupprocesses. Vision encoder: fuses GEMM epilogue on NVIDIA GPUs, and optimizes image metadata preparation and downsampling. Benchmarks: adds Ascend 950DT, and refreshes SM100 prefill and decode results.
VIII. Usage Build requirements: CUDA >= 13.2 (NVIDIA only); CANN 9.3 (Ascend only). The official instructions state that before building DeepInfer from source, you should create and activate an empty Python 3.12 environment. Offline inference: the default checkpoint (deepseek-ai/DeepSeek-V4.1-Flash-1017) is downloaded to the Hugging Face cache on first run; you can set DEEPINFER_HF_MODEL_DIR=/path/to/DeepSeek-V4.1-Flash-1017 to use a local copy instead. See examples for more details. The materials do not provide the specific build and run command text.
IX. Performance and evaluation benchmarks SM100 benchmarks use 4 GPUs for prefill and 64 for decode; Ascend 950 benchmarks use 8 NPUs for prefill and 64 for decode. Each configuration runs within a single scale-up domain. For sweep instructions to reproduce the benchmarks and for the evaluation benchmarks, refer to the relevant documentation and eval/README.md respectively.
X. License and acknowledgments DeepInfer is released under the Apache License 2.0; see LICENSE for details. DeepInfer was initially built primarily on vLLM, and drew inspiration from SGLang and TensorRT-LLM; the official team thanks the above developers.
XI. Limitations The KV cache system, VE/Prefill/Decode disaggregation, and data-parallel replica load balancing required for a complete inference service are not within the scope of this release; apart from the models, hardware, features, and environment variables listed above, other functionality, pricing, platforms, or usage steps are not yet provided in the materials.