← All lessons
AI
3 lessons you click through step by step
- How tokenizers workTrain byte-pair merges on a tiny corpus, then see why some text costs more tokens
- How LLM sampling worksTurn next-token scores into probabilities, reshape them with temperature, top-k and top-p, then draw one
- How RAG worksTurn documents into vectors and feed the best matches to a model