-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Question] desirable_weight and undesirable_weight in KTOTrainer #1467
Comments
Thanks for pointing this out @seanexp ! This looks like a bug, since I was under the (incorrect) impression that interleaving datasets with all_exhausted would preserve the relative size of the original datasets, which on second look, it appears to not do. Instead, it duplicates the data in an unpredictable way, which we don't want. The interleaving is also unnecessary, at least in the current version of the code, so I'll make a PR to remove it. |
Thanks! @kawine |
Hi ! This should be fixed by #1499 I believe, do you think we can close this issue? |
@younesbelkada Yes, I'll close this issue |
I found that KTOTrainer logs warning message if desirable_weight or undesirable_weight are not in ideal bounds.
However, KTOTrainer makes balanced dataset via
interleave_datasets
.Given that the training dataset is balanced, the
lower_bound
andupper_bound
calculation seems a bit awkward.To my understanding the equation below
should be rewritten into
as the ratio of
len(undesirable)
andlen(desirable)
equals 1 ininterleaved_train_dataset
.Please correct me if I'm wrong. (cc. @kashif @kawine )
Thanks in advance!
The text was updated successfully, but these errors were encountered: