Skip to content
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

New multiplexing scheduler #273

Closed
EricLBuehler opened this issue May 8, 2024 · 0 comments · Fixed by #279
Closed

New multiplexing scheduler #273

EricLBuehler opened this issue May 8, 2024 · 0 comments · Fixed by #279
Labels
new feature New feature or request

Comments

@EricLBuehler
Copy link
Owner

Currently, we have a "bucketing scheduler" which works based on one condition: KV cache compatibility. We bucket sequences by the KV cache length and run the shortest ones first according. This can starve resources from older (and longer) sequences while others are catching up, and can even stall them in the worst case.

A multiplexing scheduler would ensure that older sequences are able to run while the bucketing can still occur. We can multiplex sequences by defining a scheduling period $p$ which controls the number of scheduling passes to not run the lower-priority sequences. For example, if $p=2$, then the bucketed sequences will run for 2 scheduling cycles before the bucketing criterion is altered temporarily, and all older sequences are run.

#262 introduces dynamic LoRA swapping, and will allow per-sequence adapter activation. We can also consider this in the multiplexing scheme by putting sequences with the same adapter activations together. Sequences would be bucketed based on KV cache compatibility and then by LoRA adapter compatibility. The multiplexing case would also be altered.

The goal is to reduce sequence starvation and also support per-request request LoRA adapter activation.

@EricLBuehler EricLBuehler added the new feature New feature or request label May 9, 2024
@EricLBuehler EricLBuehler linked a pull request May 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant