Skip to content
AI.info

The Pulse

DeepSeek opens production inference code for Huawei Ascend

DeepSeek has made production-grade DeepInfer inference code for Huawei Ascend available as open source. The public release supports offline inference, while a complete service requires additional components.

DeepSeek opens production inference code for Huawei Ascend

DeepSeek has made production-grade inference code for Huawei Ascend available as open source through its DeepInfer framework, PANews reported on December 1. The repository describes DeepInfer as the framework behind DeepSeek’s large-scale production services.

The public release provides offline inference rather than everything needed to run a complete online service. It supports the DeepSeek-V4.1-Flash model on Huawei Ascend 950 NPUs with aarch64 hosts and NVIDIA SM100 GPUs.

Ascend performance work

A November 28 performance update listed changes for Ascend 950DT NPUs, including fused attention, Mega Gate, Mega-MHC, FP8 einsum output and native DeepSelect. It also added batch-invariant inference and deterministic sampling for that hardware.

The update also optimized expert shuffling for expert-parallel load balancing using UDMA, and KV cache allocation using hugepages. Other runtime changes included capturing target sampling and verification in device graphs, with fused pinned-host input and output, and overlapping prefill post-processing with model execution.

DeepSeek disclosed online figures for DeepSeek V4.1 Flash on the Ascend 950DT-PC16 UBL128 system, PANews reported. At an average input length of 98K tokens, the figures put P50 time to first token at 277 milliseconds and single-stream output speed at 138 tokens per second.

The reported revenue figure was 118 yuan per card per hour, calculated at off-peak pricing. PANews also reported DeepSeek’s statement that the system was handling large-scale user traffic in production.

What the framework includes

The framework includes distributed inference features for attention and mixture-of-experts workloads, as well as expert-parallel load balancing. Its DSpark feature uses draft tokens and confidence estimates to schedule verification during decoding.

Another feature, decoder SWA bounded replay, limits prefill work by replaying a bounded suffix. The retained suffix must cover the SWA window and the maximum backtracking length.

An asynchronous scheduler overlaps CPU batch scheduling with execution on the device and is enabled by default. The release also supports structured outputs constrained by a regular expression, JSON schema or EBNF grammar.

Batch-invariant inference can keep model results identical across different batch compositions. Deterministic sampling requires that mode, the disabling of variable-length multi-token prediction and a fixed sequence seed.

What an online service still needs

The repository lists a KV cache system, disaggregation of vision encoder, prefill and decode work, and load balancing across data-parallel replicas as requirements not included in the release. Most of the engine functionality needed for disaggregation is already implemented.

In a deployment Q&A, DeepSeek says its cache management and load-balancing components are tightly coupled to internal infrastructure and have not yet been fully open-sourced. The document describes its production architecture, including separate resources for vision encoding, prefill, decode and storage.

DeepInfer requires Linux, GCC 13.0 or later and Python 3.12. Ascend builds require CANN 9.3, while NVIDIA builds require CUDA 13.2 or later. The code is released under the Apache License 2.0.

Sources

  1. Original source DeepSeek “GitHub - deepseek-ai/DeepInfer: DeepInfer: High-performance, large-scale inference framework for DeepSeek models” github.com

Other pages read

  1. PANews “DeepSeek、Ascend(昇騰)プラットフォーム向けDeepInferの本番環境用推論コードをオープンソース化” panewslab.com
  2. DeepSeek · Inference deployment qa github.com

In the tracker

Related stories

Explore

More articles