Fixed logging issue in rloo_trainer.py that where generate_completions() is not reflective of actual model generations #2679
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.
What does this PR do?
Issue:
there is a bug in the generations that get logged as model checkpoints. Specifically, rloo_trainer.py's generate_completions() is not reflective of actual model generations, which seems to not be the desired behavior. In particular the temperature in generate_completions is set to 0.01.
trl/trl/trainer/rloo_trainer.py
Line 575 in 4659ad9
The generation_completions()'s temperature is not the same as that used in train():
trl/trl/trainer/rloo_trainer.py
Line 261 in 4659ad9
This results in logging of model checkpoints that are different from what gets used in the actual RLOO process.
Fix:
Adjusted the arguments in the generation_config in
generate_completions()
to useself.args.temperature
instead of the hardcoded value0.01
.Fixes # (issue)
#2678
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.