Skip to content

Conversation

@finbarrtimbers
Copy link
Collaborator

@finbarrtimbers finbarrtimbers commented Nov 3, 2025

Note

Renames grpo_fast.py to grpo.py and updates all references across code, docs, tests, and launch scripts.

  • Core
    • Replace open_instruct/grpo_fast.py with open_instruct/grpo.py and update imports/type hints (e.g., benchmark_generators.py, test_grpo.py).
    • Update mason.py OPEN_INSTRUCT command/resumable lists to open_instruct/grpo.py.
  • Docs
    • Revise GRPO docs to reference grpo.py, update section headings, command examples, and image filenames.
    • Update internal setup guide examples to use scripts/train/tulu3/grpo_8b.sh.
  • Tests
    • Rename and adjust tests to import/use grpo (e.g., classes and helpers moved from grpo_fast to grpo).
  • Scripts
    • Replace all script invocations from grpo_fast.py to grpo.py across scripts/train/** and benchmarking.
    • Remove deprecated grpo_fast scripts and add/expand grpo.sh variants (debug, single/multi-GPU, tool/judge flows).
    • Update experiment names, env flags, and some default hyperparameters where applicable.

Written by Cursor Bugbot for commit 92f4fb1. This will update automatically on new commits. Configure here.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • File Renaming: The file open_instruct/grpo_fast.py has been renamed to open_instruct/grpo.py, simplifying the naming convention for the GRPO implementation.
  • Codebase Cleanup: Several older or redundant training scripts, specifically open_instruct/grpo_vllm_thread_ray_gtrl.py, open_instruct/online_dpo_vllm_thread.py, and open_instruct/ppo_vllm_thread_ray_gtrl.py, have been removed from the repository.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants