# 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 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.

Website: https://github.com/amitshekhariitbhu/llm-internals
