The Gradient Lab blog
Deep dives into how machine learning really works: models, papers and the maths behind them, explained in plain English and linked to the lessons that animate each idea.
The Math · 26 November 2026
Gradient descent, step by step with real numbers
Gradient descent worked by hand: a one-weight example, the learning rate that converges or diverges, and a full step of linear regression with real numbers.
Under the Hood · 26 November 2026
RLHF vs DPO: how language models learn what people prefer
How RLHF turns human rankings into a reward model and PPO updates, and how DPO gets the same effect with one simple loss. Worked numbers included.
Face-off · 25 November 2026
Encoder vs decoder: why BERT reads and GPT writes
BERT and GPT use the same transformer blocks. One attention mask decides whether a model understands text or generates it. Here is how it works.