AI 101 — What is gradient descent?

Gradient descent is the loop almost every AI model runs to get better: measure how wrong its answers are, work out which direction would make the error smaller, and nudge every one of its numbers a little that way. Then do it again — millions of times.
That is the whole idea. It is older than the computer, it fits on a napkin, and it is still what happens inside a training run that costs tens of millions of dollars and burns through a power station's worth of electricity.
Why it matters right now
Every headline number about AI training is really a gradient-descent story. When DeepSeek reported that its V3 model took 2.788 million H800 GPU hours to train, that was the price of running this loop over 14.8 trillion tokens of text — and the team also noted, as a point of pride, that the run had no irrecoverable loss spikes, per the DeepSeek-V3 technical report. A "loss spike" is exactly what it sounds like: the number the loop is trying to push down suddenly jumps up, and the run is in trouble.
It also matters on your laptop. When you fine-tune a small model, the settings people argue about — learning rate, batch size, warmup, epochs — are all gradient-descent settings. Get the learning rate wrong and the model either learns nothing or turns to mush. Overcook it and the model memorises its training examples: that is overfitting, and it starts with a step size.
And it is the reason scaling laws can be predicted at all. Training curves are smooth in a way that lets labs forecast a run's final quality from its first few percent — the basis of the scaling laws that decide how big the next model gets.
The mental model: a hill you can only feel
Picture the model as a point standing on a landscape. Every position on that landscape is one complete setting of the model's weights; the height at that position is the loss — how badly the model is doing on the training data. Training means getting to low ground.
The trouble is that the landscape has millions, billions, sometimes trillions of dimensions. You cannot see it. All you can do is feel the slope under your feet. That slope is the gradient: a list of numbers, one per weight, saying "in this direction the loss goes up, in that direction it goes down, and here is how steeply."
So you take a step downhill. Then you re-measure the slope at the new spot and take another. The size of the step is the learning rate, and it is the single most consequential number in the whole process.
Where does the slope come from? That is the job of backpropagation, which we explain in what backpropagation is: it walks backwards through the network computing, for each weight, how much that weight contributed to the error. Gradient descent is the part that actually moves the weights. People use the two names interchangeably; they are a measurement and a decision, not the same thing.
The foggy mountain
You are hiking down a mountain in thick fog. You cannot see the valley. You can only feel which way the ground tilts under your boots, and you can see about one step ahead.
Take small steps and you will get down — eventually. Take enormous strides and you will overshoot the valley floor, climb the far wall, overshoot again, and end up bouncing around uselessly or striding straight off a cliff. That is a learning rate set too high. Take microscopic shuffles and you will still be on the mountain at nightfall: correct direction, no progress.
Now add the refinements that make real training work. Instead of judging the slope from a single glance, you average the tilt over a batch of examples, which smooths out the noise — that is stochastic gradient descent, and it is why training uses batches at all. You give the hiker momentum so a consistent downhill direction builds speed and small bumps do not stop them. And instead of one step size for every direction, you let each weight keep its own adaptive step size, shrinking for weights that have been lurching around and growing for ones that have been crawling. That last trick is essentially what the Adam optimizer does, introduced by Diederik Kingma and Jimmy Ba in 2014 and still the default choice for training large language models a decade later.
Common misconceptions
"Gradient descent finds the best possible model." It finds a low point, not the lowest point. The landscape is not a clean bowl; it is full of valleys, ridges and plateaus. Which valley you land in depends on where you started — which is why the random seed used to initialise a model can change what it learns.
"It's how the model stores facts." It does not store anything directly. Gradient descent only turns dials; the knowledge is an emergent side effect of turning millions of dials in directions that reduce prediction error on text.
"A bigger learning rate trains faster." Up to a point. Past it, the loss goes up instead of down, and no amount of extra compute rescues you. Most large runs warm the rate up slowly at the start for exactly this reason, then decay it near the end so the model settles rather than keeps jittering.
"Reinforcement learning replaced it." No. RLHF and GRPO change what the model is rewarded for, not how the weights move; the update at the bottom is still a gradient step. Same for fine-tuning, same for distillation. The objective changes, the machinery does not.
"Loss going down means the model is getting better." Loss is measured on data the model sees. It can fall steadily while the model gets worse at everything else — the gap between the training curve and the real world is the whole subject of generalisation, and it is why labs watch held-out benchmarks rather than the number they are optimising.
Where to learn more
The clearest free walkthrough of the mechanics, with sliders and worked examples, is Google's Machine Learning Crash Course section on gradient descent. For the optimiser most large models actually use, read the Adam paper; for what training looks like at frontier scale, the DeepSeek-V3 report is unusually candid about stability. And for the layer underneath — how the slope is computed at all — start with what backpropagation is.
Have you watched a fine-tune fall apart and traced it back to a step size? Write to us via our contact page.






