Trillion-parameter MoE: experts, sparse attention, KV cache

13 steps · about 6 h 23 min · Intermediate

  1. Transformers, the tech behind LLMs | Deep Learning Chapter 5 (video, 3Blue1Brown (YouTube), 27 min)

    Start with the basic transformer picture, so that 'replace the feed-forward layer' and 'attention' mean something later.

  2. Attention in transformers, step-by-step | Deep Learning Chapter 6 (video, 3Blue1Brown (YouTube), 26 min)

    Queries, keys and values are exactly what the KV cache stores and what sparse attention tries to skip.

  3. A Visual Guide to Mixture of Experts (MoE) (article, Maarten Grootendorst, 30 min)

    A picture-first introduction to experts, routers, sparse layers and load balancing, with no heavy maths.

  4. Mixture of Experts Explained (article, Hugging Face, 40 min)

    Adds the training and serving trade-offs, including why total and active parameters differ.

  5. makeMoE: Implement a Sparse Mixture of Experts Language Model from Scratch (article, Hugging Face (Avinash Sridhar), 45 min)

    Reading a working top-k router in code makes the 'top-4 of 384 experts' idea concrete.

  6. Mixture of Experts (MoEs) in Transformers (article, Hugging Face, 25 min)

    Shows how hundreds of experts are packed and spread across devices with expert parallelism, which is how trillion-parameter models fit.

  7. KV Cache in LLM Inference Explained (guide, Learn AI Visually, 15 min)

    Explains what the cache stores and why it grows linearly with context, which is the cost a 1M-token window runs into.

  8. KV Cache Memory: The Real Cost of Long-Context Inference (article, IntuitionLabs, 20 min)

    Gives you the formula to estimate cache memory yourself, so you can see why long context needs special tricks.

  9. vLLM: Easy, Fast, and Cheap LLM Serving with PagedAttention (blog, vLLM project, 15 min)

    Shows the classic fix for wasted cache memory, which is paging the cache the way an operating system pages memory.

  10. How sparse attention solves the memory bottleneck in long-context LLMs (article, TechTalks, 15 min)

    Introduces the idea of attending to only a chosen subset of cached tokens, the family MiniMax Sparse Attention 2 belongs to.

  11. DeepSeek-V3.2-Exp (repo, DeepSeek AI (GitHub), 25 min)

    A concrete open example of learned sparse attention on top of an MoE, with kernels and code to read before the M4 report.

  12. MiniMax M4: The Intelligence Frontier Under Compute Constraints (blog, MiniMax, 10 min)

    The launch post gives you the headline specs: 2.74T total and 66B active parameters, plus a 1M-token context.

  13. MiniMax-M4 (repo, MiniMax-AI (GitHub), 1 h 30 min)

    The last step is to read the technical report on MSA2, SSD KV-cache offload and the MoE design, using the earlier steps as your background.