How Does an AI Model Produce the Next Word?
Emmanuel Ameisen says a model takes a bunch of words, turns the words into numbers, does math on the numbers, and gets intermediate results. It does more math, gets more intermediate results, and repeats the cycle many times. At the end it has a final result, which it converts back into a word. The math is the part that has grown. Learning to do the task better means updating parameters in one direction or another. The model then learns some formulas, and Emmanuel Ameisen says we have no idea what the formulas are.
Training runs over a corpus of data. The model is fed the first half of a document and asked to predict the word that comes next, then the same step runs again and again across an ungodly amount of data. A fine-tuning phase follows. Emmanuel Ameisen says maybe, instead of arbitrary data, the corpus is examples of how the model should behave, and the model is trained on the examples. He describes dialogue of a helpful assistant telling a favorite recipe or solving coding problems.
The goal of Emmanuel Ameisen's team is to study what the formulas mean and what the intermediate results are, and whether the results can be decoded so people can see what the model is doing during the intermediate steps.
Inside the black box of AI: How AI models actually think | Emmanuel Ameisen (Anthropic) ·
From the transcript
And over this corpus of data, you sort of, um, feed the model as input, you know, the, let's say first half of, of like a certain document and you ask it to predict the word that comes next. Then you do that again and again and again and again for sort of an ungodly amount of data.
Um, and after you do that, there's then this other phase where, and you sort of have this fine tuning phase where maybe instead of arbitrary data, you have a corpus of examples of like how the model should behave. And that's what you train it on. So you have examples of dialogue of like helpful assistant telling you, you know, your, your favorite recipe or solving coding problems.
Um, and then there's, there's sort of like further, further details here that I'm just going to skip for a second. But then, okay, so, so what does that mean that you're doing this process? Like what is, what is this thing that you're, that you're sort of training? All models are is, you know, they take this input, uh, which is a bunch of words.