liveBook · Manning

Epoch

As explained in Transformers in Action

A training epoch is one complete pass through the training dataset during model optimization.

An epoch is one complete pass through the training dataset during model optimization. The number of epochs is a hyperparameter: it is chosen before training, while model parameters are learned from data. section 8.1.1 section 8.1

Use the epoch count to balance learning progress against generalization:

  • Increasing the number of epochs can improve learning up to a point. section 8.1.1
  • Too many epochs can cause overfitting: the model memorizes training data and performs poorly on unseen data. section 8.1.1
  • Early stopping can interrupt training when a validation metric stops improving for a specified number of epochs. section 8.1.1

Training configuration

A training run sets the number of epochs alongside the learning rate and batch size. The epoch count controls how often the entire dataset is presented, while the other hyperparameters shape update size and gradient calculation. section 8.1.1

How Transformers in Action covers it

How deep it goes
Defines an epoch and explains its optimization trade-off, without descending into implementation mechanics.
Examples
Uses complete dataset passes, increased epoch counts, overfitting, and validation-based early stopping as concrete examples.
What you can do after
Operate/configure LLM training by choosing an epoch count and limiting it with validation-based early stopping.
How it connects
Connects epochs with hyperparameters, gradient descent, learning rate, batch size, overfitting, and early stopping.

Also explained in

Compare how 10 books explain epoch →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Transformers in Action. The section links point to the parts of the book it draws on.