ggml_callback_early_stopping: Early stopping callback

View source: R/callbacks.R

ggml_callback_early_stoppingR Documentation

Early stopping callback

Description

Stops training when the monitored metric does not improve.

Usage

ggml_callback_early_stopping(
  monitor = "val_loss",
  patience = 5,
  min_delta = 0,
  mode = "auto"
)

Arguments

monitor

Metric to monitor: "val_loss", "val_accuracy", "train_loss", "train_accuracy"

patience

Number of epochs with no improvement before stopping

min_delta

Minimum change to qualify as improvement

mode

"min" (lower is better) or "max" (higher is better). "auto" infers from monitor name.

Value

List with on_epoch_end function

See Also

Other callbacks: ggml_schedule_cosine_decay(), ggml_schedule_reduce_on_plateau(), ggml_schedule_step_decay()


ggmlR documentation built on July 14, 2026, 1:08 a.m.