{"slug": "deepseek-just-open-sourced-its-inference-engine", "title": "DeepSeek just open-sourced its inference engine", "summary": "DeepSeek open-sourced DeepInfer, the inference framework it uses for large-scale production serving, under the Apache License 2.0. The release supports only the DeepSeek-V4.1-Flash model and runs on NVIDIA SM100 GPUs and Huawei Ascend 950 NPUs, with features including FlashMLA, DeepGEMM and DeepEP kernels, MoE expert parallelism with EPLB, DSpark speculative decoding with confidence-scheduled verification, batch-invariant inference and deterministic sampling (both NVIDIA-only), and regex/JSON-schema/EBNF structured outputs. DeepSeek said a complete inference service still requires a KV cache system, prefill/decode disaggregation and load balancing across data-parallel replicas, none of which are included.", "body_md": "DeepInfer is the high-performance inference framework that powers DeepSeek's large-scale production services. This open-source release provides offline inference with the core features needed for serving at scale.\n\nSupported models:\n\n- DeepSeek-V4.1-Flash\n\nSupported features:\n\n- Optimized kernels, model and sampler runtime\n- Parallelism: Attention DP / balanced CP, MoE EP + EPLB\n- DSpark and confidence-scheduled verification\n- SWA bounded replay\n- Asynchronous scheduling (zero-overhead batch scheduler)\n- Batch-invariant inference\n- Deterministic sampling\n- Structured outputs\n\n## Feature details and configuration\n\n- **Optimized kernels:**[FlashMLA](https://github.com/deepseek-ai/FlashMLA) ,[DeepGEMM](https://github.com/deepseek-ai/DeepGEMM) ,[DeepEP](https://github.com/deepseek-ai/DeepEP) ,[TileKernels](https://github.com/deepseek-ai/TileKernels) ,[DeepSelect](https://github.com/deepseek-ai/DeepSelect) , and custom[TileLang kernels](https://github.com/deepseek-ai/DeepInfer/blob/main/deepinfer/model_executor/layers/tilelang_ops) .\n- **DSpark and confidence-scheduled verification:** accelerate decoding with draft tokens and use confidence estimates to schedule verification. Set`DEEPINFER_ENABLE_MTP_VARLEN=1` ;`DEEPINFER_USE_NEXTN_DECODE` controls the maximum draft length (default: 5).\n- **Decoder SWA bounded replay:** reduce decoder prefill work by replaying only a bounded suffix. Set`DEEPINFER_YOCO_PREFILL_TRUNCATION_MODE=compact` and`DEEPINFER_YOCO_PREFILL_KEEP_TOKENS=140` for the default V4.1 settings; the retained suffix must cover the SWA window plus the maximum backtracking length.\n- **Asynchronous scheduling:** overlap CPU batch scheduling with device execution. Enabled by default.\n- **Batch-invariant inference:** keep model results identical across different batch compositions. Enable with`DEEPINFER_BATCH_INVARIANT=1` (NVIDIA only).\n- **Deterministic sampling:** produce identical outputs for identical input tokens and sampling parameters. Set`DEEPINFER_BATCH_INVARIANT=1 DEEPINFER_ENABLE_MTP_VARLEN=0` and pass a fixed`seq_seed` to`SamplingParams` (NVIDIA only).\n- **Structured outputs:** constrain generation to a regex, JSON schema, or EBNF grammar. Pass`so_args={\"schema_type\": ..., \"schema\": ...}` to`SamplingParams` ; see[examples](https://github.com/deepseek-ai/DeepInfer/blob/main/examples/_structured_output.py) .\n\nSupported hardware:\n\n- NVIDIA SM100 GPUs\n- Huawei Ascend 950 NPUs\n\nRequired for a complete inference service (not included in this release):\n\n- A KV cache system\n- VE/Prefill/Decode disaggregation (most required engine functionality is already implemented)\n- Load balancing across data-parallel replicas for both prefill and decode\n\n- Linux\n- GCC >= 13.0\n- Python 3.12\n- CUDA 13 (NVIDIA only)\n- CANN 9.2 (Ascend only)\n\nBefore building DeepInfer, please create and activate an empty Python 3.12 environment.\n\n```\n# Use `ascend` instead for the Ascend platform\n# Keep it exported in the environment where you run DeepInfer\nexport DEEPINFER_ACCELERATOR=nvidia\n./build.sh\n```\n\nThe default checkpoint, [`deepseek-ai/DeepSeek-V4.1-Flash-1017`](https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017), is\ndownloaded into the Hugging Face cache on the first run; set `DEEPINFER_HF_MODEL_DIR=/path/to/DeepSeek-V4.1-Flash-1017` to\nrun from a local copy instead.\n\n```\npython examples/offline_inference.py\n```\n\nSee [examples](https://github.com/deepseek-ai/DeepInfer/blob/main/examples/README.md) for details.\n\n| Prefill | Decode | \n|---|---|\n\nMeasured on 4 SM100 GPUs for prefill and 64 for decode — each within one scale-up domain. To reproduce the benchmarks, see [run_sweep.sh](https://github.com/deepseek-ai/DeepInfer/blob/main/examples/sweep/run_sweep.sh).\n\nSee [eval/README.md](https://github.com/deepseek-ai/DeepInfer/blob/main/eval/README.md).\n\nDeepInfer is released under the Apache License 2.0. See [LICENSE](https://github.com/deepseek-ai/DeepInfer/blob/main/LICENSE) for details.\n\nDeepInfer was originally built primarily on [vLLM](https://github.com/vllm-project/vllm), with additional inspiration from [SGLang](https://github.com/sgl-project/sglang) and [TensorRT-LLM](https://github.com/NVIDIA/TensorRT-LLM). We thank their developers.\n\n```\n@misc{deepinfer2026,\n  title = {DeepInfer: High-performance, large-scale inference framework for DeepSeek models},\n  author = {DeepSeek-AI},\n  year = {2026},\n  publisher = {GitHub},\n  howpublished = {\\url{https://github.com/deepseek-ai/DeepInfer}},\n}\n```\n\n", "url": "https://wpnews.pro/news/deepseek-just-open-sourced-its-inference-engine", "canonical_source": "https://github.com/deepseek-ai/DeepInfer", "published_at": "2026-10-20 09:08:54+00:00", "updated_at": "2026-10-20 09:17:03.425335+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-infrastructure", "ai-tools", "developer-tools"], "entities": ["DeepSeek", "DeepInfer", "DeepSeek-V4.1-Flash", "FlashMLA", "DeepGEMM", "DeepEP", "NVIDIA", "Huawei"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/deepseek-just-open-sourced-its-inference-engine", "markdown": "https://wpnews.pro/news/deepseek-just-open-sourced-its-inference-engine.md", "text": "https://wpnews.pro/news/deepseek-just-open-sourced-its-inference-engine.txt", "jsonld": "https://wpnews.pro/news/deepseek-just-open-sourced-its-inference-engine.jsonld"}}