nick's streaming changes 2#2
Merged
joshuadeng merged 6 commits intojoshuadeng:streaming_supportfrom Jan 24, 2026
Merged
Conversation
Signed-off-by: Nick Hill <nickhill123@gmail.com>
Signed-off-by: Nick Hill <nickhill123@gmail.com>
Signed-off-by: Nick Hill <nickhill123@gmail.com>
Signed-off-by: Nick Hill <nickhill123@gmail.com>
and don't support prompt_embeds with input streaming for now Signed-off-by: Nick Hill <nickhill123@gmail.com>
joshuadeng
reviewed
Jan 23, 2026
vllm/v1/core/sched/scheduler.py
Outdated
Comment on lines
+874
to
+877
| if update is None: | ||
| # Streaming-input request finished. | ||
| self.finish_requests(session.request_id, RequestStatus.FINISHED_ABORTED) | ||
| return |
Owner
There was a problem hiding this comment.
don't think update can be None from handle_stopped and add_request callsites
Owner
There was a problem hiding this comment.
if we want to add this guardrail, we should make the update input type optional
Author
There was a problem hiding this comment.
Actually it can be, this is the case where a final sentinel request is sent with resumable = False: https://github.com/joshuadeng/vllm/pull/2/files#diff-35f85e99eae8897d78a45f6a8d21bb69f9d8fe4a51e072bf299118dadac612f3R48-R49.
But the type hint is wrong and maybe it would be clearer to handle this case outside since it only applies to one of the callsites, will push a small update for that rn.
joshuadeng
reviewed
Jan 23, 2026
Comment on lines
+881
to
+889
| num_computed_tokens = session.num_computed_tokens | ||
| kept_output_tokens = session._all_token_ids[ | ||
| session.num_prompt_tokens : num_computed_tokens | ||
| ] | ||
| del session._all_token_ids[num_computed_tokens:] | ||
| session._output_token_ids.clear() | ||
| assert session.prompt_token_ids is not None | ||
| # Extend prompt with kept output tokens. | ||
| session.prompt_token_ids.extend(kept_output_tokens) |
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.
Re-based continuation of #1.