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

[Feature] Support DPO, ORPO and Reward Model #743

Merged
merged 46 commits into from
Jun 13, 2024

Conversation

RangiLyu
Copy link
Contributor

@RangiLyu RangiLyu commented Jun 3, 2024

DPO, ORPO, and Reward Model Training

image

Feature List

  • Efficient training by utilizing packed chosen/rejected pairs when flash_attention is used. Significantly minimizes GPU memory wastage due to padding tokens in batch training.
  • Unified dataset format across DPO, ORPO, and Reward Model.
  • Support for QLora training
  • Support for sequence parallel training

Tasks Pending

  • Documentation
  • Convert reward model to huggingface format
  • Validationdataset

@RangiLyu RangiLyu changed the title [WIP][Feature] Support DPO, ORPO and Reward Model [Feature] Support DPO, ORPO and Reward Model Jun 3, 2024
@pppppM pppppM requested review from HIT-cwh and hhaAndroid June 3, 2024 09:30
max_length = 2048

# Scheduler & Optimizer
batch_size = 4 # per_device
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

其他我看都是 1,为啥这个是 4?

@pppppM pppppM merged commit a607fa3 into InternLM:main Jun 13, 2024
1 of 3 checks passed
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

4 participants