Citation and evidence

DeepInfer

Report a problem with this article

More

Use this article

Raw MarkdownExplore connections

Improve this page

Suggest editRevision history

Topics

AI InferenceSoftware Development

Cite this article

DeepInfer is an open-source inference framework developed by DeepSeek for running its models across accelerator clusters. DeepSeek announced its public release on October 20, 2026. The initial release supports DeepSeek V4.1-Flash and provides an offline inference engine, rather than a complete, ready-to-deploy online service.[1][2][16]

Release and compatibility

ItemDocumented support
DeveloperDeepSeek
Public announcementOctober 20, 2026
Framework licenseApache License 2.0
Supported model at releaseDeepSeek-V4.1-Flash
NVIDIA hardwareSM100 GPUs
Huawei hardwareAscend 950 NPUs
Operating systemLinux
Compiler and language prerequisitesGCC 13.0 or newer; Python 3.12
NVIDIA software prerequisiteCUDA 13
Ascend software prerequisiteCANN 9.2

Expanded article table

These are the release's documented targets and prerequisites, not a claim that every NVIDIA or Ascend device is supported.[1][2][3]

Relationship to other inference projects

The repository credits vLLM as its main original foundation, with further inspiration from SGLang and NVIDIA TensorRT-LLM. The vLLM project acknowledged the release and said it intended to use ideas from DeepInfer in further V4.1-Flash optimization.[1][4]

The academic work behind vLLM addresses KV cache fragmentation and sharing through PagedAttention. That work supplies background on the serving problem; its benchmark results are not measurements of DeepInfer.[5]

Distributed execution

DeepInfer combines attention data parallelism, balanced context parallelism, and expert parallelism for mixture-of-experts computation.[1][16][20] Its kernel dependencies include FlashMLA, DeepGEMM, DeepEP, TileKernels, DeepSelect, and TileLang.[17]

Expert-parallel load balancing uses recent token-routing statistics to decide which experts need extra physical replicas and how to place those replicas across devices. The implementation distinguishes the model's logical experts from physical copies, so replicating a busy expert changes its placement rather than the model's logical expert count.[6]

The deployment documentation describes a production layout with separate vision-encoder, prefill, and decode stages. Prefill processes the input prompt, while decode generates subsequent tokens. DeepSeek's described production deployment uses attention data parallelism alongside expert parallelism; it says tensor and context parallelism were not in use there. This production choice is distinct from the public engine's supported configuration options.[7]

Decoding and scheduling

DSpark verification

DeepInfer supports speculative decoding through DSpark. Draft tokens carry confidence estimates, and the scheduler uses their expected acceptance probabilities to allocate verification work. Variable-length verification avoids checking the same fixed number of draft tokens for every request. DeepSeek's model report describes DSpark as a semi-autoregressive drafting architecture with confidence-scheduled verification.[8]

The public configuration enables variable-length verification with DEEPINFER_ENABLE_MTP_VARLEN=1. DEEPINFER_USE_NEXTN_DECODE sets the maximum draft length, documented as five by default.[18]

Asynchronous scheduling

The scheduler overlaps CPU scheduling for a subsequent batch with accelerator execution of the current batch. This reduces the idle interval otherwise occupied by CPU scheduling and post-processing. DeepSeek describes the design as following existing SGLang and NanoFlow implementations, rather than presenting asynchronous overlap as an entirely new serving technique.[7]

Sliding-window bounded replay

SWA bounded replay reconstructs sliding-window attention state from a short suffix instead of replaying a much longer history. The model report describes this reconstruction as approximate. It should not be confused with exact reconstruction of every attention state.[8]

The repository contains separate mask and compact implementations and verification utilities that compare their metadata and model outputs. That equivalence check compares two implementations of the truncation operation; it does not establish equivalence between bounded replay and unrestricted full-history computation.[9]

Sampling and structured outputs

The SamplingParams interface includes temperature, top-p, top-k, maximum output tokens, per-sequence random seeds, and structured-output arguments. A missing seq_seed produces a randomly selected 64-bit seed. Supplying the same fixed seed is therefore a separate step from configuring batch-invariant computation.[10]

SettingDocumented purpose and restriction
DEEPINFER_BATCH_INVARIANT=1Batch-invariant model computation; documented for NVIDIA only
Batch invariance plus DEEPINFER_ENABLE_MTP_VARLEN=0 and a fixed seq_seedDocumented NVIDIA configuration for identical outputs from identical input tokens and sampling parameters
so_args={"schema_type": ..., "schema": ...}Output constraints passed to SamplingParams

Expanded article table

The repository also includes a regression test that compares a prompt's batched and single-request outputs with batch invariance enabled. The test compares token IDs and probability information; its presence is a test specification, not an independent benchmark of all hardware configurations.[1][11]

Structured output compilation uses XGrammar. The compiler dispatches JSON schemas, regular expressions, and EBNF grammars to the corresponding compilation routines; JSON-schema compilation uses strict mode. Compiled constraints then restrict the tokens available during generation. This controls output format, not the factual accuracy of the generated content.[12][7]

Benchmarks and interpretation

The repository publishes separate throughput-latency plots for prefill and decode. DeepSeek reports measuring the prefill plot on four SM100 GPUs and the decode plot on 64 SM100 GPUs, each inside one scale-up domain.[1]

The benchmark driver measures steady-state intervals after warmup. Its decode throughput uses full-acceptance accounting: the token count includes all configured draft tokens whether or not a workload would actually accept them. The plotting utility applies an assumed draft-acceptance rate to fixed-length decode sweeps, adjusting both per-user speed and throughput; it rejects this calculation for variable-length verification runs. Consequently, a plotted number must be read together with its acceptance assumption, context length, concurrency, draft length, and device configuration.[13][14]

The examples also warn that profiler timing can distort performance and should not be used to derive steps per second. The sweep scripts disable profiling for measurement points. These are developer-provided engine measurements, not end-to-end measurements of an independently operated online service.[13]

Model-quality checks

The evaluation suite separates generation from scoring and supplies reference Pass@1 values for checking a V4.1 deployment.[15]

EvaluationTasksSamples per taskReported reference Pass@1
AIME 2026303299.9%
GPQA Diamond198893.4%
HLE-Full2,500142.6%

Expanded article table

For AIME and GPQA, Pass@1 is mean single-sample accuracy across the repeated samples, not the proportion of questions solved by any one of those attempts. HLE uses one sample per task. The documentation calls these reference figures indicative sanity checks, with variation expected between runs.[15]

Scoring defaults to an LLM judge. Rule-based scoring is available for AIME and GPQA, but not HLE. A run's Pass@1 is considered valid only when its coverage_complete field is true. These checks measure the configured model's answers; they do not measure serving throughput.[15]

Running the public release

The official build selects its backend with DEEPINFER_ACCELERATOR, then builds dependencies and the extension from source. For NVIDIA, the build and offline example run as follows:[19][20]

export DEEPINFER_ACCELERATOR=nvidia
./build.sh
python examples/offline_inference.py

The examples use deepseek-ai/DeepSeek-V4.1-Flash-1017 as their default checkpoint. A model identifier triggers a download through the Hugging Face cache; an explicit local model directory can be used instead. DEEPINFER_HF_MODEL_DIR changes the default model location without overriding an explicitly supplied --model_name.[16]

The examples provide expert-parallel, data-parallel, and context-parallel configurations, plus text and image regression inputs. Their offline tests include perplexity baselines and optional checks for regular-expression, JSON, and EBNF output constraints.[20]

Public release boundaries

The public engine does not by itself reproduce DeepSeek's complete online service. The README lists a production KV cache system, vision-encoder/prefill/decode disaggregation, and load balancing across prefill and decode data-parallel replicas as additional requirements not included in the release. DeepSeek's deployment Q&A explains that cache management and request load balancing depend on internal infrastructure.[1][7]

This exclusion concerns the surrounding production system. It should not be read as saying the engine performs inference without attention-state caching or lacks the expert-placement balancing code included in the repository.[6][7]

References

  1. ^1 ^2 ^3 ^4 ^5 ^6 ^7DeepSeek-AI. DeepInfer: official repository and README. Release documentation reviewed October 20, 2026.
  2. ^1 ^2DeepSeek. Public DeepInfer announcement. October 20, 2026.
  3. ^DeepSeek-AI. DeepInfer Apache License 2.0.
  4. ^vLLM. Acknowledgment of DeepInfer's release and vLLM foundation. October 20, 2026.
  5. ^Kwon, Woosuk, et al. Efficient Memory Management for Large Language Model Serving with PagedAttention. 2023.
  6. ^1 ^2DeepSeek-AI. DeepInfer expert-parallel load-balancing policy.
  7. ^1 ^2 ^3 ^4 ^5DeepSeek-AI. DeepSeek V4.1 Flash Inference Deployment Q&A. Reviewed October 20, 2026.
  8. ^1 ^2DeepSeek-AI. DeepSeek-V4.1-Flash: Pushing the Limits of KV Cache Compression. September 17, 2026. See sections 2.4.3 and 3.2.2.
  9. ^DeepSeek-AI. YoCo mask/compact equivalence verification.
  10. ^DeepSeek-AI. DeepInfer sampling parameters.
  11. ^DeepSeek-AI. Batch-invariant regression test.
  12. ^DeepSeek-AI. DeepInfer structured-output compiler.
  13. ^1 ^2DeepSeek-AI. Offline inference and benchmark examples.
  14. ^DeepSeek-AI. Throughput-latency plotting implementation.
  15. ^1 ^2 ^3DeepSeek-AI. Benchmark evaluation methodology and reference results.
  16. ^1 ^2 ^3DeepSeek-AI. Offline model and launch configuration and example usage.
  17. ^DeepSeek-AI. Vendored kernel libraries and Python kernel dependencies.
  18. ^DeepSeek-AI. Environment-variable definitions.
  19. ^DeepSeek-AI. Backend selection and build entry point.
  20. ^1 ^2 ^3DeepSeek-AI. Offline inference and regression example.

Improve this article

Add missing citations, update stale details, or suggest a clearer explanation. Every suggestion is reviewed for sourcing before it goes live.

1 revision · v1 · 1,448 words · full history

Fact-checks are independent of edits: a reviewer re-verifies the article against its sources and stamps the date. How we verify

Research and drafting on this wiki are AI-assisted, under named human editorial standards. How AI is used here

Cite this page: AI Wiki. "DeepInfer." aiwiki.ai, updated 20 Oct 2026. CC BY 4.0. https://aiwiki.ai/wiki/deepinfer

Suggest edit