[Spec Decoding] Integrate DFlash into speculative decoding pipeline#1869
Open
aaronzhfeng wants to merge 1 commit intovllm-project:mainfrom
Open
[Spec Decoding] Integrate DFlash into speculative decoding pipeline#1869aaronzhfeng wants to merge 1 commit intovllm-project:mainfrom
aaronzhfeng wants to merge 1 commit intovllm-project:mainfrom
Conversation
Signed-off-by: aaronzhfeng <fzx333578@gmail.com>
This was referenced Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Wire DFlash block-diffusion speculative decoding into the existing TPU inference pipeline. The DFlash model and proposer were added in #1868; this PR connects them to the runner, KV cache manager, and speculative decoding manager so DFlash can be used end-to-end.
No changes to existing Eagle3 or ngram code paths: DFlash gets its own
propose_dflash_draft_token_idsmethod and a separateelif "dflash"dispatch branch.Modified files:
tpu_inference/models/common/model_loader.py-- register DFlashDraftModel in model registrytpu_inference/models/jax/qwen3.py-- collect aux_hidden_states from target layers during forward pass (needed by DFlash proposer to inject target context)tpu_inference/runner/tpu_runner.py-- add DFlashProposer initialization formethod="dflash"tpu_inference/runner/speculative_decoding_manager.py-- add dflash method dispatch andpropose_dflash_draft_token_ids(usesaccepted_attn_metadatawith correct seq_lens for drafter)tpu_inference/runner/kv_cache_manager.py-- extend draft KV cache allocation to cover dflash, readnum_hidden_layersfrom config instead of hardcoding 1Usage (after both #1868 and this PR):
Tests
E2e tests are in a follow-up PR.
Checklist