-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Clean configs documentation #1944
Conversation
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. |
…o clean-config
…o clean-config
@@ -125,14 +150,14 @@ class DPOConfig(TrainingArguments): | |||
truncation_mode: str = "keep_end" | |||
max_length: Optional[int] = None | |||
max_prompt_length: Optional[int] = None | |||
max_target_length: Optional[int] = None | |||
max_completion_length: Optional[int] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized this was not consistent with other trainers. Changing it shouldn't be breaking, right? Or maybe add a post-init warning?
@kashif @edbeeching @lewtun
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a post-init warning.
This PR focuses on standardizing and enhancing the configuration documentation across the codebase. Consistency and uniformity make maintenance easier and improve readability. Future PRs will extend these improvements to other components, particularly the trainers.
Key Changes
Optional
means that the value can beNone
, and*optional*
means that it is not required for the user to pass a value. Eg: For values that can beNone
:None
.Dict
type hints with more explicitDict[str, Any]
to clarify expected key-value pairs.Overall, this is the template:
Progress
alignprop_config.py
bco_config.py
cpo_config.py
ddpo_config.py
dpo_config.py
kto_config.py
model_config.py
online_dpo_config.py
orpo_config.py
ppo_config.py
ppov2_config.py
reward_config.py
rloo_config.py
sft_config.py
OnPolicyConfig
Possibly breaking changesdelayed for another PRDDPOConfig
andAlignProbConfig
now inherits fromTrainingArguments
. It implies:train_batch_size
in favour ofper_device_train_batch_size
of the super class.run_name
which is already available in the super class.output_dir
is now a required argument