-
Notifications
You must be signed in to change notification settings - Fork 456
Rename grpo_fast.py to grpo.py.
#1133
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
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @finbarrtimbers, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request streamlines the project's structure by renaming a key GRPO implementation file and removing outdated or unused training scripts for GRPO, DPO, and PPO. The changes aim to improve code clarity and reduce maintenance overhead by consolidating the primary GRPO script and eliminating redundant files. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request is a significant and valuable refactoring, consolidating multiple legacy trainers into a single, modern GRPO trainer. The new implementation in grpo.py is well-structured and introduces several advanced features like asynchronous data processing, sequence packing, and tool usage support. The code is generally of high quality.
However, I've identified a critical bug in the implementation of packed sequences where the attention mask is handled incorrectly, potentially leading to incorrect model behavior. I've also pointed out a high-risk monkey-patch that should be made more robust. Addressing these issues will greatly improve the reliability and correctness of this new trainer.
Note
Renames
grpo_fast.pytogrpo.pyand updates all references across code, docs, tests, and launch scripts.open_instruct/grpo_fast.pywithopen_instruct/grpo.pyand update imports/type hints (e.g.,benchmark_generators.py,test_grpo.py).mason.pyOPEN_INSTRUCT command/resumable lists toopen_instruct/grpo.py.grpo.py, update section headings, command examples, and image filenames.scripts/train/tulu3/grpo_8b.sh.grpo(e.g., classes and helpers moved fromgrpo_fasttogrpo).grpo_fast.pytogrpo.pyacrossscripts/train/**and benchmarking.grpo_fastscripts and add/expandgrpo.shvariants (debug, single/multi-GPU, tool/judge flows).Written by Cursor Bugbot for commit 92f4fb1. This will update automatically on new commits. Configure here.