What Is an Epoch in AI Training?
An epoch is one full pass over your training data. Here is the step and batch arithmetic, and how many epochs a small fine-tuning set actually needs.
An epoch is one complete pass over your training data. If you have 600 examples and the model has seen all 600 once, that is one epoch. Run it again and you are on epoch two, with the same examples in a reshuffled order. The term matters mainly when fine-tuning, because the number of epochs is one of the few dials you set yourself, and setting it too high is the fastest way to make a model worse while every number on your screen looks better.
Epoch, batch, step: the arithmetic
These three get used interchangeably and they are not the same thing. Take a concrete dataset of 600 examples with a batch size of 8.
Batch. The group of examples processed together before weights are updated. Here, 8.
Step. One weight update, which is one batch. 600 divided by 8 gives 75 steps.
Epoch. One full pass, so 75 steps. Three epochs is 225 steps, and the model has seen each example three times.
That is the whole relationship: examples divided by batch size gives steps per epoch, and steps per epoch times epochs gives total steps. When a training log shows step 180 of 225, you are two-thirds through epoch three of three.
Each step is where the actual learning happens, by comparing the model's output to the expected one and nudging weights to reduce the difference. Our explainers on the loss function and how AI models work cover that mechanism.
Why more passes stop helping
Early epochs teach the model the pattern in your data. Later ones teach it your specific examples. The difference is the entire problem.
On a small dataset this arrives quickly. By the fourth or fifth pass over 600 examples, a model with billions of parameters can simply store them. Training loss keeps falling, which looks like progress, while performance on anything the model has not seen gets worse. That is overfitting, and epochs are the dial most likely to cause it.
The signal to watch is not training loss but validation loss, measured on examples held back from training. When training loss falls and validation loss starts rising, the useful part of the run is over. Everything after that point is memorisation.
How many epochs for a small fine-tune
There is no universal number, but the shape of the answer is consistent: small datasets need few passes, and the instinct to train longer is usually wrong.
Situation | Typical starting point | What to watch |
|---|---|---|
A few hundred examples, light task adaptation | 2 to 3 epochs | Validation loss turning upward after epoch 2 |
A few thousand examples | 1 to 3 epochs | Whether epoch 2 improves validation at all |
Tens of thousands of examples | 1 epoch is often enough | Whether you needed fine-tuning rather than better prompting |
Style or format adaptation only | 1 to 2 epochs | Outputs becoming rigid or repetitive |
Treat these as starting points to measure from, not settings to copy. The reliable method is to save a checkpoint at the end of each epoch, evaluate each one against held-back examples, and keep whichever wins. That costs a little storage and removes the guesswork entirely.
Where epochs do not apply
Two common cases make the word irrelevant, which is worth knowing before you go looking for the setting.
Pretraining a large model from scratch is often described in tokens rather than epochs, because the corpus is so large that the model may see much of it only once. Counting passes over a trillion-token dataset is not the useful unit.
And if you are not training at all, there is no epoch to set. Putting examples in a prompt teaches the model nothing persistent. Whether your problem needs fine-tuning or better context is the question we work through in fine-tuning explained, and parameter-efficient methods such as LoRA change what each pass costs without changing what an epoch means.
Frequently asked questions
What is the difference between an epoch and a step?
A step is one weight update on one batch. An epoch is a full pass over the dataset, which is many steps. With 600 examples and a batch size of 8, one epoch is 75 steps.
How many epochs should I fine-tune for?
For a few hundred examples, two to three is a reasonable starting point. Rather than trusting a number, checkpoint each epoch, evaluate on held-back data, and keep the best one.
Does more epochs mean a better model?
Only up to a point. Past it, the model memorises your examples instead of learning the pattern, and performance on new inputs falls even as training loss keeps improving.
Can I use a fraction of an epoch?
Yes. Training is usually configured by total steps, so stopping partway through a pass is normal, and on very large datasets a single full pass may never be completed.
How did this land?
About the author

Senior Editor, AI & Product
Cecilia leads the Swarmz editorial desk. She has spent a decade turning complex AI and product topics into writing people actually finish, and she owns the blog's quality bar.


