Open-sourced Oct 20, 2026 · Apache 2.0

DeepInfer Self-Hosting Guide: Is DeepSeek's Open-Source Inference Engine Worth Running Yourself?

DeepInfer is the inference framework behind DeepSeek-V4.1-Flash's production services, fully open-sourced on October 20, 2026. Here's a 5-minute honest breakdown of what it is, what's missing, and at what scale self-hosting actually pays off — with an interactive cost calculator.

Updated Oct 21, 2026

DeepInfer at a glance

License

Apache 2.0

Built on

Heavily modified vLLM fork

Supported model

DeepSeek-V4.1-Flash (only)

Hardware

NVIDIA SM100 / Ascend 950

Mode

Offline batch inference only

Official claim

155T tokens/day per cluster

Your workload

Current: 10亿 tokens/day (~300亿/month), input:output = 80:20

Option A · Official API

Defaults are examples — use official DeepSeek pricing; cache hits are cheaper.

Option B · Self-hosting (DeepInfer / vLLM)

Option A · Official API / month

$9,240

¥66,528 / month

$0.31 / 1M tokens

Zero ops, elastic scaling — best for starting out and unstable traffic

Option B · Self-hosting / month (~4 GPUs)

$16,560

¥119,232 / month

$0.55 / 1M tokens

Estimated at 2.6亿 tokens/day per GPU × 4 GPUs

At this scale the API is cheaper (saves ~44%). To break even, per-GPU effective throughput would need to reach 5,186 tokens/s (currently set to 5,000).

Static estimation model: self-hosting cost = GPU rent × GPU count × 720h × (1 + ops overhead). Excludes cache-hit discounts, model weight storage, and cold starts. All prices are editable — verify against official quotes and your own benchmarks before deciding.

What is DeepInfer

DeepInfer is the high-performance inference framework DeepSeek open-sourced on October 20, 2026 — the same engine that serves DeepSeek-V4.1-Flash in production, where a single cluster reportedly handles 155 trillion tokens per day. It is built primarily on vLLM (with inspiration from SGLang and TensorRT-LLM) and exposes DeepSeek's internal scheduling, kernel, and decoding optimizations for MoE models.

Key capabilities: FlashMLA / DeepGEMM / DeepEP / TileLang optimized kernels; attention data parallelism with MoE expert parallelism; DSpark speculative decoding (a draft model proposes 5 tokens at a time with confidence-scheduled verification, cutting verification compute by ~30%); batch-invariant inference and deterministic sampling (extremely useful for reproducible agent evals); and structured outputs constrained by regex, JSON Schema, or EBNF.

What's NOT included: it's not a complete serving stack

The README is unusually candid. Three components required for a complete inference service are missing from this release:

  • KV cache management system — tightly coupled to DeepSeek's internal infrastructure
  • Prefill/decode disaggregation (most engine functionality is implemented, just not shipped)
  • Load balancing across data-parallel replicas
  • Bottom line: out of the box you can run offline batch inference only — you cannot replicate DeepSeek's online production architecture

Hardware and system requirements: the bar is high

DeepInfer currently supports only NVIDIA SM100 (Blackwell) data-center GPUs and Huawei Ascend 950 NPUs — Hopper and older NVIDIA generations are not supported. Requirements: Linux, GCC 13+, Python 3.12, and CUDA 13 or CANN 9.2.

The published benchmarks were measured on 4 SM100 GPUs (prefill) plus 64 GPUs (decode) and are entirely self-reported — no independent reproduction exists yet. Treat every throughput figure as unverified.

The companion deepseek-recipe library provides tokenization fully aligned with the official DeepSeek API, so self-hosted deployments behave identically to the hosted endpoint.

Self-host or call the API?

For most teams the answer is still the API: DeepSeek's first-party endpoint runs exactly this code, and V4.1-Flash is already cheap on aggregators. Self-hosting pays off for data sovereignty, offline batch processing (corpus cleaning, bulk code generation, eval pipelines), and squeezing out maximum throughput.

Use the calculator below for a rough estimate: enter your daily token volume, API pricing, and GPU rental rate, and it will tell you which option is cheaper — and what per-GPU throughput you'd need to break even.

How it relates to vLLM and SGLang

DeepInfer officially acknowledges it was 'originally built primarily on vLLM.' The most useful reading is not 'should I switch' but 'what did DeepSeek change after forking vLLM' — self-hosters on vLLM/SGLang can use it as a reference implementation for scheduling and decoding strategies. For general online serving, vLLM and SGLang remain the right starting point.

github.com/deepseek-ai/DeepInfer

FAQ

What is DeepInfer?

A high-performance inference framework open-sourced by DeepSeek on October 20, 2026 (Apache 2.0) — the engine behind DeepSeek-V4.1-Flash's production services, built on a heavily modified vLLM fork with distributed inference, speculative decoding, and structured outputs.

What hardware does DeepInfer support?

Currently only NVIDIA SM100 (Blackwell) data-center GPUs and Huawei Ascend 950 NPUs. Hopper and older cards are not supported, and consumer GPUs cannot run it.

Can DeepInfer replace vLLM?

Not directly. It supports only DeepSeek-V4.1-Flash, covers offline batch inference only, and lacks KV cache management and load balancing. For general online serving, stick with vLLM or SGLang.

Is the 155 trillion tokens/day figure real?

It's DeepSeek's own claim about its production traffic — self-reported, with no independent benchmark reproduction yet. Treat it as directional.

At what scale is DeepInfer self-hosting worth it?

Rule of thumb: workloads of several billion tokens per day or more, dominated by offline batch processing. Use the cost calculator above with your actual API pricing and GPU rental rates.