{"slug": "deepseek-deepinfer-on-huawei-ascend-production-code-open-sourced-dec-2026", "title": "DeepSeek DeepInfer on Huawei Ascend: Production Code Open-Sourced Dec 2026", "summary": "DeepSeek open-sourced its DeepInfer production inference framework for Huawei Ascend NPUs on December 1, 2026, publishing an Apache-2.0 repository on GitHub with Ascend 950 support, CANN 9.3 prerequisites, and an offline inference path for DeepSeek-V4.1-Flash. The release includes a PlatformNPU class in deepinfer/platform.py, HCCL distributed backend wiring, and TileLang 'asc' backend selection, but the README explicitly lists gaps for a full serving stack: full KV cache, disaggregated serving, and replica load balancing are not shipped. DeepSeek's latency and revenue figures for production V4.1-Flash traffic, reported by National Business Daily and Yicai, are company claims rather than independent benchmarks.", "body_md": "**DeepSeek open-sourced production **DeepInfer** code for **Huawei Ascend** NPUs on **December 1, 2026**, posting an **Apache-2.0** drop on [**GitHub**](https://github.com/deepseek-ai/DeepInfer/?ref=explainx) with **Ascend 950** support, **CANN 9.3** prerequisites, and **DeepSeek-V4.1-Flash** offline inference.** Chinese outlets including [**National Business Daily**](https://www.nbd.com.cn/articles/2026-12-01/4664910.html?ref=explainx) and [** Yicai**](https://www.yicai.com/news/103463118.html?ref=explainx) quote DeepSeek on **latency and revenue** stats for **production V4.1-Flash traffic**—attribute those figures to **DeepSeek via press paraphrase**, not independent benchmarks.\n\n## TL;DR\n\n| Item | Detail | \n|---|---|\n| **Repo** | [deepseek-ai/DeepInfer](https://github.com/deepseek-ai/DeepInfer/?ref=explainx) | \n| **Hardware** | **Ascend 950** and**Nvidia SM100** | \n| **Model** | **DeepSeek-V4.1-Flash** offline path | \n| **Build flag** | `DEEPINFER_ACCELERATOR=ascend` +**CANN 9.3** | \n| **Not shipped** | Full **KV cache** ,**disaggregated serving** ,**replica LB** | \n\n## What changed from rumor to repository\n\nexplainx.ai tracked **DeepSeek–Huawei co-design** and [**950DT versus H200**](https://explainx.ai/blog/huawei-ascend-950dt-h200-inference-86-percent-leak-claimed-vs-verified-2026) stories as **claimed-vs-verified** threads. The **December 1** move is different: **inspectable code** in `deepinfer/platform.py` with a **PlatformNPU** class, **HCCL** distributed backend wiring, and **TileLang** `asc` backend selection.\n\nThe README states DeepInfer is the **high-performance framework behind DeepSeek production services** and that this open release provides **offline inference** with features needed **at scale**, while explicitly listing **gaps** for a **full serving stack**.\n\nThat honesty matters for SRE teams: you can **compile and run examples/offline_inference.py**, but you should not assume **multi-replica load balancing** ships today.\n\n## Ascend-specific engineering highlights\n\nA bridge between landmasses with green dots, illustrating dual-stack DeepInfer on Ascend and Nvidia\n\nThe [`platform.py`](https://github.com/deepseek-ai/DeepInfer/blob/main/deepinfer/platform.py?ref=explainx) module shows how DeepSeek maps **CUDA-style environment variables** onto **Ascend**:\n\n- Mirrors **`ASCEND_RT_VISIBLE_DEVICES`** into**` CUDA_VISIBLE_DEVICES`** when only Ascend IDs are set.\n- Sets **`TILELANG_DEFAULT_TARGET=ascend`** so TileLang does not auto-compile for CUDA on NPU hosts.\n- Configures **HCCL** buffer sizes and timeouts for multi-device runs.\n- Implements **host memory pinning** through Ascend**aclrtHostRegisterV2** APIs with explicit error handling.\n\nThese details are the kind of **integration glue** missing from **leaked benchmark decks**. Compare to [** DeepSeek DeepInfer earlier claimed-vs-verified coverage**](https://explainx.ai/blog/deepseek-deepinfer-open-source-inference-engine-v4-1-flash-155-trillion-tokens-claimed-vs-verified-2026) when the engine was **partially described** without full **Ascend platform** files.\n\n## Supported features in the README\n\nDeepInfer''s public feature list includes:\n\n- **FlashMLA** ,**DeepGEMM** ,**DeepEP** ,**TileKernels** ,**DeepSelect** , and custom**TileLang** kernels\n- **Attention DP** ,**balanced CP** ,**MoE EP + EPLB**\n- **DSpark** and**confidence-scheduled verification**\n- **SWA bounded replay** and**asynchronous scheduling**\n- **Batch-invariant** and**deterministic sampling** (noted**NVIDIA only** for some modes)\n- **Structured outputs** via regex, JSON schema, or EBNF in`SamplingParams`\n\nRead the collapsible **Feature details** section in the README before toggling **MTP varlen** flags—defaults affect **draft length** and **verification scheduling**.\n\n## Build and run path\n\nPrerequisites per README:\n\n| Component | Ascend path | Nvidia path | \n|---|---|---|\n| OS | Linux | Linux | \n| Compiler | GCC **≥ 13** | GCC **≥ 13** | \n| Python | **3.12** | **3.12** | \n| Accelerator stack | **CANN 9.3** | **CUDA 13.2+** | \n| Export | `DEEPINFER_ACCELERATOR=ascend` | `DEEPINFER_ACCELERATOR=nvidia` | \n\nRun `./build.sh`, then `python examples/offline_inference.py`. Default weights pull **` deepseek-ai/DeepSeek-V4.1-Flash-1017`** into the Hugging Face cache unless you set **` DEEPINFER_HF_MODEL_DIR`**.\n\nFor teams already serving **V4.1 Flash** on **Nvidia**, this is your **diff fork** to see which kernels diverge on **Ascend**.\n\n## Press-reported production stats\n\nNational Business Daily and Yicai say DeepSeek claimed:\n\n- **~98K token** average inputs in production\n- **277ms P50** time-to-first-token\n- **138 tokens/s** single-stream output\n- **About 118 yuan per card per hour** at off-peak pricing, per**National Business Daily''s** paraphrase of DeepSeek\n\n**Verify independently.** Vendor economics depend on **electricity tariffs**, **utilization**, and **batching** your deployment will not share. Use the stats as **signals that DeepSeek runs paid traffic on Ascend**, not as **SLA guarantees**.\n\n## Strategic context\n\nDeepSeek continues **dual-stack inference**:\n\n- **Nvidia SM100** for global and research paths documented in prior posts.\n- **Ascend 950** for**domestic sovereignty** and**Huawei co-design** narratives.\n\nU.S. export rules and [**Megaspeed enforcement week**](https://explainx.ai/blog/megaspeed-13-3-billion-nvidia-alibaba-reuters-december-2026) push Chinese labs to **prove domestic silicon** works for **frontier-class models**. Shipping **production code** is stronger evidence than **percentage-of-H200 slides**.\n\nPair with [**Tencent RiRoPE long-context kernels**](https://explainx.ai/blog/tencent-rirope-sparse-attention-long-context-github-2026) and [** Soket EKA-1 India weights**](https://explainx.ai/blog/soket-eka-1-indiaai-apache-weights-huggingface-december-2026) to see how **non-U.S. stacks** publish **weights + runtime** together.\n\n## What builders should do this week\n\n1. **Clone DeepInfer** on a**CANN 9.3** lab machine before procurement signs**Ascend-only** deals.\n2. **Diff `platform.py`** against your internal**CUDA inference** fork to estimate**porting cost** .\n3. **Read missing-feature list** —plan**KV** and**disaggregation** elsewhere until DeepSeek ships them.\n4. **Run parity tests** on**V4.1-Flash** prompts you already use on**vLLM** or**SGLang** .\n5. **Train staff** via[**AI builder workshops**](https://explainx.ai/workshops/ai-builder) if** Ascend** ops are new to your team.\n\n## Comparison table: open stacks on custom silicon\n\n| Stack | Dec 2026 signal | \n|---|---|\n| **DeepInfer on Ascend** | **Production code** +**V4.1-Flash** | \n| [**Huawei 950DT claims**](https://explainx.ai/blog/huawei-ascend-950dt-h200-inference-86-percent-leak-claimed-vs-verified-2026) | **Leak benchmarks** , not full runtime | \n| [**DeepSeek co-design story**](https://explainx.ai/blog/deepseek-huawei-chip-co-design-ascend-950dt-pre-training-claimed-vs-verified-2026) | **Strategic partnership** narrative | \n| [**KMed on premises**](https://explainx.ai/blog/naver-kmed-31b-medical-llm-on-premises-healthbench-november-2026) | **Domain model** sovereignty pattern | \n\n## Related reading\n\n## Environment variables and operational pitfalls\n\nThe **PlatformNPU** class enforces matching **`CUDA_VISIBLE_DEVICES`** and **` ASCEND_RT_VISIBLE_DEVICES`** when both are set. Mismatch raises **` RuntimeError`** early—better than **silent wrong-device** runs.\n\nOther defaults worth noting from [`platform.py`](https://github.com/deepseek-ai/DeepInfer/blob/main/deepinfer/platform.py?ref=explainx):\n\n- **`PYTORCH_NPU_ALLOC_CONF=expandable_segments:True`** to fight**fragmentation** .\n- **`TASK_QUEUE_ENABLE=0`** disables a queue path DeepSeek labels**temporary** on Ascend.\n- **`HCCL_BUFFSIZE=16`** and**timeouts** tuned for**large MoE** shards.\n\nSREs porting from **CUDA** should read warnings about **`transfer_to_npu`** remapping **` torch.cuda.*`** to **` torch.npu.*`**, which makes **` torch.cuda.is_available()`** true on **NPU-only hosts**—scripts that **branch on CUDA presence** may **lie** unless you set **`TILELANG_DEFAULT_TARGET=ascend`**.\n\n## Offline inference versus production serving gap\n\nThe README''s **missing pieces** matter for **capacity planning**:\n\n| Missing in open drop | Why production still needs it | \n|---|---|\n| **KV cache system** | **Long-context** sessions without**recompute** | \n| **Prefill/decode disaggregation** | **Cost-efficient****mixture-of-experts** serving | \n| **Replica load balancing** | **HA** and**autoscale** | \n\nDeepSeek''s **Chinese press quotes** describe **live V4.1-Flash traffic**—that stack presumably runs **closed components** atop this **open core**. Do not assume **GitHub clone equals DeepSeek.com SLA**.\n\n## Benchmarking responsibly on Ascend\n\nBefore repeating **277ms TTFT** or **138 tok/s**:\n\n1. Match **98K input** distribution or disclose your**shorter prompts** .\n2. Log **CANN driver versions** and**firmware** .\n3. Compare against **Nvidia SM100** path in the**same commit** using**`DEEPINFER_ACCELERATOR=nvidia`** .\n4. Cross-check [**Together compiler TPS claims**](https://explainx.ai/blog/together-compiler-agents-optimize-inference-1111-tps-minimax-1205-tps-deepseek-claimed-vs-verified-2026) methodology—vendor**TPS** depends on**batching** and**quantization** .\n\n## Integration with wider China AI stack\n\n**Ascend production code** complements:\n\n- [**Huawei substrate and HBM smuggling reporting**](https://explainx.ai/blog/huawei-ascend-960dt-customers-source-own-hbm-smuggled-memory-the-information-claimed-vs-verified-2026) for** supply realism** .\n- [**Malaysia GPU importer lists**](https://explainx.ai/blog/malaysia-us-nvidia-gpu-importer-list-parliament-december-2026) for** regional routing context** .\n- [**Soket EKA-1 Indian weights**](https://explainx.ai/blog/soket-eka-1-indiaai-apache-weights-huggingface-december-2026) as another** sovereign open-weight** pattern.\n\n## Troubleshooting first builds\n\nCommon failure modes when teams first run **`./build.sh`** on Ascend:\n\n- **GCC below 13** — README is explicit;**CentOS 7** default compilers fail.\n- **Python not 3.12** —**venv drift** from**3.10 notebooks** .\n- **CANN mismatch** —**9.2** required;**8.x clusters** need**upgrade windows** .\n- **Missing HF cache permissions** on**air-gapped mirrors** — set**`DEEPINFER_HF_MODEL_DIR`** to**internal artifact storage** .\n\nDocument **kernel module versions** in **runbooks** the same way [**Quixiai NVDriver posts**](https://explainx.ai/blog/quixiai-nvdriver-clean-room-rust-nvidia-linux-kernel-driver-2026) document **driver pinning** on **Linux AI nodes**.\n\n## When to choose Ascend versus Nvidia for DeepSeek\n\n| Choose **Ascend** when | Choose **Nvidia** when | \n|---|---|\n| **Policy** mandates**domestic accelerators** | You already standardized **CUDA 13 SM100** | \n| **Power tariffs** favor**local NPU deals** | You need **batch-invariant** sampling flags**NVIDIA-only** today | \n| You partner with **Huawei field teams** | You rely on **third-party vLLM** extensions**not yet ported** | \n\nThe **December 1** release narrows the **\"no code\"** argument but **does not erase** [**950DT leak benchmarks**](https://explainx.ai/blog/huawei-ascend-950dt-h200-inference-86-percent-leak-claimed-vs-verified-2026)—run your **own evals**.\n\n## Community and upstream expectations\n\nDeepInfer''s GitHub shows **hundreds of open issues**—expect **rapid iteration**. Pin **commits** in **production Dockerfiles**, not **`main` floating heads**.\n\nWatch **DeepSeek** announcements for **KV** and **disaggregation** modules; when they land, update **this post''s FAQ** via the **daily bot**, not **guesswork**.\n\nContributors should read [**DeepSeek V4.1 Flash benchmarks post**](https://explainx.ai/blog/deepseek-v4-1-flash-1017-open-weights-mit-terminal-bench-4-42-benchmarks-pricing-2026) before **claiming parity** with **frontier closed models** on **agent tasks**.\n\n## Structured outputs and agent hooks\n\nThe README documents **structured outputs** through `so_args` on **`SamplingParams`** with **regex**, **JSON schema**, or **EBNF** grammar constraints. That is the same **JSON-mode** surface agent frameworks expect from **OpenAI-compatible servers**.\n\nWhen you wire **DeepInfer** behind an **internal gateway**:\n\n1. Pin **`schema_type`** in**integration tests** —grammar mistakes fail at**compile** time, not**runtime** .\n2. Separate **NVIDIA deterministic sampling** flags from**Ascend** runs until**parity tables** exist in the README.\n3. Log **MoE expert load** if**EPLB** is enabled—**Ascend EP** paths differ from**CUDA** .\n\nFor **MoE-heavy** stacks, revisit [**Prime Mega MoE fused kernel**](https://explainx.ai/blog/prime-mega-moe-fused-kernel-training-qwen3-55-percent-faster-torchtitan-deepseek-mega-moe-backward-2026) training posts to see how **DeepSeek** thinks about **expert parallelism** upstream of **inference**.\n\n**Licensing note:** **Apache-2.0** allows **commercial forks**, but **model weights** remain under **their own licenses** on Hugging Face. Compliance teams should **not** conflate **inference engine** freedom with **weight redistribution** rights.\n\n**Hardware procurement:** If **Ascend 950** racks are **scarce** in your region, treat this repo as **software readiness** evidence while **supply** catches up—similar to how [**Israel AI factory GPU pledges**](https://explainx.ai/blog/nvidia-israel-200000-gpu-ai-factories-2030-buildout-2026) precede **physical install dates**.\n\n**Observability:** Export **HCCL timeout errors** and **TileLang compile failures** to the same **dashboard** you use for **CUDA OOM** today. **Ascend-first** teams often discover **silent fallbacks** only after **cost spikes** on **backup cloud APIs**.\n\n**Documentation debt:** Mirror the README''s **feature flags table** into your **internal wiki** with **owner teams**—** MTP varlen**, **YOCO prefill truncation**, and **batch-invariant** toggles interact in **non-obvious** ways during **agent** rollouts.\n\n**Workshop tie-in:** Teams new to **non-Nvidia serving** should pair this release with hands-on **inference labs** in explainx.ai **builder training** so **SRE and ML** share the same **build.sh** checklist.\n\nIf you want to use this at work, not just read about it, this is the fastest path.", "url": "https://wpnews.pro/news/deepseek-deepinfer-on-huawei-ascend-production-code-open-sourced-dec-2026", "canonical_source": "https://explainx.ai/blog/deepseek-deepinfer-huawei-ascend-production-code-december-2026?utm_source=rss&utm_medium=feed&utm_campaign=blog", "published_at": "2026-12-01 00:00:00+00:00", "updated_at": "2026-12-01 15:19:15.128564+00:00", "lang": "en", "topics": ["ai-infrastructure", "ai-chips", "large-language-models", "ai-tools", "developer-tools"], "entities": ["DeepSeek", "Huawei", "Ascend 950", "DeepInfer", "DeepSeek-V4.1-Flash", "CANN 9.3", "TileLang", "GitHub"], "also_reported_by": [], "takeaway": "Build DeepInfer for Ascend with DEEPINFER_ACCELERATOR=ascend and CANN 9.3 on GCC 13+ and Python 3.12, but plan for offline inference only, since full KV cache, disaggregated serving, and replica load balancing are not included.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/deepseek-deepinfer-on-huawei-ascend-production-code-open-sourced-dec-2026", "markdown": "https://wpnews.pro/news/deepseek-deepinfer-on-huawei-ascend-production-code-open-sourced-dec-2026.md", "text": "https://wpnews.pro/news/deepseek-deepinfer-on-huawei-ascend-production-code-open-sourced-dec-2026.txt", "jsonld": "https://wpnews.pro/news/deepseek-deepinfer-on-huawei-ascend-production-code-open-sourced-dec-2026.jsonld"}}