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

[DPO] fix DPO + GC issues #927

Merged
merged 1 commit into from
Oct 31, 2023
Merged

[DPO] fix DPO + GC issues #927

merged 1 commit into from
Oct 31, 2023

Conversation

younesbelkada
Copy link
Contributor

What does this PR do?

Fixes #801
Fixes huggingface/peft#1056

For DPO, when one uses gradient_checkpointing we need to attach hooks to enable inputs to have requires grad to true, otherwise the training will either silently fail or completely fail

cc @lvwerra

@younesbelkada younesbelkada mentioned this pull request Oct 30, 2023
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 30, 2023

The documentation is not available anymore as the PR was closed or merged.

@younesbelkada younesbelkada requested a review from lvwerra October 30, 2023 17:28
@younesbelkada younesbelkada merged commit b89b712 into main Oct 31, 2023
8 checks passed
@younesbelkada younesbelkada deleted the dpo-fix branch October 31, 2023 09:55
lapp0 pushed a commit to lapp0/trl that referenced this pull request May 10, 2024
@RUFFY-369 RUFFY-369 mentioned this pull request May 20, 2024
4 tasks
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.

DPO and accelerate
3 participants