How a chatbot picks its next word
How Large Language Models Work. From tokens and embeddings, through attention and training, to RLHF — no machine learning background needed.
17 lessons · 56 min of video · 21 quiz questions
Try a question from this course
Which step in a transformer block lets words exchange information with each other?
What you'll be able to do
- Explain in plain words how a chatbot produces a reply one token at a time
- Distinguish tokens from embeddings and say why context matters
- Describe what attention does and why long contexts are costly
- Choose sensible temperature settings and explain hallucinations
- Walk through pre-training, fine-tuning, RLHF and Constitutional AI
What's in it
The big picture
What a large language model is, and the journey a piece of text takes through one.
Tokens and embeddings
How text becomes numbers a model can work with, and how those numbers come to carry meaning.
Attention and the transformer
How words exchange information so each vector reflects its context, and how blocks stack into a deep network.
Producing a reply
From the final vector to a chosen word: probabilities, sampling settings, and why models make things up.
Training and RLHF
How a raw text-completer becomes a helpful assistant: pre-training, fine-tuning, human feedback, and a newer variant using AI feedback.
Made from these videos
- Large Language Models explained briefly · 3Blue1Brown
- How LLMs Actually Generate Text (Every Dev Should Know This) · LearnThatStack
- Tokens vs Embeddings – what are they + how are they different? · Annie Sexton
- What are Word Embeddings? · IBM Technology
- Attention in transformers, step-by-step | Deep Learning Chapter 6 · 3Blue1Brown
- Inside a Transformer Block | Explained Visually (No Math) · AIChronicles_JK
- Reinforcement Learning with Human Feedback (RLHF), Clearly Explained!!! · StatQuest with Josh Starmer
- How ChatGPT is Trained · Ari Seff
- RLAIF vs. RLHF: the technology behind Anthropic’s Claude (Constitutional AI Explained) · AssemblyAI























