generated from fastai/nbdev_template
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
🧺 [2/N] Refactor _generate
in GRPO/RLOO: Use prompt_ids
from generation
#4152
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
Open
qgallouedec
wants to merge
90
commits into
main
Choose a base branch
from
refactor_generate_2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+117
−54
Conversation
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
…_thw` in GRPO and RLOO trainers; update `split_pixel_values_by_grid` to use `image_grid_thw`
This was referenced Oct 1, 2025
Co-authored-by: Quentin Gallouédec <[email protected]> Co-authored-by: Quentin Gallouédec <[email protected]>
Co-authored-by: Quentin Gallouédec <[email protected]> Co-authored-by: sergiopaniego <[email protected]> Co-authored-by: lewtun <[email protected]> Co-authored-by: Kashif Rasul <[email protected]>
Co-authored-by: Sergio Paniego Blanco <[email protected]>
Co-authored-by: Quentin Gallouédec <[email protected]>
lewtun
approved these changes
Oct 7, 2025
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.
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.
This PR belongs to a sequence of PR that aims to refactor the generation part of GRPO/RLOO to allow for easier customization and ultimately tool calling
Previous:
image_split_sizes
in favour ofimage_grid_thw
#4111_generate
#4114_generate
in GRPO/RLOO: list of ints instead of tensors #4146Next:
_generate
in GRPO/RLOO: Rely on generator for prompt truncation #4153_generate
in GRPO/RLOO: Moveforward_kwargs
outside generation method #4154_generate
in GRPO/RLOO: Insert images in the prompt #4155Instead of getting
prompt_ids
for all generation methods like thiswe rely on each method to provide the
prompt_ids
.Benchmark
I ran a quick benchmark with two configs, results are here:
I can't remember which run correspond to before, and which one correspond to after 😅
https://huggingface.co/spaces/qgallouedec/trackio?project=4152