-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Almost successfully reproducing open-r1/OpenR1-Qwen-7B based on Qwen/Qwen2.5-Math-7B-Instruct. Here are the training configurations. #545
Comments
Thanks for sharing! I wonder if replacing Rightnow, the OpenR1 recipes train on both prompts and response. It doesn't seem like common practices. |
@Tim-Siu I am not sure if the performance will boost. For the current version, it only costs 12 hours for sft on one node of 8 x H100s (80GB). If replacing |
how to run 7b model on multiple gpus, 1 A800 encounters oom errors |
Thank you so much!! I had two questions:
|
|
After encountering several errors and incorrect results, I'd like to share my experience reproducing
open-r1/OpenR1-Qwen-7B
based onQwen/Qwen2.5-Math-7B-Instruct
.The training commands below are configured for a node of 8 x H100s (80GB).
1. Modify the config file of Qwen/Qwen2.5-Math-7B-Instruct
After downloading the model
Qwen/Qwen2.5-Math-7B-Instruct
, we should modifythe model config file
following https://huggingface.co/open-r1/OpenR1-Qwen-7B/blob/main/config.json2. Modify the training recipes correctly
If you follow the official installation steps and run the following training command:
The first issue you’ll encounter is #366.
To resolve this issue, the effective way is to modify the corresponding recipe: https://github.com/huggingface/open-r1/blob/main/recipes/OpenR1-Qwen-7B/sft/config.yaml by changing the line 29
Other solutions will lead to other issues, such as:
trl
to0.15.x
: it might not work or have this issue: https://huggingface.co/open-r1/OpenR1-Qwen-7B/discussions/7 ;use_liger_kernel: false
: then we cannot set thegradient_accumulation_steps: 2
since it will bring an OOM problem;3. Modify the sft.py file
Following this issue: #494, we could change the
sft.py
https://github.com/huggingface/open-r1/blob/main/src/open_r1/sft.py as follows:4. The reproducing results on AIME24, MATH-500
I tested the saved model (the total step is 3219 steps), and the performance is:
I tested
open-r1/OpenR1-Qwen-7B
, and the performance is:It seems that this model is saved at step 3150.
The text was updated successfully, but these errors were encountered: