Skip to content
AI Learning Ground Start learning

News ·

DeepSeek just open-sourced its inference engine

DeepSeek has open-sourced DeepInfer, the inference engine behind its production services, under Apache 2.0, with offline inference, optimized kernels, parallelism, scheduling, and reproducibility features for DeepSeek models.

DeepInfer: High-performance, large-scale inference framework for DeepSeek models - deepseek-ai/DeepInfer
Image: Hacker News

DeepSeek released DeepInfer, the high-performance inference framework that powers its large-scale production services, as open source under the Apache License 2.0. The release covers offline inference with core features needed for serving at scale, using the DeepSeek-V4.1-Flash-1017 checkpoint by default.

The engine includes parallelism support such as attention DP with balanced CP and MoE expert parallelism with EPLB, plus an asynchronous scheduler that overlaps CPU scheduling with device execution. Optimized kernels include FlashMLA, DeepGEMM, DeepEP, TileKernels, DeepSelect, and custom TileLang kernels. Speculative decoding is handled through DSpark with confidence-scheduled verification, and decoder SWA bounded replay cuts prefill work by replaying only a bounded suffix. Features like batch-invariant inference, deterministic sampling, and structured outputs via regex, JSON schema, or EBNF grammar are controlled through environment variables and SamplingParams. It also supports Huawei Ascend 950 NPUs on aarch64 hosts. A performance update adds optimizations for Ascend 950DT NPUs and decode gains on SM100 GPUs, with benchmarks using 4 to 64 GPUs/NPUs per configuration.

The project was originally built primarily on vLLM, with inspiration from SGLang and TensorRT-LLM. Notably, the release does not include everything needed for a complete inference service: VE/prefill/decode disaggregation and load balancing across data-parallel replicas are not part of this release, though most disaggregation engine functionality is implemented.

For builders, this exposes the same engine serving DeepSeek's production traffic, making it possible to run DeepSeek models with tuned kernels, speculative decoding, and reproducible, batch-invariant behavior. It supports NVIDIA GPUs (CUDA 13.2+) and Ascend NPUs, requires a Python 3.12 environment, and downloads the default checkpoint from Hugging Face or can point to a local copy via DEEPINFER_HF_MODEL_DIR.

References

Read the full story at Hacker News ↗Like, save or discuss on Buzz

#community #signals