← Back to Leaderboard
Ddeepseek-ai

deepseek-ai/DeepInfer

An accelerator-tuned offline inference engine for DeepSeek-V4.1-Flash

View on GitHub ↗
Engineering Health (Methodology)
A+ · 89/100
Maintenance Activity
● Updated 2d ago
Latest Release
Rolling commits (main)
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption23/25
Release Cadence11/20
License Clarity20/20
GPULocal AI
Total Stars
★ 27,715
24h Growth
+93
7d Growth
+1,312
Forks
3,421

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

deepseek-ai/DeepInfer Star History (2026-10-18 - 2026-12-04) DAILY STAR HISTORY (36-DAY D1 TELEMETRY) +27.7k in 47d · avg +590/day 29.3k 14.6k 0 2026-10-18: ★ 12026-10-24: ★ 21,9022026-10-31: ★ 24,5932026-11-03: ★ 25,1942026-11-06: ★ 25,4822026-11-09: ★ 25,6942026-11-12: ★ 25,8642026-11-15: ★ 26,0402026-11-18: ★ 26,1782026-11-21: ★ 26,2712026-11-24: ★ 26,3452026-11-27: ★ 26,4032026-11-30: ★ 26,4672026-12-04: ★ 27,715 ★ 27.7k 10-18 11-10 12-04

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

DeepInfer exposes offline execution through examples/offline_inference.py. The Python runtime combines model execution and sampling with asynchronous scheduling that overlaps CPU batch preparation and accelerator execution. It supports attention data parallelism and balanced context parallelism, alongside MoE expert parallelism and expert load balancing. These are engine-level execution controls, not an online serving interface.

The source tree separates deepinfer/ and csrc/. The build uses setuptools with Ninja and PyTorch >= 2.7 as build requirements; pinned dependencies include TileLang 0.1.15 and Transformers 4.50.0. Acceleration components include FlashMLA, DeepGEMM, DeepEP, TileKernels, DeepSelect, and custom TileLang operators under deepinfer/model_executor/layers/tilelang_ops. Integration uses Python sampling parameters and environment variables; no public plugin protocol is established.

Key Capabilities & Differentiators

DeepSeek-V4.1-Flash is the only listed model. DSpark uses draft tokens and schedules verification based on confidence; the configured maximum draft length defaults to 5. Sliding-window attention (SWA) bounded replay cuts decoder prefill work by replaying a suffix. The V4.1 compact setting keeps 140 tokens; any retained suffix must cover the attention window plus maximum backtracking.

Batch invariance is opt-in. For deterministic sampling, enable it, disable variable-length MTP, and pass a fixed seq_seed. Structured generation accepts regex, JSON Schema, or EBNF. The benchmark sweeps use 4 SM100 GPUs for prefill and 64 for decode, versus 8 Ascend 950 NPUs for prefill and 64 for decode. Each configuration stays within one scale-up domain; these allocations describe benchmark topology, not minimum hardware or performance guarantees.

Trade-offs & Limitations

DeepInfer is a focused choice when the checkpoint and accelerator fleet match its support envelope and the team wants direct control over prefill and decode. Prefer evaluating a general-purpose engine if a broad model catalog, heterogeneous hardware, or a ready-to-run online API matters more. The open release is an offline engine: budget separately for API integration, request admission, and service observability rather than treating it as a complete serving stack.

Validate two distinct operating profiles if you need both accelerated decoding and strict reproducibility: the deterministic sampling recipe explicitly disables variable-length MTP. Benchmark on the intended topology and size accelerator memory for the checkpoint, context lengths, and concurrency rather than extrapolating from the published device counts. Apache-2.0 covers the engine; check checkpoint and dependency terms separately.

Hardware & Deployment Guide

Build from source on Linux in a clean Python 3.12 environment with GCC >= 13.0. NVIDIA builds require CUDA >= 13.2 on SM100; Ascend deployments require CANN 9.3 on Ascend 950 with an aarch64 host. For NVIDIA, export DEEPINFER_ACCELERATOR=nvidia before running ./build.sh and keep it set when running the engine. requirements-nvidia.txt and requirements-ascend.txt are present in the tree.

Run python examples/offline_inference.py for an initial check. The default deepseek-ai/DeepSeek-V4.1-Flash-1017 checkpoint downloads into the Hugging Face cache on first run; set DEEPINFER_HF_MODEL_DIR to use a local copy. For isolated environments, stage dependencies as well as weights: the base requirements include a commit-pinned TileKernels Git dependency. Package metadata identifies version 0.1.0 as beta; no GitHub release is listed. Pin a tested revision and record the toolchain for repeatable builds.

Model and hardware scope: DeepSeek-V4.1-Flash on NVIDIA SM100 or Huawei Ascend 950 with aarch64 hosts.
Parallel execution: Attention DP and balanced CP, with MoE expert parallelism and expert load balancing.
Draft verification: DEEPINFER_ENABLE_MTP_VARLEN=1 enables confidence-scheduled verification; DEEPINFER_USE_NEXTN_DECODE caps draft length, defaulting to 5.
Prefill replay: Compact SWA replay retains a bounded suffix; the default V4.1 configuration uses 140 tokens and must cover the window plus maximum backtracking.
Reproducibility: Enable batch invariance, disable variable-length MTP, and set a fixed seq_seed for deterministic sampling.
Structured generation: SamplingParams.so_args accepts regex, JSON Schema, or EBNF constraints.
Best For

Teams with supported SM100 or Ascend 950 hardware that need to benchmark or integrate DeepSeek-V4.1-Flash offline, with explicit control over parallel execution and reproducibility.

Skip If

You need broad model or accelerator support, or an online serving API without building and operating a separate service layer.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

GPULocal AI
### Offline inference

The default checkpoint, [`deepseek-ai/DeepSeek-V4.1-Flash-1017`](https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017), is
downloaded into the Hugging Face cache on the first run; set `DEEPINFER_HF_MODEL_DIR=/path/to/DeepSeek-V4.1-Flash-1017` to
run from a local copy instead.

Comparison vs. Top LLMs & Inference Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
DeepInfer ★27.7k+1.3kPythonApache-2.0An accelerator-tuned offline inference engine for DeepSeek-V4.1-Flash
vllm98.2k+435PythonApache-2.0Paged-KV inference engine for high-throughput, self-hosted LLM serving
sglang39.4k+237PythonApache-2.0Self-hosted inference runtime for serving LLMs and multimodal models across acce
ollama189k+703GoMITGo-based LLM serving layer for local model management and inference

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/deepseek-ai/DeepInfer.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

deepseek-ai/DeepInfer Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about DeepInfer

What is the integration entry point, and does it expose a serving API?

Start with python examples/offline_inference.py. For constrained generation, pass so_args to SamplingParams with a schema_type and schema; examples/_structured_output.py shows the integration. Treat DeepInfer as an offline execution engine, not a drop-in server API. An online deployment needs its own request interface and service controls.

How many accelerators and how much device memory should we budget?

The supported targets are NVIDIA SM100 and Huawei Ascend 950 on aarch64 hosts. The benchmark configurations use 4 SM100 GPUs or 8 Ascend 950 NPUs for prefill and 64 devices for decode on either backend; those counts are not minimum requirements. No exact accelerator-memory floor is specified. Measure weight and runtime memory, including KV cache, with your intended context lengths, concurrency, and parallel layout.

Can we self-host DeepInfer commercially or redistribute it?

DeepInfer's Apache-2.0 license permits commercial use and self-hosting subject to its terms. If you redistribute the engine, satisfy the applicable license and notice obligations. Review the model checkpoint and bundled or redistributed dependencies separately; the engine license does not grant rights to those artifacts.

When is DeepInfer a better fit than a general-purpose serving engine?

Evaluate DeepInfer when DeepSeek-V4.1-Flash, the supported accelerators, and features such as bounded replay or batch invariance are central to the workload. For a multi-model fleet or a ready-to-run online API, evaluate general-purpose serving engines first. Confirm the exact checkpoint and backend on each candidate, then compare prefill and decode separately under the same workload; there is no head-to-head result here.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining deepseek-ai/DeepInfer? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature deepseek-ai/DeepInfer on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare