How does a machine finish your sentence?
A hands-on tour of what’s inside a large language model. No equations, no code: every idea is a toy you can poke.
That’s the whole trick: guess the next word, append it, repeat. Everything below explains how the guessing gets so good.
The journey
- TokensChopping language into pieces a machine can count.→
- Meaning as a mapEvery word gets coordinates. Nearby means similar.→
- AttentionEvery word looks back and decides what matters.→
- Neurons & layersTiny pattern detectors, stacked until they understand.→
- Prediction & samplingTurning hunches into words: temperature, top-p, and dice.→
- A sense of orderHow a model knows “dog bites man” isn’t “man bites dog”.→
- Mixture of ExpertsA committee of specialists, and only two get to speak.→
- Speed tricksKV caches, shrunken numbers, and guessing ahead.→
- TrainingWhere the knowledge comes from, and why models make things up.→