Vizuara Books just published a new book: "Build an LLM from Scratch". Every step, from raw text to a working GPT, is a hand-drawn figure.
books.vizuara.ai/book/build-llm-from-scratch
This one took a long time. It grew out of my Building LLMs from Scratch video series, and it ended up with 115 figures. I redrew the attention chapter a few times before the matrix shapes lined up cleanly with the code.
𝐖𝐡𝐚𝐭 𝐭𝐡𝐞 𝐛𝐨𝐨𝐤 𝐜𝐨𝐯𝐞𝐫𝐬:
- Tokenization and embeddings, drawn as matrices you can trace
- Attention, worked out shape by shape: a 512 by 64 query meets a 64 by 512 key transpose
- The full transformer block: six matrix multiplications, assembled into GPT-2
- Pretraining, then finetuning for classification and for instructions
Right now the whole Vizuara Books shelf is free for a month, no card. This book and 41 others.
If this helps someone learning LLMs, a repost goes a long way.
books.vizuara.ai/book/build-llm-from-scratch