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

Multi step scheduling #441

Merged
merged 37 commits into from
Oct 29, 2024
Merged

Multi step scheduling #441

merged 37 commits into from
Oct 29, 2024

Conversation

tzielinski-habana
Copy link

Implementation of multi-step scheduling. To use the feature, pass --num_scheduler_steps=[n] as a server parameter. In my tests, best results were achieved with n==64, but this will vary depending on the model.

tzielinski-habana and others added 30 commits October 18, 2024 14:21
Currently before each Sampler call we have a CPU sync, which causes a
host gap:
<img width="226" alt="image"
src="https://github.com/user-attachments/assets/4509e69b-0f16-4ac9-812e-a2a9bc43a6ad">

This PR is removing that sync, so the host gap is no longer visible:
<img width="133" alt="image"
src="https://github.com/user-attachments/assets/66c19e4b-d832-4955-848d-8ae4acd8d264">

NOTE: class `ApplyToppTopkScalar` still has some CPU syncs inside. It
means that the biggest gain will be observed in the scenario without
`top_p` or `top_k` parameters. I think it is worth to investigate if we
can remove the syncs from this function too.
@michalkuligowski michalkuligowski merged commit 78e947a into habana_main Oct 29, 2024
19 checks passed
@michalkuligowski michalkuligowski deleted the multi_step_2 branch October 29, 2024 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants