[trainer] support early stop (#7797)

This commit is contained in:
hoshi-hiyouga
2025-04-22 01:59:33 +08:00
committed by GitHub
parent 0e4ce039ee
commit fddcd43c88
2 changed files with 8 additions and 1 deletions

View File

@@ -435,6 +435,10 @@ class FinetuningArguments(
default=False,
metadata={"help": "Whether or not to disable the shuffling of the training set."},
)
early_stopping_steps: Optional[int] = field(
default=None,
metadata={"help": "Number of steps to stop training if the `metric_for_best_model` does not improve."},
)
plot_loss: bool = field(
default=False,
metadata={"help": "Whether or not to save the training loss curves."},