🧺 [4/N] Refactor _generate
in GRPO/RLOO: Move forward_kwargs
outside generation method
#4154
+17
−18
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 #4146_generate
in GRPO/RLOO: Useprompt_ids
from generation #4152_generate
in GRPO/RLOO: Rely on generator for prompt truncation #4153Next:
_generate
in GRPO/RLOO: Insert images in the prompt #4155