Step versus epoch in a training run: define the relationship.
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
A step is one optimizer update over one effective batch; an epoch is one full pass through the dataset. Steps per epoch equals dataset size divided by effective batch size.
Think of reading a thick novel. A step is reading one chunk of pages and pausing to think about what you just read. One full pass through the whole book is the bigger unit. If the book has 1,200 pages and you read 32 pages between pauses, you pause 1,200 divided by 32 times to finish the book once. That is the relationship. The page count is how much data you have, the pause cadence is the chunk size you set, and the number of pauses is how many small updates fit inside one full read-through. A trainer can stop when you finish three books or after a fixed number of pauses, whichever comes first.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: define step and epoch, give the steps_per_epoch formula, name the three factors in the effective batch, and end on tokens seen as the portable budget unit.
| Term | Counts what | Depends on |
|---|---|---|
| Step | One optimizer update | Effective batch size |
| Epoch | One full data pass | Dataset size |
| Effective batch | Examples per update | Micro-batch, accumulation, GPU count |
| Tokens seen | Total training work | Examples processed times sequence length |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Quoting steps without naming the effective batch size, or forgetting that gradient accumulation and the GPU count both multiply into it. The same step count means different work on different cluster shapes.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.