Can you please proive a more simple way to run a raft demo?
When I tried to run a raft demo, I met several tough bugs and find it hard to fix. The project code is highly coupled which makes it difficult to run a single part of the algorithms implemented in the LMFlow. Could you please provide a more simple way to run a raft demo? I found LMFlow has become a pypi library but I could not find a raft alignment demo in the document https://optimalscale.github.io/LMFlow/autoapi/lmflow/pipeline/raft_aligner/index.html
You may check https://optimalscale.github.io/LMFlow/examples/raft.html for a detailed tutorial. It seems that there is some index error so this blog is invisible from the index.html.
Hi @WeiXiongUST , I have finished the second step of finetuning the llama7b reward model; how many 40g a100 GPUs are required to train the third step of raft?
Hi @WeiXiongUST , I have finished the second step of finetuning the llama7b reward model; how many 40g a100 GPUs are required to train the third step of raft?
You may try to run the raft with both a 7b llama and a 7b reward model but I am not sure whether it works.
Indeed, we are considering separate implementations for each stage (inference, reward computation, and fine-tuning), which should allow us to train 13B models with 13B reward models, with say 2 or 4 40G A100 GPUs. Meanwhile, we hope the new codes to be more accessible for users to modify for their customized needs.
We are still testing these codes to make sure that they are bug-free but plan to do so soon.
Thanks for your response; I used the same base model(llama 7b), but a different lora, for reward prediction and model generation, and finished raft training.
@Nipi64310 @Zhang-Each
Hi! I just uploaded a temporary code that implements inference, reward computation, and supervised fine-tuning separately at https://github.com/WeiXiongUST/LMFlow-Raft-Test/blob/main/raft_iter.sh
You may have a look and try it out if interested. You just need to modify the script LMFlow-Raft-Test/raft_iter.sh with your own base_dir, starting model, and also your reward model and then run the script. I just tested it with reward model weqweasdas/hh_rlhf_rm_open_llama_3b and EleutherAI/gpt-neo-2.7B as the starting point and get
| Model Reward | Reward in the training set |
|---|---|
| 2.849879826968017 | 4.7972367252572266 |
| 4.18692914528348 | 6.005162512218964 |
| 4.609836313614981 | 6.33424511002445 |
| 4.756306608168377 | 6.5123869745845555 |
| 4.9620205011302545 | 6.687813110948191 |
| 5.053306900277981 | 6.686728677908113 |
| 5.0530508270711145 | 6.753848973607038 |
All the hyper-parameters are left in this current version of code. If you encounter any problems, feel free to contact me!
https://github.com/WeiXiongUST/LMFlow-Raft-Test/blob/main/raft_iter.sh
Thank you! I will try this version.