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

Check tokenize params on DPOTrainer #1197

Merged
merged 2 commits into from
Jan 9, 2024

Conversation

pablovicente
Copy link
Contributor

Given that we tokenize the dataset on the DPOTrainer.__init__ regardless of having a custom data_collator, we need to ensure that a tokenizer is passed and warm about the need to set max_length, max_prompt_length and max_target_length . Hence, moving those checks outside of the data_collator check.

On older implementations these parameters were only needed if the user did not provide a data_collator but they are now required for all DPO runs.

@kashif

@younesbelkada younesbelkada requested a review from kashif January 9, 2024 05:50
@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.

@lvwerra lvwerra merged commit 26da9e8 into huggingface:main Jan 9, 2024
9 checks passed
lapp0 pushed a commit to lapp0/trl that referenced this pull request May 10, 2024
* Check if tokenizer and max len params are None

* Update warning messages for missing parameters
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.

4 participants