Series
How Large Language Models Works
From Tokens to Transformers — Building an LLM from Scratch
Large language models generate fluent text, answer questions, and write code — but how do they actually work? This series starts with how text becomes numbers and builds up through embeddings, attention, the transformer architecture, training, and alignment.
Each article includes interactive demos so you can see the mechanisms in action. By the end, you'll understand every layer of a modern LLM — from raw bytes to RLHF.
How to read this series: Start from the top. Each article introduces
ideas that later articles build on. By the end you'll have a complete mental model of
how LLMs work — from tokenization to alignment.
- 001
- 002
- 003
- 004
- 005
- 006
Training & Beyond
How LLMs learn from data, generate text, and get aligned with human preferences.
- 007
- 008
- 009
- 010