Skip to content

LD-DPO support #3458

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

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

LD-DPO support #3458

wants to merge 4 commits into from

Conversation

AIR-hl
Copy link
Contributor

@AIR-hl AIR-hl commented May 16, 2025

What does this PR do?

This PR adds LD-DPO implementations to TRL. This paper has been accepted by CoRR 2024

  • Liu W, Bai Y, Han C, et al. Length Desensitization in Directed Preference Optimization[J]. CoRR, 2024.

This paper proposed a novel method aims to desensitize DPO to data length by decoupling explicit length preference, which is relatively insignificant, from the other implicit preferences, thereby enabling more effective learning of the intrinsic preferences

image

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a GitHub issue? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@kashif
Copy link
Collaborator

kashif commented May 16, 2025

congrats! can you also kindly add the method in the dpo documentation with some description?

@AIR-hl
Copy link
Contributor Author

AIR-hl commented May 16, 2025

congrats! can you also kindly add the method in the dpo documentation with some description?

done

@kashif
Copy link
Collaborator

kashif commented May 16, 2025

also you can add a small test too?

@AIR-hl
Copy link
Contributor Author

AIR-hl commented May 16, 2025

also you can add a small test too?

Sorry, i dont know how to test if it is effective. T_T

@kashif
Copy link
Collaborator

kashif commented May 16, 2025

no problem, I can do it

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