Module 2 · Inside the block

Mixture of experts: big model, small bill

In this lesson

  • 9 min read
  • 6 reading sections
  • Knowledge check
  • Lesson 9 of 10 in this chapter

This chapter’s goalImplement single-head attention from scratch in NumPy, explain which half of a block holds most of the parameters and which half moves information between positions, and predict how grouped-query attention, key-value caching and a mixture-of-experts design each change memory and speed.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available
Which of the two numbers answers which questionTotal parameters: 671 billionDecides whether you can run it at allEvery expert must stay resident; the nexttoken may route anywhereThe better guide to qualityA sparse model still trails a dense one of thesame total sizeActive parameters: 37 billionDecides speed and price per tokenOnly the routed experts are read for a giventokenAttention is dense and counted in both figuresIn a batch, different tokens routedifferently, so a busy server reads moreA parameter count has stopped being a proxy for price or speed. Ask which figure a vendor is quoting,and expect a sparse model to behave like a dense one somewhere between the two: nearer the geometricmean than either end.
A parameter count has stopped being a proxy for price or speed. Ask which figure a vendor is quoting, and expect a sparse model to behave like a dense one somewhere between the two: nearer the geometric mean than either end.

Figure

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 7Free · no account needed
Lesson steps

Two different numbers, both called size

You will see a model described as “671B total, 37B active”. That is not marketing sleight of hand; it is the defining property of a mixture-of-experts architecture, and it changes how you should reason about cost.

In a dense model, every parameter participates in every token. In a sparse mixture-of-experts model, the feed-forward half of each block is replaced by many parallel feed-forward networks (the experts) plus a small router that picks a couple of them per token. The rest sit idle for that token.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the AI, Actually Explained exam.

Stuck on something?Ask Anjali, your AI tutor

How to cite: Addaly (2026) ‘Mixture of experts: big model, small bill’, in How a Language Model Actually Works. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/how-llms-work/mixture-of-experts (Accessed: 27 November 2026).