-
Notifications
You must be signed in to change notification settings - Fork 2.1k
💔 [SFT] Raise error when formatting_func
is used with completion_only_loss
#3385
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
💔 [SFT] Raise error when formatting_func
is used with completion_only_loss
#3385
Conversation
trl/trainer/sft_trainer.py
Outdated
"which is incompatible with completion-only loss. The completion_only_loss is True either because " | ||
"you explicitly set it or because your dataset is in prompt-completion format." |
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 incorporate the following recommendation? I think it's more actionable:
apply your format function before passing your dataset, or alternatively, disable
completion_only_loss
inSFTConfig
.
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.
Have a look now and tell me 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.
nice, thanks!
formatting_func
+ completion_only_loss
formatting_func
is used with completion_only_loss
formatting_func
is used with completion_only_loss
formatting_func
is used with completion_only_loss
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. |
What does this PR do?
Succeeds #3381. Instead of extending
formatting_func
to support prompt-completion we update the documentation and raise an error whenever a formatting function is passed together withcompletion_only_loss=True
Fixes #3343
Before submitting
Pull Request section?
to it if that's the case.
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.