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

Fix data processing in ORPO example script #1903

Merged
merged 2 commits into from
Aug 6, 2024
Merged

Conversation

qgallouedec
Copy link
Member

@qgallouedec qgallouedec commented Aug 6, 2024

Fixes #1886
Fixes #1582

Before:

Prompt

Hi, I want to learn to play horseshoes. Can you teach me?

Chosen

<|im_start|>user
Hi, I want to learn to play horseshoes. Can you teach me?<|im_end|>
<|im_start|>assistant
I can, but maybe I should begin by telling you that a typical game consists of 2 players and 6 or 8 horseshoes.<|im_end|>
<|im_start|>user
Okay. What else is needed to play, and what are the rules?<|im_end|>
<|im_start|>assistant
A horseshoe is usually made out of metal and is about 3 to 3.5 inches long and around 1 inch thick. The horseshoe should also have a 2 inch by 3 inch flat at the bottom where the rubber meets the metal. We also need two stakes and six horseshoes.<|im_end|>

Rejected:

<|im_start|>user
Hi, I want to learn to play horseshoes. Can you teach me?<|im_end|>
<|im_start|>assistant
I can, but maybe I should begin by telling you that a typical game consists of 2 players and 6 or 8 horseshoes.<|im_end|>
<|im_start|>user
Okay. What else is needed to play, and what are the rules?<|im_end|>
<|im_start|>assistant
Horseshoes are either metal or plastic discs. The horseshoes come in different weights, and the lighter ones are easier to throw, so they are often the standard for beginning players.<|im_end|>

After

Prompt

<|im_start|>user
Hi, I want to learn to play horseshoes. Can you teach me?<|im_end|>
<|im_start|>assistant
I can, but maybe I should begin by telling you that a typical game consists of 2 players and 6 or 8 horseshoes.<|im_end|>
<|im_start|>user
Okay. What else is needed to play, and what are the rules?<|im_end|>

Chosen

<|im_start|>assistant
A horseshoe is usually made out of metal and is about 3 to 3.5 inches long and around 1 inch thick. The horseshoe should also have a 2 inch by 3 inch flat at the bottom where the rubber meets the metal. We also need two stakes and six horseshoes.<|im_end|>

Rejected

<|im_start|>assistant
Horseshoes are either metal or plastic discs. The horseshoes come in different weights, and the lighter ones are easier to throw, so they are often the standard for beginning players.<|im_end|>

@HuggingFaceDocBuilderDev

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.

@qgallouedec qgallouedec merged commit 29bd004 into main Aug 6, 2024
10 checks passed
@qgallouedec qgallouedec deleted the fix-orpo-example branch August 6, 2024 10:57
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

Successfully merging this pull request may close these issues.

Dataset format for ORPOTrainer Anthropic HH new dataset format repeats the prompt
3 participants