internalsGet Pro

Module 04 · Lesson 7 of 11Pro

Momentum, Adam and modern optimizers

Level
Intermediate
Topic
Calculus and optimization for machine learning
Reading time
17 min

When you finish this page you can

  1. Explain how momentum speeds training along a narrow valley while damping the zigzag across it, and compute its buffer by hand.
  2. Trace one Adam step for two weights with very different gradients, including why bias correction is needed.
  3. Choose between SGD with momentum, Adam and AdamW for a model, and set their learning rate and weight decay deliberately.
  4. Describe what each optimizer adds to memory and to a training checkpoint.

Builds on 2 lessons

Start with lesson 514 min
  1. Learning rate: step size and stability14 min
  2. Stochastic and mini-batch gradient descent17 min

The rate can’t go up, and the loss still crawls

is our example online store. Farah, an ML engineer, predicts how many orders each customer will place next month, so Joseph’s growth team can plan vouchers. She has moved the model to a small neural network, trained on the 200,000-customer sample.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan