Self-study · Machine learning
AI Frontier
Notebooks from a self-study path through neural networks and machine learning, built from scratch, in order.
Notebooks
-
01
01 · From Derivatives to a Backprop Graph
Building up to backpropagation from the definition of a derivative: first estimating slopes numerically, then wrapping scalars in a Value object that records how it was computed, then walking that graph backwards by hand, and finally training a small network with the gradients it produces.
A function to differentiateWhat the function looks likeThe derivative, numericallyDerivatives with more than one inputThe Value object+9 more -
02
02 · Language Modeling - Building makemore
We implement a bigram character-level language model, which we will further complexify in followup videos into a modern Transformer language model, like GPT. In this video, the focus is on (1) introducing torch.Tensor and its subtleties and use in efficiently evaluating neural networks and (2) the overall framework of language modeling that includes model training, sampling, and the evaluation of a loss (e.g. the negative log likelihood for classification).
A dataset of namesBigramsCounts as a tensorOne special tokenSampling the first character+9 more
Reference
Each notebook builds its tools by hand before reaching for a library. The curriculum they follow is tracked separately at Backprop to Frontier.