fix: remove depregated arguments from DPOtrainer #138
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
December 2024 Student Submission
Module Completed
Changes Made
Describe what you've done in this PR:
I've removed some deprecated arguments from DPOtrainer class that was causing some errors to the notebook, I discovered that in the latest version of TRL (0.13.0), these parameters have been moved to the DPOConfig class.
To resolve the issue, the parameters causing errors need to be moved to the DPOConfig definition.
config = DPOConfig( ... beta=0.1, # DPO-specific temperature parameter max_prompt_length=1024, # Maximum length of the input prompt in tokens max_length=1536 # Maximum combined length of prompt + response in tokens )
https://github.com/huggingface/trl/blob/4c71daf461d86226ee36c30531d481c33c3e618e/trl/trainer/dpo_trainer.py#L149
Notebooks Added/Modified
List any notebooks you've added or modified:
module_name/student_examples/my_example.ipynb
2_preference_alignment/notebooks/dpo_finetuning_example.ipynb
Checklist
december-2024
branchQuestions or Discussion Points
Add any questions you have or points you'd like to discuss:
1.
2.
Additional Notes
Any other information that might be helpful for reviewers:
Here is the issue. Issue