Skip to content

[Roadmap] 2026 Q4: close the gap to official DeepInfer #3

Open
1 of 3 issues completed
Open

Description

@algebra-MCX
English · click to expand

How to read this roadmap

  • Two levels. This page groups the work by module; each item links the issue that explains it, and that issue links its PR. Finished items are checked.
  • Titles put the module in brackets, then the change, e.g. [Attention] Read sparse attention keys through row indices. A PR has the same title as its issue and closes it on merge.
  • Labels give the kind of change and are shown after every item: perf · feature · bugfix · refactor · docs · ci.
  • Where to start
    • New to the project: read the Performance timeline, then [Prefill] Sparse attention, indexer and MoE: 1,085 → 4,316 tok/s/GPU #1 for the first round of optimizations.
    • Following one module: read its section; items are in the order they were done.
    • Studying one change: open its issue for the data, the official approach, the change, validation and measurement; the PR has the code.

Performance timeline

Real DeepSeek-V4.1-Flash prefill, 4 × B200, EP4 / DP4 / CP1, 131,072-token context (126,976 cached), 4,096 new tokens per rank per step.

Change Issue Throughput (tok/s/GPU) Step (ms) Share of official
Initial version — 1,084.8 3,775.9 3.0%
Tensor-core sparse attention #1 2,571.7 1,592.7 7.1%
Fused index scoring #1 3,373.1 1,214.3 9.3%
Local-row MoE combine (current main) #1 4,315.9 949.0 11.9%
bf16 gate GEMM (PR open) #4 4,589.4 892.2 12.7%
Indexed attention keys (PR open) #7 5,004.4 817.7 13.8%
Official DeepInfer — 36,170.9 113.2 100%

The two open rows were measured in one job against main (4,322.1 tok/s/GPU in that job) and are not yet combined. Earlier rows come from separate jobs (#1). The official number is from an earlier job, so the shares are approximate.

Attention

DeepInfer-Lab 281 ms per step (key gathering 182 + kernel 99) · official 14.9 ms (FlashMLA reads paged KV by index)

Indexer

DeepInfer-Lab 79 ms · official 7.9 ms (DeepSelect top-k)

MoE

DeepInfer-Lab 410 ms (experts 252, gate 76, communication 53) · official 52.8 ms (DeepGEMM FP4 GEMM, fused gate, DeepEP all-to-all)

HC and norms

DeepInfer-Lab 122 ms · official ≈ 10 ms

  • Move the Hyper-Connections mixing GEMM off fp32 SIMT cores (Block.hc_mixes, 28.6 ms) · perf
  • Fuse the remaining elementwise ops · perf

Runtime

Scheduler, multi-GPU coordination and KV cache.

  • Paged blocks and state slots, chunked prefill, preemption, zero-overhead scheduling, deterministic sampling, decode CUDA graphs · feature
  • Idle DP ranks run an empty forward (today the other ranks hang in all_gather_rows) · bugfix
  • DP ranks agree on prefill vs decode every step; remove the .item() sync in all_gather_rows · bugfix
  • Correct the _preempt comment: recomputation reproduces the token only with a batch-invariant forward · docs
  • FP8 / FP4 KV cache in the official format · perf
  • Prefix cache and fork inside the scheduler · feature
  • Cost-model prefill chunking, context parallelism, separate prefill and decode engines · feature

Features

  • DSpark speculative decoding · feature
  • Structured output · feature
  • End-to-end batch invariance · feature
  • Image input · feature

Docs

Contributing

  • One change per PR, titled [Module] change, with one label.
  • Run pytest -q, python -m compileall -q deepinfer_lab tests and git diff --check; say so when a PR was not tested on GPU.
  • Compare performance only against a baseline measured in the same job.
简体中文 · 点击展开

如何阅读

  • 两层结构。 本页按模块分类,每一项链接到说明这次改动的 issue,issue 里再链接对应的 PR。已完成的项打勾。
  • 标题 先在方括号里写模块,再写改动,例如 [Attention] Read sparse attention keys through row indices。PR 与对应 issue 同名,合并时自动关闭该 issue。
  • 标签 表示改动类型,标在每一项的末尾:perf · feature · bugfix · refactor · docs · ci。
  • 从哪里读起

性能演进

真实 DeepSeek-V4.1-Flash prefill,4 × B200,EP4 / DP4 / CP1,131,072-token 上下文(126,976 已缓存),每步每卡新增 4,096 token。

改动 Issue 吞吐(tok/s/GPU) 每步(ms) 占官方
初始版本 — 1,084.8 3,775.9 3.0%
tensor-core 稀疏注意力 #1 2,571.7 1,592.7 7.1%
融合 indexer 打分 #1 3,373.1 1,214.3 9.3%
MoE 只合并本地行(当前 main) #1 4,315.9 949.0 11.9%
bf16 gate 矩阵乘(PR 未合并) #4 4,589.4 892.2 12.7%
按索引读 key(PR 未合并) #7 5,004.4 817.7 13.8%
官方 DeepInfer — 36,170.9 113.2 100%

两行未合并的数据在同一作业内与 main 对照测得(该作业中 main 为 4,322.1 tok/s/GPU),两者合并后的效果尚未测量。之前各行来自不同作业(#1)。官方数据来自更早的作业,占比仅供参考。

Attention

DeepInfer-Lab 每步 281 ms(拼 key 182 + kernel 99)· 官方 14.9 ms(FlashMLA 按索引读分页 KV)

Indexer

DeepInfer-Lab 79 ms · 官方 7.9 ms(DeepSelect top-k)

MoE

DeepInfer-Lab 410 ms(专家 252、gate 76、通信 53)· 官方 52.8 ms(DeepGEMM FP4 矩阵乘、融合 gate、DeepEP all-to-all)

HC 与 norm

DeepInfer-Lab 122 ms · 官方约 10 ms

  • Hyper-Connections 混合系数的矩阵乘不再走 fp32 SIMT(Block.hc_mixes,28.6 ms)· perf
  • 融合其余逐元素算子 · perf

Runtime

调度、多卡协调和 KV cache。

  • 分页 block 与 state slot、chunked prefill、抢占、零开销调度、确定性采样、decode CUDA graph · feature
  • 空闲的 DP 卡执行空 forward(目前其他卡会卡在 all_gather_rows)· bugfix
  • 各 DP 卡每步统一 prefill 或 decode;去掉 all_gather_rows 中的 .item() 同步 · bugfix
  • 修正 _preempt 注释:只有 forward 是 batch-invariant 时,重算才能得到相同 token · docs
  • KV cache 改为官方格式的 FP8 / FP4 · perf
  • 调度器内的 prefix cache 与 fork · feature
  • 按代价模型切分 prefill chunk、context parallel、prefill 与 decode 分开部署 · feature

Features

  • DSpark 投机解码 · feature
  • 结构化输出 · feature
  • 端到端 batch-invariant · feature
  • 图像输入 · feature

Docs

提交约定

  • 一个 PR 只做一项改动,标题写成 [模块] 改动,打一个标签。
  • 运行 pytest -q、python -m compileall -q deepinfer_lab tests、git diff --check;没有在 GPU 上测过的 PR 要写明。
  • 性能只与同一作业内测得的基线比较。

Activity

  1. pinned this issue on Oct 24, 2026
  2. changed the title [-][Roadmap] mini-DeepInfer 路线图(2026 Q4):对齐官方 DeepInfer[/-] [+][Roadmap] mini-DeepInfer 2026 Q4: closing the gap to the official DeepInfer / 路线图[/+] on Oct 24, 2026
  3. changed the title [-][Roadmap] mini-DeepInfer 2026 Q4: closing the gap to the official DeepInfer / 路线图[/-] [+][Roadmap] 2026 Q4: close the gap to official DeepInfer[/+] on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions