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 DPO training #1242

Merged
merged 16 commits into from
Sep 8, 2024
Merged

Add DPO training #1242

merged 16 commits into from
Sep 8, 2024

Conversation

dmahan93
Copy link
Contributor

Still a bit of a WIP (docs, adding precomputation of reference logprobs) but figured it'd be good to get it up here now since it's a fairly big change for any discussions that are needed.

dmahan93 added 6 commits June 21, 2024 11:27
- fix labels to also have valid/test implementations
- fix label masking in _get_batch to also include anything from get_ltor_masks_and_position_ids
…eful (accuracy, etc)

- Add reference model setup for DPO
- Add pairwise dataset for positive/negative pairs
- Add DPO loss
@dmahan93
Copy link
Contributor Author

Also builds off #1240 and #1239 since the packing implementations/chat templating items are much more useful for DPO.

@dmahan93 dmahan93 marked this pull request as draft June 25, 2024 17:56
@dmahan93 dmahan93 marked this pull request as ready for review June 26, 2024 00:33
@dmahan93 dmahan93 mentioned this pull request Jun 28, 2024
@StellaAthena StellaAthena mentioned this pull request Jun 28, 2024
Copy link
Member

@Quentin-Anthony Quentin-Anthony left a comment

Choose a reason for hiding this comment

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

Passes my tests. Great work @dmahan93 !

@Quentin-Anthony Quentin-Anthony merged commit 77e8158 into EleutherAI:main Sep 8, 2024
2 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.

2 participants