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 the possibility to skip prepare_model_for_kbit_training #2459

Open
hugoabonizio opened this issue Dec 10, 2024 · 1 comment
Open

Add the possibility to skip prepare_model_for_kbit_training #2459

hugoabonizio opened this issue Dec 10, 2024 · 1 comment
Labels
🏋 DPO Related to DPO ✨ enhancement New feature or request

Comments

@hugoabonizio
Copy link

Feature request

I'd like to be able to skip the prepare_model_for_kbit_training call that occurs inside DPOTrainer.

Motivation

I noticed a significant speedup by skipping the prepare_model_for_kbit_training call in DPOTrainer without degrading training quality by properly setting the gradient checkpointing configurations, as mentioned in this and this comments.

Your contribution

I can open a PR that adds a flag to allow users to skip this call when desired.

@qgallouedec
Copy link
Member

Thanks for this suggestion.
Can you quantify the speedup?
Any idea how to properly set the gradient checkpointing configurations?

Can we reproduce the speedup with a very simple code example?

@qgallouedec qgallouedec added ✨ enhancement New feature or request 🏋 DPO Related to DPO labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏋 DPO Related to DPO ✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants