Gradient

Courses

∇\nabla∇The maths behind AI0/72
π\piπMaths0/84
⋆\star⋆AI for everyone0/10
Γ\GammaΓGame theory0/49
py\texttt{py}pyPython for AI0/15
y^\hat{y}y^​Build your own AI0/15
All courses

Tuition

My tuitionOlympiad trackCompetitions

Practice

ProjectsAsk a questionTrain on a GPUExplorationsMaths StoriesUnsolved problemsPlaygroundScience labsMock testsOlympiad

Reference

GlossaryBlogDiscoveries
Glossary › Early stopping

What is early stopping?

Ending training when the loss on held-out data stops improving, and keeping the weights from the best step.

Where it is taught

Train a tiny transformer. Everything in this course runs here at once. Train a real transformer on your own device and learn to read what it shows you.

What the lesson leaves you with

  • One training step is: batch, forward pass, loss, backward pass, update.
  • The loss starts at ln⁡V\ln VlnV, passes the bigram baseline, and keeps falling as attention is put to use.
  • Held-out loss is the honest score. When it turns upwards the model is memorising, and early stopping keeps the best weights.
Open the lesson

Questions

What is early stopping?
Ending training when the loss on held-out data stops improving, and keeping the weights from the best step.
Where is early stopping used in AI?
Everything in this course runs here at once. Train a real transformer on your own device and learn to read what it shows you.
What is the key idea to remember about early stopping?
One training step is: batch, forward pass, loss, backward pass, update.
Where can I learn early stopping step by step?
In the lesson “Train a tiny transformer” in Gradient’s course on the maths behind AI, with interactive diagrams and questions.

See it in 3D on the blog

  • What is gradient descent? How AI learns downhill4 min
  • What is a learning rate? Why step size matters4 min
  • What is noise in data? Why models miss points3 min

Related terms

  • Bigram model