# Batch Size

- **Canonical URL:** https://getaimath.com/dictionary/batch-size/
- **Topics:** [AI & Machine Learning Fundamentals](https://getaimath.com/dictionary/category/ai-and-machine-learning-fundamentals/)
- **Last updated:** 2026-11-25

## What is Batch Size?

**In one sentence:** Batch size is how many examples go into each batch during training.

A small batch size means more frequent, noisier updates; a large batch size means fewer, smoother updates but needs more memory. People pick a batch size that fits their hardware and helps the model learn well. In inference, batch size can also mean how many requests are handled together.

![Training vs. Inference: Studying Flashcards vs. Taking the Test — Simple cartoon diagram comparing AI Training (studying 1,000 flashcards and fixing mistakes until the brain learns the pattern) with AI Inference (answering a brand-new question in 1 second on test day).](https://getaimath.com/diagrams/ai-and-machine-learning-fundamentals.png)
*Napkin Diagram (AI & Machine Learning Fundamentals): Training is the long study session where the AI learns from examples; inference is test day when you actually use it.*

### Quick Math / Rule of Thumb

Effective Batch Size = Micro-Batch Size × Gradient Accumulation Steps × Data-Parallel GPUs.

## What is an example of Batch Size?

Setting batch size to 32 means the model learns from 32 examples at a time.

## Why does Batch Size matter?

Batch size affects how fast training runs, how much memory it needs, and how well the model learns.

## Related Concepts

- [Batch](https://getaimath.com/dictionary/batch/): A batch is a small group of training examples that the model looks at together before updating its numbers.
- [Learning Rate](https://getaimath.com/dictionary/learning-rate/): The learning rate controls how big each step is when a model updates its numbers during training.
- [Epoch](https://getaimath.com/dictionary/epoch/): An epoch is one full pass through the entire training dataset.
- [Accuracy](https://getaimath.com/dictionary/accuracy/): Accuracy is the share of answers a model gets right, out of all the answers it gives.
- [Hyperparameters](https://getaimath.com/dictionary/hyperparameters/): Hyperparameters are the settings people choose before training starts, which control how the model learns.
- [Precision](https://getaimath.com/dictionary/precision/): Precision tells you, of all the times the model said "yes," how often it was actually right.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/batch-size/)
