Index

Module 06 · AIGPT, built from scratch

The Bigram Model

From Transformer to LLM
From Transformer to LLM · Open board

The From Transformer to LLM board draws the machine that fills in the next blank. This lesson builds the smallest one: the second of six lessons that end with a small GPT built from scratch.

Before you start. A weight is one adjustable number inside a model. Its slope says how much the loss, the model’s wrongness, moves if you nudge that weight. Training nudges every weight a little against its slope, over and over. In Autograd by Hand you built code that finds every slope automatically, by remembering how each number was made and walking that record backwards. From The Maths Floor, Part 2: Probability, Softmax and Temperature: a probability is a share between 0 and 1, the shares add to 1, and sampling draws an outcome in proportion to its share. Also from The Maths Floor, Part 2: Probability, Softmax and Temperature: softmax turns a list of scores into probabilities. From Tokens & Embeddings: every piece of text gets an id, and an id can pick one row out of a table of numbers.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Related paper

Review AI →

Saved in this browser, and to your account when you sign in.