Skip to content

refactor: unify spec-verify and draft block forwards as decode. - #2810

Draft
wai-bao wants to merge 1 commit into
xLLM-AI:mainfrom
wai-bao:refactor/spec-verify-as-decode
Draft

wai-bao wants to merge 1 commit into
xLLM-AI:mainfrom
wai-bao:refactor/spec-verify-as-decode

Conversation

@wai-bao

@wai-bao wai-bao commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Unify target speculative verification and DFlash/DSpark draft-block execution as DECODE with multi-token query rows. Separate scheduling stage, query layout, and target-verify recurrent-state handling through shared predicates.

Changes

  • Derive decode layout and target verification from batch metadata instead of the duplicated model-parameter flag.
  • Share verify layout construction, decode predicates, graph planning, and recurrent-state handling across native executors and hybrid models.
  • Preserve single-token DSpark fallback behavior and avoid unnecessary mask and scheduling work for multi-token decode.
  • Keep expanded decode planning on its dedicated attention path without rerouting ordinary chunked prefill.

Validation

  • 14 affected NPU test programs: 306 tests passed.
  • Embedding cache tests: 18 tests passed.
  • clang-format 20.1.6 and diff whitespace checks passed.

@wai-bao
wai-bao force-pushed the refactor/spec-verify-as-decode branch from a11868d to 983362a Compare November 22, 2026 21:45
@wai-bao
wai-bao force-pushed the refactor/spec-verify-as-decode branch from 983362a to 92fb224 Compare November 22, 2026 22:07

This branch has not been deployed

No deployments
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