Course 06 — LLMs, under the hood

How a languagemodel actually writes.

Strip away the chat window and a language model does one thing: pick the next token, again and again. Here you tokenize text with a real GPT tokenizer, watch probabilities reshape as you turn the temperature dial, and see exactly what falls out of the context window.

Start lesson one Open the sandbox

12 lessons · 4 chapters · free

LLMs — tokenize, then sample
  1. 01 · Read

    Each lesson is one idea, explained in a few short paragraphs — no walls of theory.

  2. 02 · Do

    Type into a live environment and watch it react. Tab completes, ↑ recalls, undo takes back any step.

  3. 03 · Match

    Reach the goal any way you like — you're judged on the result, not the keystrokes. Par is the shortest route.

Tokenization uses OpenAI's real cl100k_base vocabulary. Generation uses a small word-level model trained in your browser on Alice's Adventures in Wonderland — far smaller than a real LLM, but sampling, temperature, top-k, top-p and context limits work exactly the same way.