🧪 The AI Lab← All labs
Lab 5 · the big one

🤖 How an LLM learns vs answers

A big language model has two lives. First it goes to "school" for a long time — this is training, where it actually learns. Later, when you chat with it, it just uses what it learned to write a reply — this is inference. Play with both and spot the difference.

TRAINING · learning

🏫 The model goes to school

It reads text, covers the next word, guesses, checks the real answer, and adjusts its knobs. Millions of times.

Press Train one step to begin…
How often it's right now
Its “knobs” (weights) — watch them change
INFERENCE · answering

💬 The model writes a reply

Its knobs are now frozen. It reads your words, scores the next token, picks one, adds it, and repeats — one token at a time.

your prompttokensmodelnext token
Pick a prompt above…

So what's actually different?

TRAINING (learning)INFERENCE (answering)
Goallearn to predict words welluse what it learned to reply
What it readshuge piles of text (the whole internet, books…)just your prompt
Its knobs (weights)change & improvefrozen — never change
Is it learning?✅ yes❌ no, just using
Speed & costvery slow, months, huge computers, very costlyfast, one token at a time, cheap
When it happensonce, before you ever use itevery time you chat
🧩 It all fits together The model tokenizes (Lab 1) your words, turns them into number-embeddings (Lab 3), and plays the guess-the-next-word game (Lab 4). Training is where it learned those numbers; inference is where it uses them to talk to you.

Practice 🎯

← Back to all labs