Module resources

LLM foundations

Checked sources to go further than the lessons. Back to the module.

Recommended learning sequence

Work through these in order.

  1. [1hr Talk] Intro to Large Language Models (opens in a new tab)

    Andrej Karpathy2023Video

    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.

  2. Transformers, the tech behind LLMs | Deep Learning Chapter 5 (opens in a new tab)

    Grant Sanderson2024Video

    Then see the pipeline drawn: tokens, embeddings, attention, the output layer and temperature, with GPT-3 as the running example.

  3. Attention in transformers, step-by-step | Deep Learning Chapter 6 (opens in a new tab)

    Grant Sanderson2024Video

    Zoom into attention: queries, keys, values, the softmax pattern and the mask, step by step, before you read the maths in the paper.

  4. Tokenization algorithms (opens in a new tab)

    Hugging Face2026Documentation

    Official documentation next: how BPE, Unigram, WordPiece and SentencePiece differ, which is the vocabulary behind lesson 2.

  5. Attention Is All You Need (opens in a new tab)

    Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, et al.2017PaperAdvances in Neural Information Processing Systems 30 (NIPS 2017)

    Now read the foundational paper. The earlier steps give you the vocabulary to follow its equations and the complexity comparison.

  6. Let's build GPT: from scratch, in code, spelled out. (opens in a new tab)

    Andrej Karpathy2023Video

    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)

    Hugging Face2026Documentation

    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

Educational videos

Research papers

Books

Courses

  • CS336: Language Modeling from Scratch (opens in a new tab)

    Tatsunori Hashimoto, Percy Liang2026Course

    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

Tools