Back to directory

LLM Internals

A growing series of blog posts and videos that teach how large language models work internally, step by step from tokenization through attention to inference optimization.

LLM Internals

LLM Internals is an educational series, maintained by the founder of Outcome School, that walks through how a large language model works from the ground up. It starts with an overview of LLMs, retrieval-augmented generation, the Model Context Protocol, agents, fine-tuning and quantization, then works through tokenization and byte pair encoding with worked examples.

Later entries derive the mathematics of attention step by step, computing query, key and value matrices and attention scores, and explain why the dot product is scaled by the square root of the key dimension in the Transformer architecture. Each topic pairs a written blog post with an accompanying video, and the series is described as continuing to grow as new topics are added.

More in Tutorials

See all 478
  • BootLife

    github.com

    Conway's Game of Life implemented to run directly from a 512-byte x86 boot sector in assembly, using VGA memory itself as the simulation grid.

  • A technical blog post deriving the Y combinator as a composition of combinator birds in an array language, and examining how eager evaluation changes fixed-point recursion compared with the usual lazy telling.

  • System Design Atlas

    atlas-sysdes.vercel.app

    A free reference of worked system design problems with interactive architecture diagrams, covering ranked designs such as a feed, a chat app, a URL shortener, and a rate limiter, plus pages on the technologies behind them.