Epoch
One complete pass through the entire training dataset — the basic unit of training progress, used to track how many times the model has seen each example.
In machine learning, training a model is a journey of steps and epochs.
An epoch is one complete pass through your entire training dataset, meaning the model has seen every single example exactly once. Because datasets are usually too large to process all at once, they are split into smaller batches. A single update of the model's weights after processing one batch is called a step, or an iteration. So, one epoch actually consists of many steps.
Deciding how many epochs to train is a delicate balancing act. If you train for too few epochs, the model underfits, meaning it hasn't learned enough to be useful. If you train for too many, it overfits, memorizing the training data instead of learning how to generalize to new information. The right number of epochs depends on your dataset, the size of your model, and your learning rate. For fine-tuning pre-trained models, three to ten epochs is a typical range.
To find the perfect stopping point, developers often use a technique called early stopping. This monitors the model's performance on a separate validation set and terminates the training automatically when the model stops improving, rather than waiting to hit a fixed number of epochs.
Both epochs and steps are crucial for managing your training workflow. You might choose to evaluate your model at the end of every epoch, or schedule your checkpoints to save after a set number of steps, regardless of where you are in the epoch.
What an epoch is
An epoch is one full pass through the training dataset. If the dataset contains 100,000 examples and the batch size is 32, one epoch consists of roughly 3,125 gradient update steps. After each epoch, every training example has been seen exactly once. Training typically runs for multiple epochs — the model sees the same data many times, learning to generalise from it rather than memorise it.
How many epochs to train
Too few epochs and the model hasn't learned enough — it underfits. Too many and it memorises the training data rather than generalising — it overfits. The right number depends on the dataset size, the model size, and the learning rate. For fine-tuning pre-trained transformers, 3–10 epochs is typical. LinkjeBERT was trained for 10 epochs with early stopping so that training terminated when validation performance stopped improving rather than after a fixed count.
Epoch vs. step
A step (or iteration) is a single weight update, processing one batch. An epoch contains many steps. Both are used to schedule events during training: saving a checkpoint every 500 steps, or evaluating on the validation set at the end of every epoch. The DEJAN grounding classifier saved and validated every 500 steps regardless of epoch boundaries.
