Technical brief / Models
Andrej Karpathy explains how large language models work.
What happened
Karpathy follows the main stages of building an assistant:
- Training data and tokenisation: collect text and split it into tokens, the units a model reads and generates.
- Pre-training: train the model to predict the next token so it learns patterns in language.
- Supervised fine-tuning: use examples of conversations to teach it how an assistant should respond.
- Reinforcement learning: use feedback to improve its responses further.
He connects the training to everyday behaviour: why an assistant can invent an answer, how it uses tools and what happens when you give it a prompt. Demonstrations make the explanations easier to follow.
Why it matters
If you use an AI assistant, the lecture helps explain why it responds as it does. The training stages give you a way to think about its abilities and mistakes. For example, generating a plausible answer does not mean the model has checked the facts.
For developers, that understanding is useful when writing prompts, connecting tools and deciding how to check generated output. Other viewers get concrete explanations of terms such as tokens and fine-tuning.
Watch the full lecture on Karpathy's YouTube channel. Allow time for the explanations and demonstrations; it is a detailed introduction.
AI Disclosure
Researched and drafted with AI assistance, then reviewed by Søren Dalby. Sources are linked; errors may remain, and corrections are welcome.