How Large Language Models Work: From Next-Word Prediction to Chatbots
What actually happens inside a large language model: how it learns by predicting the next word, what the Transformer and its attention mechanism do, why size changed what these models can do, how a raw text predictor is turned into an assistant that follows instructions, and why it sometimes makes things up with total confidence.
0:30 A machine that guesses the next word
Pretraining: the model reads huge amounts of text and learns to predict the next word, with no human labels.
Sources: Hugging Face LLM Course (original) · OpenAI (original)
1:54 The Transformer and attention
The Transformer, introduced by Google researchers in the paper Attention Is All You Need, lets every word look at every other word in one step.
Sources: Google Research (original) · arXiv (original)
3:27 Why size changed everything
Most modern LLMs keep only the decoder half of the Transformer; scaling them up made few-shot learning possible.
Sources: Hugging Face LLM Course (original) · arXiv (original)
4:56 From text predictor to assistant
Fine-tuning with human demonstrations and rankings, known as reinforcement learning from human feedback, turns a raw text predictor into an assistant.
Sources: OpenAI (original) · arXiv (original)
6:16 Why it makes things up
Hallucinations come from next-word prediction on rare facts and from tests that reward guessing over saying I don't know.
Sources: OpenAI (original)
Follow the show in your podcast app to get each new episode as soon as it is out.
Produced by Juan Pablo.
