Foundations

Tokenization, sampling and decoding

How text becomes tokens, how a model picks the next token, and how speculation makes decoding faster.

22 of 15 planned

RolesLLM Product EngineeringAgent Systems EngineeringAI Evaluation and ReliabilityAI Data SystemsCustomer AI DeploymentInference Engineering

Level

22 items

  1. One step of byte-pair training and what it leaves behindL1ScreenConcept6 min
  2. The same prompt costs more tokens in KoreanL1ScreenConcept6 min
  3. Why models read subwords and start from bytesL1ScreenConcept6 min
  4. Count the windows a token stream gives youL2WorkingCode reading8 min
  5. How a grammar edits the logits and why it can be fasterL2WorkingConcept8 min
  6. Put numbers on growing the vocabulary to 128KL2WorkingEstimate8 min
  7. Speculation flies on code and stalls on creative writingL2WorkingTrade-off8 min
  8. The notebook works and the service never stops talkingL2WorkingDebug8 min
  9. Three ways to build a subword vocabularyL2WorkingTrade-off8 min
  10. Two decoders, one breaks on an emojiL2WorkingCode reading8 min
  11. What the split before the merges is forL2WorkingConcept8 min
  12. Why the encoder replays the merge list in orderL2WorkingConcept8 min
  13. Every output validates and the answers are wrongL3SeniorDesign10 min
  14. From acceptance rate to tokens per passL3SeniorEstimate10 min
  15. Read one speculative step and defend each lineL3SeniorCode reading12 min
  16. Take-home, a byte-level tokenizer with testsL3SeniorTake-home15 min
  17. The weights did not change and the score fellL3SeniorDebug10 min
  18. Which multi-token design gives a free draftL3SeniorConcept10 min
  19. Why a draft that reads hidden states accepts moreL3SeniorConcept10 min
  20. Bake in the draft, train it after, or borrow a small modelL4StaffDesign15 min
  21. Design the tokenizer for a multilingual coding modelL4StaffDesign15 min
  22. Mean latency improved and the tail got worseL4StaffDebug12 min

Taught in

The answers on this card come from these lessons.