Skip to content

docs(design): PD-dflash-MoE serving design doc - #132

Merged
drunkcoding merged 5 commits into
mainfrom
docs/pd-dflash-moe-design
Aug 14, 2026
Merged

docs(design): PD-dflash-MoE serving design doc#132
drunkcoding merged 5 commits into
mainfrom
docs/pd-dflash-moe-design

Conversation

@drunkcoding

@drunkcoding drunkcoding commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

docs(design): DFlash-on-MoE-Infinity serving design doc

Design/architecture proposal — docs-only. Adds
docs/design/pd-dflash-moe-serving.md.

What "DFlash" is

DFlash = Chen, Liang, Liu, "DFlash: Block Diffusion for Flash Speculative
Decoding"
(Z Lab, z-lab.ai, arXiv:2602.06036):
a lightweight (~0.8 B) block-diffusion draft model proposes a whole block of B
tokens in one parallel forward; the large target verifies them in parallel
(lossless). z-lab ships ready draft/target pairs on HuggingFace.

Thesis (why DFlash × expert-offloading is synergistic)

For an offloaded-MoE target, the bottleneck is fetching the target's experts for
each verification step. A DFlash draft proposes the entire candidate block before
the target verifies it
, so we can run the target router on the draft tokens,
obtain the exact expert set the width-B verify will read, and prefetch those
experts during the draft forward
— a route-ahead prefetch (near-exact, not a
speculative guess). DFlash turns MoE-Infinity's hardest problem (hiding target expert
transfer) into a scheduled, near-exact prefetch.

Extends the existing spec_decode/dflash.py (DFlashSpeculator) seed — a
re-composition, not a rewrite.

Scope / target

  • Hardware: single sm_120 / RTX PRO 6000 (Blackwell), local; target MoE
    experts FP4-offloaded to host RAM (moe_infinity._v4_fp4); DFlash draft resident.
  • Generalizes to (must-cover): Qwen and GPT-OSS MoE targets that
    MoE-Infinity supports and have z-lab DFlash drafts — Qwen3-Coder-30B-A3B,
    Qwen3.5-35B-A3B, gpt-oss-20b, gpt-oss-120b (DeepSeek-V4-Flash when its draft
    lands). Route-ahead prefetch is architecture-agnostic at the MoE level.

The doc covers

Verification kernels (width-B target forward), draft/verify PD scheduling (2-D
deficit over {tokens, expert-bytes}), route-ahead expert prefetch (the
differentiator), an analytical cost model (route-ahead hiding inequality), and an
evaluation plan on the RTX PRO 6000. 3 Mermaid diagrams; 19-row symbol table.

Honesty notes (preserved)

  • Gating experiment: measure route-ahead prefetch coverage and rejected-token
    waste
    vs. acceptance a; if coverage is high / waste low, the thesis holds.
  • The advantage is regime-scoped: it pays in the memory-constrained (offloaded,
    cold-cache) regime; honest elsewhere. Cost-model numbers are labeled illustrative.

Not in scope

No implementation, no training, no measured benchmark numbers. Draft; not for merge
until reviewed.

@drunkcoding
drunkcoding marked this pull request as ready for review August 4, 2026 16:43
@drunkcoding

Copy link
Copy Markdown
Contributor Author

Ready for review. Full design doc landed in ed8a07d (11 sections + TL;DR, 3 Mermaid diagrams, analytical cost model, evaluation plan, 19-row symbol table). F1 QA green; changes are docs-only (docs/design/pd-dflash-moe-serving.md + an ARCHITECTURE.md link). Note: this is a design/architecture proposal — the thesis is gated on measuring per-step expert churn q (stability study first), and the AR-vs-diffusion advantage is stated as regime-scoped. Not auto-merged.

drunkcoding added 2 commits August 4, 2026 16:52
…head expert prefetch; sm_120/RTX PRO 6000 target; Qwen+GPT-OSS generalization
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant