[MRV2][Spec Decode] Adaptive Speculative Decoding - Initial Support#48692
Open
benchislett wants to merge 10 commits into
Open
[MRV2][Spec Decode] Adaptive Speculative Decoding - Initial Support#48692benchislett wants to merge 10 commits into
benchislett wants to merge 10 commits into
Conversation
Signed-off-by: Benjamin Chislett <bchislett@nvidia.com>
Signed-off-by: Benjamin Chislett <bchislett@nvidia.com>
Signed-off-by: Benjamin Chislett <bchislett@nvidia.com>
Signed-off-by: Benjamin Chislett <bchislett@nvidia.com>
Signed-off-by: Benjamin Chislett <bchislett@nvidia.com>
Signed-off-by: Benjamin Chislett <bchislett@nvidia.com>
Signed-off-by: Benjamin Chislett <bchislett@nvidia.com>
… mixed prefill/decode) Signed-off-by: Benjamin Chislett <bchislett@nvidia.com>
Signed-off-by: Benjamin Chislett <bchislett@nvidia.com>
Signed-off-by: Benjamin Chislett <bchislett@nvidia.com>
Contributor
|
Documentation preview: https://vllm--48692.org.readthedocs.build/en/48692/ |
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.
Purpose
This PR implements initial support for Adaptive Speculative Decoding using DSpark's confidence head: we enable fully variable-length per request speculative decoding with FULL CUDA Graph support. This PR does not implement online dynamic scheduling of the verification budget; instead, we rely on user-provided
num_speculative_tokens_per_batch_sizeto determine what size pool of draft tokens to verify at each batch size.This PR fleshes out a number of fundamental aspects of variable-length speculation, such as:
Design and Implementation Details
Coming soon 😴
Key areas for reviewers are:
Testing
Since only FLASH_ATTENTION is currently functional, I run with Qwen3-8B-FP8 and the corresponding DeepSeek-trained DSpark. Since verification is so cheap on an 8B model, no significant speedup is measurable; that is not the objective of this PR. However, I do observe an increase in acceptance rate under a fixed verification budget:
Acceptance Rate Study: SPEED-Bench, All Categories, Concurrency 128, Shuffled
SPEED-Bench, All Categories, Concurrency 128, Shuffled
Measured using NVIDIA SPEED-Bench harness, thinking off, vLLM config:
I also implement various unit tests, including E2E coverage of acceptance length, GSM8k correctness, and an assert that we're observing almost-exactly
N*Kdraft tokens at each step.Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.