Module resources
LLM foundations
Checked sources to go further than the lessons. Back to the module.
Recommended learning sequence
Work through these in order.
[1hr Talk] Intro to Large Language Models (opens in a new tab)
Start with the whole picture: a one-hour talk for a general audience on what an LLM is, so the three lessons have a frame to hang on.
Transformers, the tech behind LLMs | Deep Learning Chapter 5 (opens in a new tab)
Then see the pipeline drawn: tokens, embeddings, attention, the output layer and temperature, with GPT-3 as the running example.
Attention in transformers, step-by-step | Deep Learning Chapter 6 (opens in a new tab)
Zoom into attention: queries, keys, values, the softmax pattern and the mask, step by step, before you read the maths in the paper.
Tokenization algorithms (opens in a new tab)
Official documentation next: how BPE, Unigram, WordPiece and SentencePiece differ, which is the vocabulary behind lesson 2.
Attention Is All You Need (opens in a new tab)
Now read the foundational paper. The earlier steps give you the vocabulary to follow its equations and the complexity comparison.
Let's build GPT: from scratch, in code, spelled out. (opens in a new tab)
Module capstone: typing a small decoder-only transformer turns everything above into code you can run. Finish the module by building it yourself.
All resources
Official documentation
Tokenization algorithms (opens in a new tab)
Compares BPE, Unigram, WordPiece and SentencePiece with small worked examples, and explains byte-level BPE and why GPT-2 has 50,257 tokens. Widens lesson 2 beyond BPE.
Further reading
The Illustrated GPT-2 (Visualizing Transformer Language Models) (opens in a new tab)
Applies the transformer picture to a decoder-only model that generates one token at a time, including masked self-attention and caching keys and values, the setting of lesson 1.
Educational videos
[1hr Talk] Intro to Large Language Models (opens in a new tab)Essential
A general-audience overview that places this module in context: what a model is on disk, how it is trained and where it is heading. Good before lesson 1 or as a recap.
Transformers, the tech behind LLMs | Deep Learning Chapter 5 (opens in a new tab)Essential
A visual walk through tokenization, embeddings, the feed-forward layer, softmax and temperature, which links lessons 1 to 3 in one sitting.
Attention in transformers, step-by-step | Deep Learning Chapter 6 (opens in a new tab)
Makes Query, Key, Value and masking from lesson 1 visual, and tallies the parameters in a GPT-3 attention layer, so you can see how large the attention part of a model is.
Research papers
The paper behind vLLM. Read it after the blog to see why KV-cache memory limits batch size and how paging helps.
Shows how a tokenizer can be trained from raw text without pre-splitting words, which matters for languages that do not use spaces. Short demo paper.
Language Models are Few-Shot Learners (opens in a new tab)
The GPT-3 paper: a 175-billion-parameter model that learns tasks from a few examples in the prompt. Background for why scale and context shaped the model landscape in lesson 3.
Books
Speech and Language Processing (3rd edition draft) (opens in a new tab)
A free online textbook draft. Volume I chapters on Words and Tokens, Embeddings, and Transformers and Pretraining give a rigorous version of lessons 1 and 2. Read selected chapters, not the whole book.
Courses
CS336: Language Modeling from Scratch (opens in a new tab)
A university course on building language models from scratch; its schedule has lectures on tokenization, architectures and inference that go deeper than this module. The page lists a YouTube playlist of recordings.
Case studies
vLLM: Easy, Fast, and Cheap LLM Serving with PagedAttention (opens in a new tab)
A real serving-engineering story: the KV cache from lesson 1 wasted memory in existing systems, and paging it raised throughput. The numbers are the authors' own benchmarks.
Tools
Tiktokenizer: online playground for tiktoken tokenizers (opens in a new tab)
A browser playground for seeing how text splits into tokens and what the count is. Paste your own prompts, code and non-English text to test the token-cost ideas in lesson 2. A community tool, not an official one.