Update DPO debug scripts and add production script#1449
Update DPO debug scripts and add production script#1449finbarrtimbers merged 5 commits intomainallenai/open-instruct:mainfrom finbarr/dpo-mfu-pr7-debug-scriptsallenai/open-instruct:finbarr/dpo-mfu-pr7-debug-scriptsCopy head branch name to clipboard
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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 refines the DPO (Direct Preference Optimization) training environment by updating existing debug scripts and introducing a new production-ready script. The changes aim to improve resource management through budget-based gradient checkpointing and model compilation, while also providing finer control over Beaker-related functionalities like evaluation job launches and automatic saving. A significant addition is the dedicated script for training the OLMo3-7B model with DPO in a multi-node, production setting. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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.
Code Review
This pull request updates DPO debug scripts and adds a new production script. My review identifies a critical bug in the new production script that would cause it to fail due to a missing line continuation character. I've also pointed out several medium-severity issues related to shell scripting best practices, such as quoting variables and maintaining consistency in flag values across scripts. Code suggestions are provided to address these points.
- Add --try_auto_save_to_beaker false to single_gpu.sh - Update multi_node.sh with budget checkpointing, compile_model, and disable eval/upload flags - Add new production DPO script for OLMo3-7B (7b_instruct_dpo_olmocore.sh) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
c9ef28c to
c50117b
Compare
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove --gradient_checkpointing and --gradient_checkpointing_mode (nonexistent in dpo.py; --activation_memory_budget handles this) - Remove --compile_model (defaults to True already) - Replace deprecated --tokenizer_name with --tokenizer_name_or_path Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| --env NCCL_IB_RETRY_CNT=7 \ | ||
| --num_nodes 4 \ | ||
| --budget ai2/oe-adapt \ | ||
| --gpus 8 -- torchrun \ |
There was a problem hiding this comment.
oh, interesting we launch with torchrun!
Summary
--try_auto_save_to_beaker falsetosingle_gpu.shmulti_node.shwith budget checkpointing, compile_model, and disable eval/upload flagsscripts/train/olmo3/7b_instruct_dpo_olmocore.sh)Note: The multi_node.sh script uses features from PRs 2-5 (gradient_checkpointing_mode, compile_model, etc.) and should be merged after those PRs.
Test plan
make style && make qualityRuns
🤖 Generated with Claude Code