Elliot Sones.Machine Learning, from scratch

Machine Learning, from scratch.

From neurons to transformers: building every major architecture from scratch.

Frameworks hide exactly the parts you should understand. So I built the parts: every model on this page is implemented from first principles, with no high-level ML wrappers, so you can see exactly how each algorithm works.

Each part is a full write-up of what I built, how it works, and what went wrong along the way, with the real trained model embedded on the page so you can try it yourself.

The data
MLP
MNIST (28×28, digits 0-9)
CNN
MNIST-100 (28×56, digits 0-99)
Paired from MNIST
RNN
Quick, Draw! (10 animals)
Transformer
Tiny Shakespeare · GoEmotions · WMT14 EN-FR
Various

All training data is downloaded on demand by each part's setup script · trained weights live on the Hugging Face demos