-
Notifications
You must be signed in to change notification settings - Fork 2.1k
🐙 MPO #2544
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
🐙 MPO #2544
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Here is a rough colab notebook that I have created. In the notebook:
Here are my queries:
|
@qgallouedec Here is a rough colab notebook with the current MPO training. Let me know what you think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Some initial comments :)
Really nice!!! But don't do this (important): # Apply the chat template
prompt = processor.apply_chat_template(prompt, tokenize=False)
chosen = processor.apply_chat_template(chosen, tokenize=False)
rejected = processor.apply_chat_template(rejected, tokenize=False) The DPO Trainer handle applying the chat template. See #1930 for more info. This code snippet is present in so many examples online, it's a scourge. 😩 |
trl/trainer/dpo_config.py
Outdated
@@ -15,7 +15,7 @@ | |||
import warnings | |||
from dataclasses import dataclass, field | |||
from enum import Enum | |||
from typing import Any, Callable, Optional, Union | |||
from typing import Any, Callable, Optional, Union, List, Dict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use list
and dict
instead
Co-authored-by: ariG23498 <aritra.born2fly@gmail.com> Co-authored-by: Kashif Rasul <kashif.rasul@gmail.com> Co-authored-by: sergiopaniego <sergiopaniegoblanco@gmail.com>
What does this PR do?
Fixes # (issue)
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines.
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.