feat(qwen3): add DFlash speculative decoding#380
Draft
xiaguan wants to merge 3 commits into
Draft
Conversation
Contributor
|
Heads-up + I'd like to build on this rather than ship a parallel stack: I've been prototyping n-gram (prompt-lookup) speculative decoding in #349. n-gram is just a CPU draft source that produces the same kind of verify span, so it should be able to reuse your verify + greedy-acceptance + schedule/apply/revert_speculative KV path as a zero-cost second method (no draft model, no draft KV, no hidden capture). I'll hold the detailed integration until your PR settles so I'm adapting to the final shape, not a moving target. |
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.
Summary
--dflash-draft-model-path.committed_tokens.Validation
prek run --filespassed for this hardening diff, including fmt and clippy.cargo fmt --all --checkgit diff --checkcargo test --release -p openinfer-kv-cache --test lifecycle speculative -- --nocapturecargo test --release -p openinfer-qwen3-4b dflash_prefill --lib -- --nocapturecargo test --release -p openinfer-qwen3-4b admission_ --lib -- --nocapturecargo test --release -p openinfer-qwen3-4b dflash_ --lib -- --nocapturecargo test --release -p openinfer-qwen3-4b --lib -- --nocapturecargo build --release -p openinfer-serverOPENINFER_TEST_MODEL_PATH=/data/models/Qwen3-4B OPENINFER_DFLASH_TEST_MODEL_PATH=/data/models/Qwen3-4B-DFlash-b16 cargo test --release -p openinfer-qwen3-4b --test hf_golden_gate dflash_speculative_verify_matches_hf_argmax_regret_gate -- --nocapturevllm bench serve, greedy/v1/completions:/data/Qwen3-4Band/data/Qwen3-4B-DFlash-b16.Draft State