-
Notifications
You must be signed in to change notification settings - Fork 2.4k
⚖️ Fix scale_rewards issue in GRPO #3992
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
Conversation
LeonEricsson
left a comment
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.
LGTM
trl/trainer/grpo_config.py
Outdated
| self.scale_rewards = {"true": "group", "false": "none"}.get(self.scale_rewards.lower(), self.scale_rewards.lower()) | ||
| if self.scale_rewards not in ["batch", "none", "group"]: | ||
| raise ValueError( | ||
| f"Invalid value for scale_rewards: {self.scale_rewards}. Must be one of 'batch', 'group', or 'none'." | ||
| ) | ||
|
|
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.
@qgallouedec I noticed that you moved this into the trainer in the original PR. Thoughts? I prefer eager validation like this.
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 usually try to minimize what we have in post-init. But here I guess it's ok
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
qgallouedec
left a comment
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.
lgtm, thanks a lot, a patch release will soon be released
Co-authored-by: Leon <[email protected]> Co-authored-by: Quentin Gallouédec <[email protected]>
Co-authored-by: Leon <[email protected]> Co-authored-by: Quentin Gallouédec <[email protected]>
What does this PR do?
Fixes scale_rewards malfunctioned in GRPOTrainer #3991
Before submitting
Pull Request section?
to it if that's the case.
Who can review?
Amazing team members such as @qgallouedec