ColossalAI
ColossalAI copied to clipboard
Add two features which supports training PPO in one graphic card for large model and ChatGLM-6B model support
📌 Checklist before creating the PR
- [ x] I have created an issue for this PR for traceability
- [ x] The title follows the standard format:
[doc/gemini/tensor/...]: A concise description - [ x] I have added relevant tags if possible for us to better distinguish different PRs
🚨 Issue number
Link this PR to your issue with words like fixed to automatically close the linked issue upon merge
e.g.
fixed #1234,closed #1234,resolved #1234'Implement ##3566', 'Implement #3565'
📝 What does this PR do?
- Add model support for ChatGLM-6B.
- Add a video ram friendly trainer when training PPO model. One 3090ti with 24GB vram can finish the PPO training.
- Add Peft reward model, so all stage-3 models are peft.
- Add a support to preprocess texts to binary datasets to save the data process time.
💥 Checklist before requesting a review
- [x ] I have linked my PR to an issue (instruction)
- [ x] My issue clearly describes the problem/feature/proposal, with diagrams/charts/table/code if possible
- [x ] I have performed a self-review of my code
- [x ] I have added thorough tests.
- [ x] I have added docstrings for all the functions/methods I implemented
⭐️ Do you enjoy contributing to Colossal-AI?
- [x ] 🌝 Yes, I do.
- [ ] 🌚 No, I don't.
Tell us more if you don't enjoy contributing to Colossal-AI.
@yynil hello, if you want to support more models, can you add all models class in https://github.com/hpcaitech/ColossalAI/tree/main/applications/Chat/coati/models? you can make a dir glm in https://github.com/hpcaitech/ColossalAI/tree/main/applications/Chat/coati/models/glm
I think this PR changes too many things, I think you can split it into three PR:
- add glm models: including Reward model, actor model, critic model and LMmodels;
- add datasets preprocess in https://github.com/hpcaitech/ColossalAI/tree/main/applications/Chat/coati/dataset
- add community example in https://github.com/hpcaitech/ColossalAI/tree/main/applications/Chat/examples/community
@yynil hello, if you want to support more models, can you add all models class in https://github.com/hpcaitech/ColossalAI/tree/main/applications/Chat/coati/models? you can make a dir glm in https://github.com/hpcaitech/ColossalAI/tree/main/applications/Chat/coati/models/glm
I'll create another branch to separate these changes.
I add how to support your own model in this PR, https://github.com/hpcaitech/ColossalAI/pull/3579, please refer to it @yynil
Since the ChatGLM is not willing to release a smaller model to public to train a reward model, I'm suspending the support to ChatGLM. My Branch will then move to bloom because bloom has a very good small model to allow us train reward model much easier.
Since the ChatGLM is not willing to release a smaller model to public to train a reward model, I'm suspending the support to ChatGLM. My Branch will then move to bloom because bloom has a very good small model to allow us train reward model much easier.
Thanks, you are welcome to share and update your PR.