Writing the post that I wished I'd found when I started learning whatever it was...

LLM from scratch

Between December 2024 and December 2025, I worked through Sebastian Raschka's book "Build a Large Language Model (from Scratch)", writing up the things I found interesting and/or surprising, and filling in some of the gaps. The book is a brilliant explanation of how to build an LLM, but sometimes glosses over why we do particular things -- for example, why certain sequences of matrix multiplications result in a working, trainable attention mechanism.

After that, I wanted to flesh things out a bit, so spent six months doing in-depth studies into hyperparameter tweaks, training upwards of twenty GPT-2-small sized models, and reimplementing the code from my notes in JAX.

Here are the posts in this epic series: