AI Anatomy Class · Part 7 · Teaching GPT: pre-training
66. One lap of the training loop
Q. In what order does GPT study hundreds of billions of questions?
- Let's join the pieces we've learned into one. GPT studies by going around a four-step loop countless times.
- ① Predict: feed in 'I walk to' and get probabilities for the next piece (chapter 19). At first, school gets just 12%.
- ② Loss: measure the surprise from the probability on the answer, school (chapter 65). Only 12%, so it's a big 3.06.
- ③ Backpropagation: send the loss backward and share out the blame (chapter 23). School's score must go up, work's must go down.
- ④ Update: nudge each number by its blame. The learning rate sets how big the nudge is (chapter 22). Here it's 1.
- Then back to ①. Lap after lap, school's probability rises to 32%, 55%, 69%, and the surprise keeps falling.
- Real GPT batches questions (chapter 24) and runs this loop over and over, nudging 175 billion numbers. That's pre-training.
Chapter summary
- ① Predict (forward pass) → ② Loss (surprise) → ③ Backpropagation (share the blame) → ④ Update (fix the numbers).
- Each lap, the probability of the answer goes up and the loss goes down.
- Running this loop a huge number of times to fix 175 billion numbers = pre-training.