Skip to content
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

Add two features which supports training PPO in one graphic card for large model and ChatGLM-6B model support #3567

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

yynil
Copy link
Contributor

@yynil yynil commented Apr 14, 2023

📌 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?

  1. Add model support for ChatGLM-6B.
  2. Add a video ram friendly trainer when training PPO model. One 3090ti with 24GB vram can finish the PPO training.
  3. Add Peft reward model, so all stage-3 models are peft.
  4. 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.

@Fazziekey
Copy link
Contributor

@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

@Fazziekey
Copy link
Contributor

I think this PR changes too many things, I think you can split it into three PR:

@yynil
Copy link
Contributor Author

yynil commented Apr 17, 2023

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

@Fazziekey
Copy link
Contributor

Fazziekey commented Apr 17, 2023

I add how to support your own model in this PR, #3579, please refer to it @yynil

@yynil
Copy link
Contributor Author

yynil commented Apr 25, 2023

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.

@binmakeswell
Copy link
Member

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.

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.

None yet

3 participants