Skip to content
AI & Machine Learning Medium #batch-size#scaling-laws

Batch Size Scaling Laws

Bigger batches enable bigger LR. Critical batch size beyond which returns vanish.

A free, animated batch size scaling laws you can read here or embed on any website, from Scrollchart.

Batch Size Scaling Laws

Batch Size Scaling LawsThroughput rises to B₎; sample efficiency falls beyond it. Linear LR rule applies below.0.000.250.500.751.00B/16B/8B/4B/2Bₙ2Bₙ4Bₙ8Bₙ16BₙBatch size (relative to critical batch B₎)Normalized throughput / efficiencyB₎ critical(GPT-3: ~1M tokens)Linear LR scaling valid

Throughput rises with batch size up to a critical batch size B_crit; beyond it, sample efficiency drops sharply. Linear LR scaling rule shown. Sqrt rule for Adam annotated.

Good for

  • LLM pretraining infrastructure articles explaining optimal batch size selection and LR pairing
  • Distributed training cost guides showing where adding GPUs stops cutting wall-clock time
  • ML curriculum on gradient noise scale and its connection to generalisation and compute efficiency

Source & accuracy

This batch size scaling laws is an editorial illustration built to represent the concept accurately. Where it shows figures, they are typical or representative values chosen to make the relationship clear, not a single underlying dataset. The diagram and its explainer are reviewed and maintained centrally, and updated over time as understanding improves.

Why bigger batches enable larger learning rates

Gradient descent on a single example is noisy; gradients from a batch of examples are smoother. A smooth gradient estimate lets you take larger steps without overshooting. This is the fundamental insight: batch size increases gradient signal-to-noise ratio, enabling higher learning rates and faster training.

If you double batch size without changing the learning rate, you halve the noise, roughly equivalent to a square-root reduction in variance. This margin can be reinvested in learning rate.

The critical batch size threshold

Scaling batch size does not improve indefinitely. At some point (the critical batch size, often 30-100 times your model size in elements), doubling the batch again provides negligible returns on optimization speed. The law of diminishing returns kicks in because the gradient becomes so smooth that even the maximum stable learning rate doesn't saturate the improvement potential.

Beyond this threshold, you're spending hardware cost for minimal speedup. Modern large-scale training often uses a 'sweet spot' batch size, not the largest possible.

Practical scaling during distributed training

In distributed training, batch size scales with the number of machines. Eight GPUs with batch size 32 each = global batch size 256. This requires careful learning rate tuning: scaling the LR naively can hurt convergence, so teams often use square-root scaling rules or warmup schedules to smooth the transition.

Embed this diagram

Add this animated batch size scaling laws to your own site. Copy one line of HTML, or use the embed builder for theme and sizing options.

Reference

What this is
A free, embeddable, animated batch size scaling laws for any website.
Who uses it
AI/ML blogs, CS educators.
How to embed
Copy one line of HTML. No signup. No watermark. Works in WordPress, Webflow, Ghost, Substack, plain HTML.
File size
iframe embed, ~80 KB gzipped (loads on demand, does not block your page paint).
License
Free forever. Editorial explainer text included; updated centrally over time.

Embed format options

Copy the universal HTML snippet, the WordPress shortcode, or an iframe fallback - see the WordPress plugin page for details. Any format keeps the same Core Web Vitals profile and the same explainer text.

Embed snippet
<div data-scrollchart="batch-size-scaling" data-scrollchart-v="1"></div>
<script src="https://scrollchart.com/embed.js" async></script>

Frequently asked questions

Where can I get a free animated "Batch Size Scaling Laws" for my website?
Scrollchart provides "Batch Size Scaling Laws" as a free, embeddable animated diagram you can add to any website with one line of HTML. No signup is required and there is no watermark. The diagram and its explainer text are served from scrollchart.com, so the embed stays current without any maintenance on your end.
How do I embed a batch size scaling laws in a developer or tech blog?
Copy the one-line snippet from the Scrollchart diagram page and paste it into your post HTML. It works in any static site generator, CMS, or hand-coded HTML page. The embed is a thin loader, not an iframe, so the content is fully in your DOM.