Skip to main content
Early access β€” new tools and guides added regularly
Core AI

Epoch

Last reviewed: April 2026

One complete pass through the entire training dataset during model training β€” most models require many epochs to learn effectively.

An epoch is one complete pass through the entire training dataset. If you have ten thousand training examples and you train for five epochs, the model sees each example five times. It is a fundamental unit of measurement in machine learning training.

Why multiple epochs are needed

A model rarely learns well from seeing the data just once. Each epoch allows the model to refine its understanding:

  • First epoch β€” the model learns broad, obvious patterns
  • Middle epochs β€” the model picks up subtler relationships
  • Later epochs β€” the model fine-tunes its parameters for difficult cases

The learning rate typically decreases over epochs, so early passes make large adjustments and later passes make small refinements.

How to choose the number of epochs

There is no universal answer. Common approaches:

  • Fixed number β€” set a number based on experience (often ten to one hundred for image models, three to five for fine-tuning LLMs)
  • Early stopping β€” monitor performance on a validation set and stop training when it stops improving. This prevents overfitting.
  • Learning curves β€” plot training and validation loss over epochs. Stop when validation loss starts increasing while training loss continues decreasing (the classic overfitting signal).

Epochs vs. steps vs. iterations

  • An epoch is one pass through all data
  • A step (or iteration) is one weight update, which processes one batch
  • If you have ten thousand examples with a batch size of one hundred, one epoch equals one hundred steps

Practical implications

  • More epochs means more training time and compute cost
  • Too few epochs: the model underfits (has not learned enough)
  • Too many epochs: the model overfits (memorises training data instead of learning general patterns)
  • Modern large language model training often involves less than one epoch of the full dataset β€” the data is so vast that one pass is sufficient

Epochs in fine-tuning

When fine-tuning a pre-trained model on your specific data, you typically need very few epochs (often one to three) because the model already has a strong foundation.

Want to go deeper?
This topic is covered in our Practitioner level. Access all 60+ lessons free.

Why This Matters

Understanding epochs helps you make practical decisions about AI training: how long it will take, how much it will cost, and when to stop. It is also essential vocabulary for communicating with data science teams about training runs, compute budgets, and model performance.

Related Terms

Learn More

Continue learning in Practitioner

This topic is covered in our lesson: Building Your First AI Workflow