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

KTO - support loading the adapter twice #1430

Closed
claralp opened this issue Mar 14, 2024 · 4 comments · Fixed by #1542
Closed

KTO - support loading the adapter twice #1430

claralp opened this issue Mar 14, 2024 · 4 comments · Fixed by #1542
Labels
✨ enhancement New feature or request 🏋 KTO Related to KTO

Comments

@claralp
Copy link
Contributor

claralp commented Mar 14, 2024

For DPOTrainer there exists the option to load the Adapter from SFT training twice, as in Reference model considerations with PEFT - load-the-adapter-twice:

# Initialize the trainer, without a ref_model param.
dpo_trainer = DPOTrainer(
    model,
    ...
    model_adapter_name="train",
    ref_adapter_name="reference",
)

In DPOTrainer this allows me to use a larger batch size and speed up training.
Would be cool to have this option in KTOTrainer as well. Anyone working on this already?

@PhilipMay
Copy link
Contributor

PhilipMay commented Mar 18, 2024

Hi @lewtun , we had a discussion about KTO. Do you already work on this or should we come up with a PR?

We would try and use the code from DPO and apply it to KTO to implement this.

@younesbelkada younesbelkada added ✨ enhancement New feature or request 🏋 KTO Related to KTO labels Apr 8, 2024
@claralp
Copy link
Contributor Author

claralp commented Apr 11, 2024

@younesbelkada @kashif, is this a desired feature for you as well?
If yes, is someone already implementing it or should we come up with a PR?

@kashif
Copy link
Collaborator

kashif commented Apr 11, 2024

I believe would be good to have yes, and no one is working on it

@PhilipMay
Copy link
Contributor

That feature would be super useful @claralp . Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request 🏋 KTO Related to KTO
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants