the.ai

Optimization / Training

verified

Gradient Descent

The gradient points in the direction the loss increases fastest, so stepping the other way makes it smaller. Repeat a few hundred thousand times. That is the whole algorithm — the sophistication in modern training is entirely in how big the step is and how much of the previous steps it remembers.

Viz primitive · loss-curvesteps = 1000 · lr = 0.001
loss
step 01000

Loss over 1000 training steps, starting near 6.0. It falls to about 2.13, with 88% of the total improvement arriving in the first half.

Loss over steps at one learning rate. Drag it up to watch convergence accelerate and then break into oscillation.

0.001

Reviewed by opendroid · 2026-08-04