[BugFix] Fix spec decoding edge case bugs#31944
Merged
DarkLight1337 merged 1 commit intovllm-project:mainfrom Jan 8, 2026
Merged
[BugFix] Fix spec decoding edge case bugs#31944DarkLight1337 merged 1 commit intovllm-project:mainfrom
DarkLight1337 merged 1 commit intovllm-project:mainfrom
Conversation
Signed-off-by: Nick Hill <nickhill123@gmail.com>
njhill
commented
Jan 8, 2026
Comment on lines
+1518
to
+1522
| if ( | ||
| self.input_batch.num_computed_tokens_cpu[req_idx] | ||
| >= self.input_batch.num_prompt_tokens[req_idx] | ||
| ): | ||
| num_decode_draft_tokens[req_idx] = len(draft_token_ids) |
Member
Author
There was a problem hiding this comment.
This is a not-directly-related simplification
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces two important bug fixes for edge cases in speculative decoding. The first fix correctly clears speculative token IDs when a request is preempted, preventing state corruption. The second fix addresses an issue with 'paused' requests by refactoring the speculative token update logic into a new method and ensuring it's applied to resumed requests. The changes are well-implemented, and the refactoring improves code clarity and maintainability. Overall, this is a solid contribution that enhances the robustness of the speculative decoding feature.
DarkLight1337
approved these changes
Jan 8, 2026
This was referenced Jan 8, 2026
Closed
yugong333
pushed a commit
to yugong333/vllm
that referenced
this pull request
Jan 9, 2026
Signed-off-by: Nick Hill <nickhill123@gmail.com>
5 tasks
akh64bit
pushed a commit
to akh64bit/vllm
that referenced
this pull request
Jan 16, 2026
Signed-off-by: Nick Hill <nickhill123@gmail.com>
dsuhinin
pushed a commit
to dsuhinin/vllm
that referenced
this pull request
Jan 21, 2026
Signed-off-by: Nick Hill <nickhill123@gmail.com> Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
wangxiyuan
pushed a commit
to vllm-project/vllm-ascend
that referenced
this pull request
Feb 11, 2026
…fect (#6615) ### What this PR does / why we need it? This pr corrects the patch from [#5786](#5786), otherwise it might not take effect when tp_size > 1. Related changes in this patch has been merged in vLLM [#31944](vllm-project/vllm#31944). ### Does this PR introduce _any_ user-facing change? No. Signed-off-by: Angazenn <supperccell@163.com>
ItzDEXX
pushed a commit
to ItzDEXX/vllm
that referenced
this pull request
Feb 19, 2026
Signed-off-by: Nick Hill <nickhill123@gmail.com>
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.
There are a couple of edge case issues:
spec_token_idsin the scheduler when it is preempted._update_statesmethod since they are treated as new requests and the spec token handling isn't on that path.