amitshekhariitbhu/llm-internals

Learn LLM internals step by step - from tokenization to attention to inference optimization.

LLM Internals is not a software library but a free, step-by-step learning series about how Large Language Models (LLMs) work under the hood—presented as a single README that acts as a table of contents linking to blogs and videos.

A curated educational collection that teaches LLM internals "from tokenization to attention to inference optimization." Each topic is a link to either a YouTube video or a detailed blog post on outcomeschool.com. There is no code to download; the whole project is the README index itself.

Anyone who wants to truly understand how LLMs work internally, not just how to use them. The tone and structure suggest learners who are comfortable with some basic ML/neural network ideas (it explains math with numeric examples).

Prepared and maintained by Amit Shekhar, founder of Outcome School (his X/Twitter handle is linked in the README).

The README lists topics in a rough learning order, from foundational concepts to advanced inference optimizations. Every entry has a short description of what the blog/video covers plus a direct link to the content on outcomeschool.com.

  • Foundations: LLM, RAG, MCP, Agent, Fine-tuning, Quantization (video)
  • Tokenization: What it is, Byte Pair Encoding (BPE), Stop Tokens
  • Attention math: Query/Key/Value math, why we scale by √dₖ, Causal Masking
  • Training math: Backpropagation, Cross-Entropy Loss
  • Architecture: Transformer architecture, Feed-Forward Networks, Batch vs Layer Normalization, RMSNorm, RoPE (Rotary Position Embedding), Grouped-Query Attention
  • Inference optimization: KV Cache, Paged Attention, Flash Attention, Speculative Decoding, Medusa, EAGLE, Continuous Batching, Prompt Caching, Prefill vs Decode
  • Scaling approaches: Mixture of Experts (MoE), LoRA

Each blog entry enumerates a bulleted list of subtopics it covers (e.g., "What is a Token?", "How does BPE work?", "Numerical example"). Many posts explicitly promise "step-by-step numeric examples." Videos are also linked for several topics.

The author explicitly states: "This series will continue to grow as I write more blogs and create more videos on new topics. Keep learning." The list is ongoing and not finished at the point the README was captured (the final entry on LoRA is cut off mid-sentence in the provided text).

If you want a well-structured, free pathway to understand how LLMs actually work—tokenization, attention math, transformer internals, and why modern inference tricks speed things up—this README is a high-quality syllabus of linked tutorials rather than a runnable project.

Related

  • Project
  • Project
  • Project
  • Project