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

[Trainer] Change num_train_epochs default value #8113

Merged
merged 2 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/trainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,9 @@ Trainer 是一个简单,但功能完整的 Paddle训练和评估模块,并
--num_train_epochs
要执行的训练 epoch 总数(如果不是整数,将在停止训练
之前执行最后一个 epoch 的小数部分百分比)。
(`float`, 可选, 默认为 3.0):
(`float`, 可选, 默认为 1.0):

Total number of training epochs to perform. (default:3.0)
Total number of training epochs to perform. (default:1.0)

--max_steps
如果设置为正数,则表示要执行的训练步骤总数。
Expand Down
4 changes: 2 additions & 2 deletions paddlenlp/trainer/training_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class TrainingArguments:
The epsilon hyperparameter for the [`AdamW`] optimizer.
max_grad_norm (`float`, *optional*, defaults to 1.0):
Maximum gradient norm (for gradient clipping).
num_train_epochs(`float`, *optional*, defaults to 3.0):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

中文文档同步修改

num_train_epochs(`float`, *optional*, defaults to 1.0):
Total number of training epochs to perform (if not an integer, will perform the decimal part percents of
the last epoch before stopping training).
max_steps (`int`, *optional*, defaults to -1):
Expand Down Expand Up @@ -391,7 +391,7 @@ class TrainingArguments:
adam_epsilon: float = field(default=1e-8, metadata={"help": "Epsilon for AdamW optimizer."})
max_grad_norm: float = field(default=1.0, metadata={"help": "Max gradient norm."})

num_train_epochs: float = field(default=3.0, metadata={"help": "Total number of training epochs to perform."})
num_train_epochs: float = field(default=1.0, metadata={"help": "Total number of training epochs to perform."})
max_steps: int = field(
default=-1,
metadata={"help": "If > 0: set total number of training steps to perform. Override num_train_epochs."},
Expand Down
Loading