What Is Batch Size? How Many Examples a Model Sees Per Update

The number of training examples processed together before a single parameter update — a simple setting with real, sometimes surprising effects on training.

How many examples get processed per update

Batch size is the number of training examples processed together before the model's parameters get updated once, based on the average error across that whole batch — rather than updating after every single individual example, or only after the entire dataset.

The real tradeoffs involved in choosing it

A larger batch size gives a more stable, less noisy estimate of the true gradient direction and can better utilize parallel hardware like GPUs, but requires more memory and, somewhat counterintuitively, doesn't always lead to better final results — a certain amount of noise from smaller batches can actually help training find better solutions.

Why batch size and learning rate are often tuned together

Changing batch size generally requires adjusting the learning rate to match — a batch size doubled without a corresponding learning rate adjustment can behave quite differently than intended, which is why the two settings are typically treated as connected, not independently tunable knobs.

Frequently Asked Questions

What is batch size?

The number of training examples processed together before a model's parameters get updated once, based on the average error across that batch, rather than updating after every single example or the entire dataset.

Does a larger batch size always produce a better model?

Not automatically — while it gives a more stable gradient estimate and better hardware utilization, some noise from smaller batches can actually help training find better solutions, and larger batches require more memory.

Keep Exploring