Skip to content

Commit

Permalink
[Trainer] Change num_train_epochs default value (#8113)
Browse files Browse the repository at this point in the history
* change num_train_epochs default value

* update docs
  • Loading branch information
DesmonDay authored Mar 13, 2024
1 parent e145bfc commit 0a39fbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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):
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

0 comments on commit 0a39fbf

Please sign in to comment.