generated from fastai/nbdev_template
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[GRPO] Adds an option to sleep vllm when running in colocated mode #3968
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c9e02bd
add sleep mode for GRPO
edbeeching 44f1533
doc tip
edbeeching 654e97d
precommit
edbeeching 072f40c
style
qgallouedec ab22c8d
Add vLLM sleep mode documentation and reference in GRPO Trainer tips
qgallouedec 6763031
Update docs/source/grpo_trainer.md
qgallouedec e55b88a
Update docs/source/grpo_trainer.md
qgallouedec adb4736
remove nested tip
qgallouedec 415d187
Fix link to vLLM sleep mode documentation in GRPO Trainer tips
qgallouedec 78f9d60
nits
edbeeching 8c67f8e
revert change to level
edbeeching 6e4acbc
Merge branch 'vllm-colocated-sleep' of github.com:huggingface/trl int…
edbeeching 0130281
dummy commit
edbeeching 1810b52
Merge branch 'main' into vllm-colocated-sleep
edbeeching File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
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 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.
Every time vllm wakes up, it wakes up to an updated model, right? So why not use level = 2 to further improve efficiency?
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.
Ah good point, let me rerun the benchmark with level=2.
Uh oh!
There was an error while loading. Please reload this page.
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.
For level = 2, you will also need to wake-up then sleep in
_move_model_to_vllm,_sync_fsdp2_params_to_vllmand_sync_fsdp1_params_to_vllm.BAsically anytime you touch vllm (in generation or loading/syncying the model), you wake up, do the work, and then go back to sleep.
Additional note: the reason we did not move sleep to upstream was because of a vllm bug, which is just recently fixed by this PR. So that means, you need to use vllm version that incorporates the fix to be able to use sleep level 2 without segmentation fault.
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.
Yes, I have already included a wake up call before the weight sync. I don't re-sleep as we have the gen step straight after.
It looks like the level 2 fix has not made it into their most recent release. I will leave level=1 for now for better backward compatability. Unless there are other reasons to go with level 2?