
Batch Size is the number of training examples a model processes at once before updating its parameters. It is an important setting that affects both training speed and stability.
What it means in plain English
Rather than learning from the entire dataset in one go (often impractical) or one example at a time (often slow and noisy), models typically process data in small groups called batches. The batch size is how many examples are in each group. After each batch, the model updates its parameters. Larger batches give smoother, more stable updates but need more memory; smaller batches are noisier but can sometimes generalise better.
It is one of the hyperparameters a practitioner tunes to balance speed, memory, and results.
A simple example
With a batch size of 32, a model looks at 32 training examples, calculates how to improve based on that group, updates itself, and then moves on to the next 32 — repeating until it has been through the whole dataset (one epoch).
Why it matters
Batch size influences how fast and how well a model trains, and it is constrained by available hardware memory. It is a practical, everyday consideration in training, and understanding it demystifies part of how models actually consume their data.
Related terms
- Epoch — a full pass through the data, made up of many batches.
- Hyperparameter — batch size is one of these settings.
- GPU — its memory limits the usable batch size.
Frequently asked questions
What does batch size affect?
It affects training speed, memory use, and stability. Larger batches use more memory but can train faster per step; smaller batches use less memory and can sometimes generalise better.
What is a “mini-batch”?
A mini-batch is a small subset of the training data processed together before updating the model — the common middle ground between using one example at a time and the whole dataset at once.