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?

  1. Let's join the pieces we've learned into one. GPT studies by going around a four-step loop countless times.
  2. ① Predict: feed in 'I walk to' and get probabilities for the next piece (chapter 19). At first, school gets just 12%.
  3. ② Loss: measure the surprise from the probability on the answer, school (chapter 65). Only 12%, so it's a big 3.06.
  4. ③ Backpropagation: send the loss backward and share out the blame (chapter 23). School's score must go up, work's must go down.
  5. ④ Update: nudge each number by its blame. The learning rate sets how big the nudge is (chapter 22). Here it's 1.
  6. Then back to ①. Lap after lap, school's probability rises to 32%, 55%, 69%, and the surprise keeps falling.
  7. Real GPT batches questions (chapter 24) and runs this loop over and over, nudging 175 billion numbers. That's pre-training.

Chapter summary