# Optimizers

> From per-weight step sizes and momentum to an optimizer that orthogonalizes every update and needs half the compute.

Page: https://mralbu.github.io/ai-datasets/t/optimizers
Timeline: https://mralbu.github.io/ai-datasets/timeline?track=optimizers
Categories: Foundations, LLMs

A gradient says which way to move each weight but not how far. Each step here changed that answer: adaptive methods gave each weight its own step size, momentum carried speed through flat directions, decoupled decay fixed adaptive regularization, learning-rate rules let batches grow, and matrix-aware updates finally treated layers as matrices rather than lists of numbers.

## Sequence

- **1998 · Dataset:** [MNIST](https://mralbu.github.io/ai-datasets/d/mnist.md) — 70,000 handwritten digits, 28×28 grayscale, 10 classes.
- **2009 · Dataset:** [CIFAR-10](https://mralbu.github.io/ai-datasets/d/cifar10.md) — 60,000 tiny 32×32 color images in 10 classes.
- **2009 · Dataset:** [ImageNet (ILSVRC)](https://mralbu.github.io/ai-datasets/d/imagenet.md) — 1.28 million photos across 1,000 classes, the dataset behind the deep learning boom.
- **2010 · Step 1:** [AdaGrad](https://mralbu.github.io/ai-datasets/p/adagrad.md) — One learning rate moved every weight alike; scaling each weight's step by its past gradients let rare, informative features learn fast.
- **2013 · Step 2:** [SGD with momentum](https://mralbu.github.io/ai-datasets/p/sgd-momentum.md) — Plain SGD with momentum was thought too weak for deep nets; a good random start plus high, slowly rising Nesterov momentum matched second-order methods.
- **2014 · Dataset:** [MS COCO](https://mralbu.github.io/ai-datasets/d/coco.md) — 330k everyday scenes with 1.5M labeled objects in 80 categories.
- **2014 · Step 3:** [Adam](https://mralbu.github.io/ai-datasets/p/adam.md) — AdaGrad's steps only shrink as gradients pile up; Adam's moving averages forget old gradients, add momentum, and one default setting works almost everywhere.
- **2017 · Step 4:** [AdamW](https://mralbu.github.io/ai-datasets/p/adamw.md) — Adam generalized worse than SGD, partly because its step sizes also scaled the L2 penalty; applying weight decay separately closed most of the gap.
- **2017 · Step 5:** [Large-minibatch SGD](https://mralbu.github.io/ai-datasets/p/large-minibatch-sgd.md) — Using many GPUs means huge batches, which hurt accuracy; scaling the learning rate with batch size, after a warmup, held it up to 8k images.
- **2018 · Step 6:** [Shampoo](https://mralbu.github.io/ai-datasets/p/shampoo.md) — Diagonal optimizers treated a layer's weights as independent numbers; Shampoo preconditions each weight matrix from both sides, near Adam's step cost on mid-sized models.
- **2020 · Dataset:** [MMLU](https://mralbu.github.io/ai-datasets/d/mmlu.md) — 15,908 four-option exam questions, from high-school math to law and medicine.
- **2021 · Dataset:** [GSM8K](https://mralbu.github.io/ai-datasets/d/gsm8k.md) — 8.5k grade-school math word problems with step-by-step solutions.
- **2021 · Dataset:** [HumanEval](https://mralbu.github.io/ai-datasets/d/humaneval.md) — 164 hand-written Python problems graded by unit tests.
- **2025 · Step 7:** [Muon](https://mralbu.github.io/ai-datasets/p/muon.md) — Shampoo's matrix roots grew costly at large-model sizes; Muon orthogonalizes each momentum update with five Newton–Schulz steps and matched AdamW with about half the compute.
