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

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

Add DPO training #1242

wants to merge 12 commits into from

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.

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

1 participant