-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
[kv_offload+HMA][0/N]: Support block-level preemption handling #34805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3594,10 +3594,10 @@ def execute_model( | |
| scheduled_spec_decode_tokens=spec_decode_tokens_copy, | ||
| ) | ||
|
|
||
| if scheduler_output.preempted_req_ids and has_kv_transfer_group(): | ||
| get_kv_transfer_group().handle_preemptions( | ||
| scheduler_output.preempted_req_ids | ||
| ) | ||
| if has_kv_transfer_group(): | ||
| kv_connector_metadata = scheduler_output.kv_connector_metadata | ||
| assert kv_connector_metadata is not None | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, previously |
||
| get_kv_transfer_group().handle_preemptions(kv_connector_metadata) | ||
|
Comment on lines
+3597
to
+3600
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The While the current implementations appear to be idempotent, this redundancy can be confusing and might lead to bugs if a future connector's
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AFAIK
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @orozery Does the code make this obvious or enforced? If it possible that it could be called twice?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All connector functions have 2 call locations, one for each model runner. |
||
|
|
||
| num_scheduled_tokens = scheduler_output.total_num_scheduled_tokens | ||
| with ( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be documented that this is a breaking API change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a fresh API that I recently introduced. It's not used by any in-tree connector, and most-likely not used at all.
I don't see any benefit from documenting it.