-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[Liger] liger DPO support #2568
base: main
Are you sure you want to change the base?
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. |
tests/test_dpo_trainer.py
Outdated
3. Loss values are reasonable and finite | ||
4. Training works with both default and custom beta values | ||
""" | ||
beta_values = [0.1, 0.5] # Test multiple beta values |
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.
Can you use @parameterized.expand
instead?
liger loss isn't compatible with ref precomputing right? If so we could add a warning or an error. |
docs/source/reducing_memory_usage.md
Outdated
|
||
## Liger for reducing peak memory usage | ||
|
||
[To complete] | ||
|
||
<hfoptions id="liger"> | ||
<hfoption id="DPO"> | ||
|
||
To use Liger for reducing peak memory usage, use the following code snippet: | ||
|
||
```python | ||
from trl import DPOConfig | ||
|
||
training_args = DPOConfig(..., use_liger_loss=True) | ||
``` | ||
|
||
</hfoption> | ||
</hfoptions> |
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.
@kashif I've added this section in the new guide for reducing memory usage, if you've words to fill it
What does this PR do?
Add support for Liger-kernel losses for the DPO Kernel
Needs: linkedin/Liger-Kernel#521