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

IPO loss computation vs changes in DPO dataset format #1581

Closed
JubilantJerry opened this issue Apr 24, 2024 · 1 comment
Closed

IPO loss computation vs changes in DPO dataset format #1581

JubilantJerry opened this issue Apr 24, 2024 · 1 comment

Comments

@JubilantJerry
Copy link

According to #1294, IPO needs to compute the average logp over the sequence dimension when comparing the chosen response and the rejected response.

However, the new data format in v0.8.2 (for example, see https://huggingface.co/datasets/trl-internal-testing/hh-rlhf-trl-style vs. the older https://huggingface.co/datasets/trl-internal-testing/Anthropic-hh-rlhf-processed) makes it so that only the first message in a chat is the prompt, and all the remaining messages become part of the chosen or the rejected response. This implies that the "prompt" actually appears in the chosen and rejected columns, and are the same between the two.

This is not a problem for DPO, since the common prefix of these two columns contributes 0 to the loss. However, for IPO the loss is averaged across the sequence length, and with the changed data format the sequence contains all these "prompt" tokens that contribute to the averaging.

I imagine this is not intended? I also am wondering why the dataset has changed to put the "prompt" into the chosen and rejected columns.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

@github-actions github-actions bot closed this as completed Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant