“AI is just next token prediction”

I recently watched this video by Anthropic researchers on “Mechanistic Interpretability” (the science of fiddling with the internals of AI to reverse engineer its decision process) and it inspired me to write this article.

The video does an amazing job to intuit where hallucinations, among other things, may come from and I would strongly recommend that you check it out here:

Most people know that training an LLM involves taking a sentence like “the weather is great today”, masking the last word like “the weather is great _____” and teaching a model to guess what might fit the blank best.

Which is why, “AI is just next token prediction” is a very popular idea (often used to dismiss the potential of LLMs). Of course, it is true but it understates the information condensed within just a single token.

Go back to the example: “the weather is great ____” — learning to predict the word “today” teaches you so much more than just sentence grammar:

  • it requires you to understand that weather is a property of a day.
  • it requires you to understand that weather can be given good and bad attribution
  • it requires you to understand a “temporal” aspect to weather (i.e weather today may differ from weather some other day)

And across billions of sentences, these abstractions start to grow and paint a picture (representation) of our world in an LLM’s mind (abstract state/ neuron weights).

My favorite example of this is the Donald Trump node.

But these representations get more accurate. That is what Scaling Laws (more compute + more data = smarter AI) have shown us. In the past 3 years

Last week I went on a hunt to find the

When ChatGPT first launched in late 2022, the world was shocked. Every single token had the knowledge of grammar. It spoke like a human did. But even more interestingly, it could write coherent essays and poems. When writing