Inside the Open Frontier
The Architectures of MiMo-V2.6-Pro, GLM-5.3 and Kimi K3
A 33-minute, 16-chapter explainer of how the three strongest open-weights language models work inside. The models were picked by the Artificial Analysis Intelligence Index (v4.3.2, as of October 8, 2026): Xiaomi's MiMo-V2.6-Pro (46), Z.ai's GLM-5.3 (45) and Moonshot AI's Kimi K3 (44). All three are mixtures of experts with a million-token context, and each pays for that context differently:
- MiMo looks nearby. 60 of its 70 layers only see a 128-token sliding window, with learned attention sinks. 10 global layers carry long-range information.
- GLM compresses, then selects. Multi-head latent attention caches 576 numbers per token per layer. A lightning indexer then picks the 2,048 tokens each query actually reads, and one indexer is shared by every four layers.
- Kimi K3 keeps a running memory. 69 of its 93 layers are Kimi Delta Attention, a fixed-size recurrent memory updated by the gated delta rule. Every fourth layer is global MLA with no position encoding at all. On top of that come attention residuals (attention across depth) and a latent mixture of 896 experts.
Everything on screen that describes a model comes from that model's
published files. That covers the layer layouts, head counts and expert
counts (config.json), parameter counts, and a few of the learned weights
themselves. Parameter counts come from the shapes of all 775,889 tensors in the
three checkpoints. The learned weights are MiMo's 7,680 attention-sink logits,
every model's router balancing biases, the decay biases of Kimi K3's 848K KDA
channels, its 186 attention-residual queries, and a block of real 4-bit expert
weights. None of this needs the 1–3 TB of weights to be downloaded: safetensors
files begin with a JSON table of every tensor's shape and byte offset, so HTTP
range requests read exactly what is needed (fetch.py). Mechanisms are shown
with small, seeded toy computations, labeled as such, and schematics are
labeled schematic.
Contents
- 1Three open frontier models3 min
- 2The blueprint, and its two bills2 min
- 3Mixture of experts2 min
- 4Routing, and keeping the experts busy3 min
- 5The million-token problem1 min
- 6MiMo: look nearby, mostly2 min
- 7MiMo: permission to look at nothing3 min
- 8GLM: compress the memory2 min
- 9GLM: read only what matters2 min
- 10Kimi: a memory that never grows2 min
- 11Kimi: the delta rule, and forgetting3 min
- 12Kimi: three to one2 min
- 13Kimi: attention across depth2 min
- 14Kimi: 896 experts, kept stable2 min
- 15Side by side2 min
- 16Recap1 min
Also on this page: Lecture · Notes and sources · Build the film.
Lecture
The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film.
1Three open frontier models3 min
Every few months, a new AI model arrives that anyone can download, not far behind the best ones that you can't. Here's that race, as tracked by Artificial Analysis. Their Intelligence Index combines ten evaluations, from agentic office work to coding in a terminal to research-level physics. Grey dots are proprietary models; blue dots are open-weights models, whose parameters anyone can download. The best open model has followed the best closed one at a distance of a few months.
As of October 2026, the top proprietary model scores about 58. And the top three open-weights models are these: MiMo-V2.6-Pro, from Xiaomi, at 46; GLM-5.3, from Z.ai, at 45; and Kimi K3, from Moonshot AI, at 44.
These three are the subject of this video. They're enormous. Counting every parameter in the weight files each lab published: MiMo has about a trillion, GLM about three quarters of a trillion, and Kimi K3 2.8 trillion, by far the largest of the three. Yet each one uses only a small slice of itself for any one token: about 42 billion parameters, 41 billion, and 105 billion. And each one can read a million tokens of context at once: several thick novels, or a whole software project.
Under the hood, all three are still transformers: the same basic blueprint as GPT-2, back in 2019, a tall stack of layers. But getting to this scale forced each team to make different bets, and they ended up as three quite different machines. MiMo makes most of its layers look only at the last 128 tokens. GLM squeezes each token's memory into a compressed code, and then reads only the two thousand or so most relevant tokens. And Kimi K3 replaces three quarters of its attention layers with a memory of fixed size, which rewrites itself as it reads.
In this video we'll open up all three. First, the trick they share: the mixture of experts. Then the central problem of long context, and the three different ways they solve it. Then Kimi K3's new ideas for the depth and width of a network. And finally, all three side by side. Everything on screen that describes one of these models, from its layer layout to its parameter counts to a few of its learned weights, is read straight from the files its lab published.
What it establishes: Tokens → vectors → attention + FFN → prediction. Bill 1: ≈2 operations per parameter per token. Bill 2: the KV cache grows with context, comparisons with its square.
2The blueprint, and its two bills2 min
Let's start from the blueprint all three share. Text is cut into tokens, each token becomes a long vector of numbers, and those vectors flow up through a stack of layers. Each layer has two parts. In attention, every token looks back at the tokens before it, and pulls in whatever is relevant. In the feed-forward network, each token is processed on its own, by a big two-layer network; this is where much of a model's knowledge seems to be stored. At the top, the final vector becomes a probability for every possible next token. Pick one, append it, and repeat.
At this scale, that design runs up two bills. The first is compute. In a plain, dense transformer, every parameter takes part in processing every token: about two arithmetic operations per parameter, per token, one multiply and one add. For a trillion-parameter model, that would be two trillion operations for every single token it reads or writes.
The second bill is memory, and it grows with the length of the context. To avoid recomputing, attention keeps a cache: a key and a value vector for every past token, in every layer. Each new token compares its query against all of those keys. So the cache grows with every token you add, and over a whole text, the number of comparisons grows with the square of its length.
All three models pay the first bill the same way, with a mixture of experts. The second bill is where they part ways.
What it establishes: Split the FFN into experts, route each token to a few. Capacity grows with all experts, compute only with the active ones. Combinatorics; shared experts.; Real data on screen: Expert counts (384/8, 256+1/8, 896+2/16); routed experts are 98% / 96% / 98% of all parameters.
3Mixture of experts2 min
Here's the idea behind a mixture of experts. Take the big feed-forward network inside one layer, and split it into many small ones, called experts. Then add a small router, which looks at each token and picks just a few experts for it. Only those experts run. Their outputs are blended, with weights from the router, and added back into the token's vector. The other experts sit idle, for this token.
This breaks the link between the two halves of the first bill. The model's capacity to store knowledge grows with all of its experts, while the compute for each token depends only on the few experts that actually run.
Here are the real numbers. In each expert layer, MiMo has 384 experts, and every token uses 8 of them. GLM has 256, and also uses 8, plus one shared expert that every token passes through. And Kimi K3 has 896 experts, uses 16 of them, plus two shared experts. Nearly every layer of each model has a block like this.
Now let's count every parameter in each model, using the shapes of all the tensors in the published weight files. The routed experts are almost the entire model: 98 percent of MiMo, 96 percent of GLM, and 98 percent of Kimi K3. Attention, the embeddings, the router, the shared experts: all of it is a thin shell around a vast library of experts.
Why so many small experts, instead of a few big ones? Because what matters is the combination. With 8 big experts and 2 picks, there are only 28 possible teams. With 8 picks out of 384, there are about ten quadrillion. Small, specialized experts can be mixed and matched far more flexibly. The shared experts in GLM and Kimi play the opposite role: they handle whatever every token needs, so the routed experts are free to specialize.
What it establishes: Sigmoid router, top-k, normalized weights. Rich-get-richer imbalance. DeepSeek's selection-only bias. Kimi's Quantile Balancing.; Real data on screen: Real learned balancing biases of one layer of each model (GLM's sit near +8); toy QB vs. fixed nudges.
4Routing, and keeping the experts busy3 min
How does the router choose? Each expert has a learned vector, a bit like a key. The router takes the dot product of the token's vector with every expert's vector, and squashes each result into a score between zero and one, with a sigmoid. The top scores win: here two out of eight, in MiMo eight out of 384. Their scores, rescaled to add up to one, become the blending weights. All three models use this same recipe.
But left alone, this goes wrong in a predictable way. An expert that gets chosen a lot gets more training, so it gets better, so it gets chosen even more. A few experts end up overloaded, and others are starved, and never learn much of anything. And since the experts are spread across many GPUs, an overloaded expert means one GPU working flat out while the others wait.
The classic fix was an extra penalty in the training loss for imbalance, but that penalty fights against the real goal, predicting text well. All three models instead use a trick introduced by DeepSeek: give each expert a bias, a kind of handicap, that is added to its score only when choosing the winners, not when blending their outputs. If an expert is overloaded, lower its bias; if it's underused, raise it. The router learns freely; the biases just keep the traffic fair.
These are the actual balancing biases of one layer in each model, read straight from the weight files, MiMo's 384, GLM's 256, and Kimi's 896, sorted from largest to smallest. Each one records how much the balancing had to boost or hold back one expert. Notice that GLM's are all around eight. That's fine: only the differences between experts matter, since adding the same number to every score never changes which ones come out on top.
Kimi K3 sharpens this. With 896 experts, small fixed nudges are too slow, and big ones overshoot. So instead of nudging, its Quantile Balancing computes, from a single batch, the bias that would give each expert exactly its fair share. Take one expert, and for every token in the batch, measure how far that token's score for this expert is from the cutoff it would need to make the token's top sixteen. Then put the bias at the point where exactly the fair number of tokens get through: a quantile.
Here's a toy run with 16 experts, on random tokens. With fixed nudges, the busiest expert starts at more than twice its fair share, and it takes about ten steps to come down. The quantile rule gets most of the way in a single step.
What it establishes: Textbook attention at GLM's size: 5.1 MB per token, 5.1 TB at 1M tokens (~7× the weights). ½·10¹² comparisons. Three strategies.; Real data on screen: GLM's dims; its 0.76 TB of weights on disk.
5The million-token problem1 min
Let's put numbers on the second bill. Suppose GLM-5.3 used the textbook version of attention, where each of its 64 heads stores a key and a value of 256 numbers, for every token, in each of its 78 layers. That's over 5 megabytes per token. At a million tokens of context, 5 terabytes: about seven times the size of the model's own weights. And every new token would have to read through all of it.
And compute grows even faster. Across a whole document, attention compares every token with every token before it. For a million tokens, that's about half a trillion pairs, in every head of every layer.
The three models answer this in three different ways. MiMo looks nearby: most of its layers only see a short window of recent tokens. GLM compresses each token's memory into a small code, and then reads only the entries that matter. Kimi keeps a running summary of fixed size, which it rewrites as it reads. And all three keep some layers of full, global attention, as a lifeline to the distant past. Let's take them one at a time.
What it establishes: Causal triangle → 128-token band. MiMo's 60 local / 10 global layout. Reach through depth (7,620 tokens). Cache 51 vs 358 KB/token. GQA 128/8. Partial RoPE (64 of 192 dims).; Real data on screen: Real layer layout; cache sizes from the config.
6MiMo: look nearby, mostly2 min
MiMo first. Here's the pattern of a normal attention layer: each row is a token, and each column a token it can look at. Every token sees everything before it, so the pattern is a triangle. In a sliding-window layer, each token only sees the most recent 128 tokens, itself included. The triangle becomes a narrow band, and the band never gets wider, however long the text.
Of MiMo's 70 layers, 60 are sliding-window layers, and 10 are global. Here's the real layout. The first layer is global, and then a global layer comes after every six or seven local ones, all the way up. The very last layer is global too.
Information can still travel far. Within one local layer, a token can only pull from its window. But the next layer up can pull from tokens that have already pulled from their windows, so the reach grows with every layer. Through MiMo's 60 local layers, information could creep back about 7,600 tokens. But the long jumps are the global layers' job: they reach any token in the context, in a single hop.
The payoff is memory. A local layer only has to cache its last 128 tokens, no matter how long the context gets. Only the 10 global layers have to keep everything. So per token of context, MiMo caches about 51 kilobytes, where the same model with every layer global would need 358. At a million tokens, that's 51 gigabytes instead of 358.
MiMo shrinks the cache in a second way, too, called grouped-query attention. It has 128 query heads, but they share just 8 sets of cached keys and values: sixteen heads read from each one. And within each head, only the first 64 of the 192 query and key dimensions are rotated to encode position. The rest match on content alone. The global layers rotate slowly, suited to distances of up to a million tokens, and the local layers rotate fast.
What it establishes: Softmax must sum to 1. First-token sinks vs. windows. A learnable sink logit: weights can sum to < 1. Xiaomi's ablation: the 128 window beats all-global and 512.; Real data on screen: All 60 × 128 learned sink logits; MiMo-V2-Flash report Tables 2–3.
7MiMo: permission to look at nothing3 min
But a window this small creates a problem, and to see it, we have to look closely at the softmax. Attention turns a head's scores into weights, and those weights always add up to exactly one. So what should a head do when nothing in its window is relevant? It can't attend to nothing. The weights still have to go somewhere, so the head ends up mixing in a little of everything: noise.
Full-attention models found their own workaround. Many heads dump their unwanted attention onto the very first token of the text, a so-called attention sink. But in a sliding window, the first token is long gone.
MiMo's fix, borrowed from OpenAI's gpt-oss models, is to give every head a learnable sink: one extra score, with no token behind it, that sits in the softmax's denominator, like a phantom token with a learned score. When the real scores are unremarkable, the sink soaks up much of the weight, and that weight is simply thrown away. The head's real weights now add up to less than one. It's allowed to look at nothing.
And when one token really does matter, its score beats the sink easily, and the head attends to it almost as if the sink weren't there.
These are MiMo's actual learned sink scores: one for each of the 128 heads, in each of the 60 sliding-window layers. Almost all of them are positive, typically between about a half and one, so the phantom token is a serious competitor in nearly every head. In the deepest layers, a few heads have learned strongly negative values: for them, the sink almost never wins.
With sinks in place, Xiaomi found something surprising, in experiments on a 32-billion-parameter test model. Without sinks, a 128-token window hurt. With sinks, it matched or beat a model with global attention in every layer. And after training on long documents, the 128-token window beat a 512-token window on long-context tests, by a wide margin. Xiaomi's explanation is a division of labor: a small window forces the local layers to handle only local structure, and leaves everything far away to the global layers. A bigger window blurs that line.
What it establishes: MLA: cache a 512-d latent (+64 positional) instead of per-head K/V: 57× smaller. Absorbing the up-projection into the query. GLM's Muon Split and 64×256 heads.; Real data on screen: GLM's MLA dims.
8GLM: compress the memory2 min
GLM takes a different route. Its attention uses a design DeepSeek introduced, called multi-head latent attention, or MLA. The idea: don't cache each head's keys and values at all. Instead, squeeze the token's vector down into one small latent vector, just 512 numbers, and cache only that. When a head needs a key and a value, it rebuilds them from the latent, with its own pair of up-projection matrices. One small cached vector serves all 64 heads.
Position needs special care. Rotary position encoding doesn't play well with this compression, so 64 extra numbers carry a separate, position-rotated key, shared by all the heads. In total, 576 numbers per token per layer, versus 32,768 if all 64 heads cached full keys and values: 57 times less memory.
And there's an elegant trick that makes this cheap. A head's score for a past token is its query dotted with its rebuilt key, and that key is a matrix times the cached latent. But a dot product lets you move the matrix to the other side, onto the query. So each head transforms its query once, and then compares it directly against the cached latents, without ever decompressing them.
GLM made two adjustments of its own. First, the team found that MLA, trained with the Muon optimizer, did worse than ordinary grouped-query attention, until they orthogonalized each head's projection matrix separately in the optimizer. That closed the gap. Second, it uses fewer, bigger heads: 64 heads of 256 dimensions, instead of 96 heads of 192. That keeps the parameter count and the training compute the same, while cutting the work at each decoding step.
But MLA shrinks what each token costs to remember; it doesn't change how many tokens there are. At a million tokens, each new token still compares itself against a million cached latents, in every layer.
What it establishes: DSA's lightning indexer, top-2,048 by content. IndexShare: one indexer per four layers. Training from a dense model.; Real data on screen: Real indexer layout (21 of 78 layers); GLM-5 report Table 3.
9GLM: read only what matters2 min
So GLM adds a second idea, DeepSeek Sparse Attention. Before the real attention runs, a tiny scorer called the lightning indexer looks at every earlier token, and gives each one a relevance score. Then each token keeps just its top 2,048, and the real attention runs only over those. Unlike a sliding window, which decides by position, this decides by content: a token from the very beginning of a long document can still be picked, if it matters.
The indexer is like attention's cheap little cousin. It has 32 small heads, of 128 dimensions each. Each head compares the current token's indexer query with a past token's indexer key, keeps only the positive part, and the heads' results are added up with learned weights. It runs in 8-bit arithmetic, and needs only a small cache of its own. The savings: with a million tokens of context, the real attention reads 2,048 entries instead of a million, about five hundred times fewer. The indexer still has to scan everything, but each of its comparisons is far cheaper.
GLM-5.2, the base model GLM-5.3 is built on, noticed something about the indexer's choices. Neighboring layers pick almost the same tokens. In Z.ai's measurements on a smaller model, adjacent layers shared 70 to 100 percent of their selections. So in GLM-5.3, only about one layer in four runs the indexer, and the layers above it reuse its choices. Here's the real layout: 21 of the 78 layers have an indexer of their own. Z.ai reports that this cuts the compute per token by 2.9 times, at a million tokens of context.
How do you train a scorer like this? Not from scratch. GLM-5 started from a model with ordinary dense attention, first trained the indexer alone, to imitate where dense attention was looking, and then let the whole model adapt to reading sparsely. On long-context tests at 128 thousand tokens, the sparse model came out about even with the dense one: a little better on some, a little worse on others.
What it establishes: Drop the softmax and attention regroups into a memory matrix S = Σ v kᵀ. Fixed size. Geometry of storing pairs; crosstalk; why a plain sum can't update a fact.; Real data on screen: — (2-D toy)
10Kimi: a memory that never grows2 min
Kimi K3 takes the most radical route. In 69 of its 93 layers, there's no cache of past tokens at all. Instead, each head keeps a single matrix of fixed size, a memory, which it updates as each token streams past. To see how that can possibly work, let's build it from scratch. Start with what attention does for one query: weigh every value by how well its key matches the query, and add them up.
Now drop the softmax, and use the raw dot products as the weights. Each dot product can be written as a row times a column, and then the whole sum regroups into a single matrix, the sum over every token of its value times its key, an outer product, applied to the query. That matrix, S, is the memory.
Writing a token into memory means adding its value times its key: a column times a row, which makes a whole grid of products. Reading means multiplying the memory by a query. And no matter how many tokens go in, S stays the same size: for Kimi's heads, 128 by 128 numbers.
Think of S as a lookup table built out of geometry. Here it is in two dimensions. Store a key pointing this way, with this value. Read with the same key, and out comes exactly that value. Now store a second pair. Reading the first key again gives the first value, plus a little of the second, because the two keys aren't perpendicular. In 128 dimensions there's room for many nearly perpendicular keys, but every association you add leaves a small smudge on all the others.
And there's a worse problem. Suppose a fact changes: the same key gets a new value, like a variable in a program being reassigned. The plain sum just piles the new value on top of the old one. Reading it back gives a blend of old and new.
What it establishes: Read, compare, write the error: one gradient step on recall error. Toy reassignment test. KDA's per-channel, per-token forgetting. Lower-bounded gates.; Real data on screen: Half-lives at rest of all 847,872 KDA channels (median 29 tokens; layer 1 ≈ 4); toy recall curves.
11Kimi: the delta rule, and forgetting3 min
The fix is called the delta rule, and it's an old idea, from adaptive filters in 1960. Before writing, read: ask the memory what it currently returns for this key. Compare that with the value you want to store. And write only the difference, the error. This is exactly one step of gradient descent on the memory's recall error: the memory is learning, as it reads, to map keys to values. And now the reassignment works. The old value along that key is replaced, not piled on.
Here's a bigger test: a 64-dimensional memory, and 16 keys that keep getting reassigned new random values. With the plain sum, recall of the latest values fades as the history piles up. With the delta rule, it stays high, however long the stream runs.
Kimi Delta Attention, KDA, adds one more ingredient: forgetting. Before each write, every column of the memory is multiplied by a retention factor between zero and one. Old associations fade, making room for new ones. And here's KDA's refinement: the retention is different for each of the 128 key channels, and it's chosen fresh for every token, from the token itself. So some channels can hold on for thousands of tokens, while others turn over almost immediately.
We can see this in Kimi K3's weights. Each channel has a learned bias that sets its retention when nothing in particular is happening, before each token's own input nudges it. Turning those into half-lives, how many tokens it takes for a stored association to fade to half strength, gives this spread, across all 848 thousand channels: from under one token, to more than ten thousand. The median is about 29 tokens. And there's a trend with depth. In the first KDA layer, the typical channel's memory halves within about four tokens. Deeper in the network, typical half-lives grow to tens of tokens, and in some layers past a hundred.
One engineering detail: K3 caps how fast a channel can forget, so that no retention factor drops below about e to the minus five per token. That keeps the numbers in a range that a GPU's fast matrix units can handle, when tokens are processed in parallel chunks.
What it establishes: Fixed memory can't hold a needle exactly → every 4th layer global MLA (+1 on top). NoPE in MLA; order from KDA's decay and 4-token convolution. Output gates. Cache: 28 GB + 434 MB fixed.; Real data on screen: Real 69/24 layout; cache sizes from the config.
12Kimi: three to one2 min
A memory of fixed size has a limit, though. 128 by 128 numbers per head can't hold an exact copy of a million tokens. Ask for a phone number that appeared 600,000 tokens ago, and a running summary may well have smudged it.
So Kimi K3 keeps some real attention. Every fourth layer is a full, global attention layer, with one extra at the very top, so the last layer always sees everything. That makes 69 KDA layers and 24 global ones. The global layers use the same latent attention as GLM, MLA.
Those global layers have one twist: no position encoding at all. No rotations, no position vectors. How can attention know word order, then? It doesn't have to. The KDA layers below already mix in order and recency: through their fading memories, and through a tiny convolution that blends each token with the three before it. A bonus: when Moonshot stretched the context during training, from 8 thousand tokens to 64 thousand, and later to a million, there were no position settings to retune.
Both kinds of layer also end with a gate: each output channel is multiplied by a sigmoid computed from the token, so each token decides which channels of the result to let through. Now the memory bill. K3's 24 global layers cache 576 numbers per token each: about 28 kilobytes per token, or 28 gigabytes at a million tokens. The 69 KDA memories add a fixed 434 megabytes, whether the context is ten tokens long or a million. In Moonshot's earlier, smaller Kimi Linear model, this design cut the cache by up to 75 percent, and sped up decoding at a million tokens by up to six times, compared with global attention in every layer.
What it establishes: The residual stream as an RNN over depth. AttnRes: each layer attends over earlier outputs with a learned query. Blocks of 12 (≤ 9 sources).; Real data on screen: The 186 learned depth-attention queries: within-block neighbours 0.47 vs. 0.25 across a boundary.
13Kimi: attention across depth2 min
Kimi's next idea applies attention in a direction you might not expect: across depth. Recall the residual stream. Each layer reads the running vector, computes something, and adds its result back. So the input to any layer is the embedding plus the outputs of all the layers below it, all added up with equal weight. Moonshot points out that this is much like how an old recurrent network treats time: everything that has happened gets squeezed into one running state.
Transformers fixed that problem for sequences, by letting every token attend over all the tokens before it. Attention Residuals do the same thing for layers. Turn the depth axis on its side, so the earlier layers' outputs line up like tokens in a sequence. Each layer now attends over them, and chooses what to read. Concretely, each layer has its own learned query vector. The keys are the earlier outputs themselves, normalized. A softmax turns the matches into weights, and the layer's input is the weighted blend, instead of the plain sum.
Keeping every one of 93 layers' outputs around would cost a lot of memory, so K3 groups its layers into blocks of 12. Inside a block, outputs are summed as usual. Across blocks, each layer attends over at most nine summaries: the embedding, one for each finished block, and the current block so far.
Here are the real learned queries: 186 of them, one for the attention half and one for the feed-forward half of every layer. This grid shows how similar each pair of queries is: brighter means they point in more similar directions. The dashed lines are the block boundaries, and the bright squares line up with them. Neighbouring layers in the same block have similarity of about 0.47; neighbours across a boundary, only about 0.25. Layers in the same block see the same set of past summaries, and they learned to ask similar questions of them.
What it establishes: Dispatch traffic. LatentMoE: experts at half width (3,584). RMSNorm before the up-projection. SiTU-GLU soft caps (β = 4, 25). 2.5× scaling efficiency (reported).; Real data on screen: K3's latent and expert dims, SiTU β's.
14Kimi: 896 experts, kept stable2 min
Finally, Kimi pushes the mixture of experts further than the other two: 896 experts per layer, 16 for each token. That creates a traffic problem. In a big deployment, the experts live on different GPUs, so every token's vector has to be shipped to each of its 16 experts, and the results shipped back: 16 copies of a 7,168-number vector, per token, per layer.
The fix comes from NVIDIA's LatentMoE design. Before dispatching a token, compress it to a latent vector of half the width: 3,584 numbers. The routed experts work entirely in that smaller space, and their blended result is projected back up to full width. The two shared experts still see the full-width vector. Half the width means half the traffic, and smaller experts, so for the same budget you can afford more of them.
At this extreme sparsity, Moonshot ran into instabilities, and fixed them with two small changes. First, a normalization right before projecting back up, so the routed branch's scale can't swing around depending on which experts were picked.
Second, a new activation function. Most modern feed-forward networks use SwiGLU: one branch goes through a smooth gate, x times the sigmoid of x, and multiplies the other branch. Both factors grow without limit, so when two big numbers happen to coincide, their product explodes. That's dangerous in low-precision arithmetic. K3's SiTU-GLU wraps each factor in a soft cap: beta times tanh of x over beta. Near zero it behaves just like SwiGLU; far out, it levels off, here at a hundred.
Altogether, Moonshot reports that K3's new architecture, data, and training recipe reach the same loss as its predecessor, Kimi K2, with about two and a half times less compute.
What it establishes: Cache vs. context for all three. Speculative decoding. 4-bit weights. Summary table.; Real data on screen: Cache curves from configs; 32 real 4-bit weights from a K3 expert; on-disk sizes.
15Side by side2 min
Let's put the three side by side. Here's how much cache memory each one needs as the context grows to a million tokens, computed from their configurations. MiMo: about 51 gigabytes at a million, almost all of it from its 10 global layers. GLM: about 93. Its sparse attention saves compute, not memory: every token's latent has to be kept, in case the indexer picks it. Kimi: about 28, plus its fixed 0.4 gigabytes of KDA memories. For comparison, textbook attention at GLM's size would leave this chart almost immediately, on its way to 5 terabytes.
They also share a trick for speed: guessing several tokens at once. Each one has a small extra module that drafts the next few tokens cheaply. Then the full model checks all the guesses in a single pass, and keeps every guess it agrees with, up to the first mistake. MiMo's drafter is five layers deep, and proposes seven tokens at a time. GLM's reuses the indexer's choices and the main model's cache, which in Z.ai's tests raised the average number of accepted tokens by 20 percent. Kimi K3's report describes a single-layer drafter.
And they store their numbers in remarkably few bits. Here are 32 real weights from one of Kimi K3's experts, exactly as stored in the file. Each one takes just four bits, and a four-bit number can only be one of these fifteen values, from minus six to six. Every block of 32 weights shares one scale factor, a power of two: here, two to the minus six. That's how Kimi K3's 2.8 trillion parameters fit in about one and a half terabytes. Moonshot trained with this format in the loop, so the model learned to live with it. MiMo stores its experts in four bits too; GLM uses eight.
Here's everything at once. Three models of broadly similar ambition, all mixtures of experts, all reading a million tokens, with three different answers to the cost of attention.
What it establishes: Recap; what's not covered (training, RL); credits.
16Recap1 min
So that's the open frontier, as of October 2026. Underneath, the same skeleton GPT-2 had: tokens become vectors, attention and feed-forward layers refine them, and the last vector predicts the next token. On top of it, two kinds of bets. On width, all three turned the feed-forward network into a vast library of experts, with only a few percent of the model at work for any one token. On length, three different answers. MiMo looks nearby, and keeps a few global layers. GLM compresses its memory, and reads only what its indexer picks. Kimi keeps a running memory, attends globally only every fourth layer, and even uses attention across its own depth.
What we haven't covered is where most of each technical report's pages actually go: training, and especially reinforcement learning on long, agentic tasks, which shapes what these models do with all this machinery. But because the weights are open, every number about these models that you've seen in this video can be checked by anyone, straight from the files. Thanks for watching.
Notes and sources
Sources
Fact-check notes and sources
- Ranking: Artificial Analysis, open-source models, Intelligence Index v4.3.2 (AA-Briefcase, GDPval-AA, AutomationBench-AA, Terminal-Bench 4.0, SciCode, Humanity's Last Exam, GDP.pdf, CritPt, AA-Omniscience, AA-LCR), fetched Oct 8, 2026: MiMo-V2.6-Pro 46.3, GLM-5.3 (Max) 44.8, Kimi K3 (Max) 43.6; best proprietary in the progress chart: Claude Opus 5.5 (max, with fallback) 57.6. Scores are AA's; they change as models and the index are updated.
- MiMo-V2.6-Pro: model card and MiMo-V2.6 technical report (Xiaomi, Sept 2026; in the repo): 1.02T total / 42B active; 70 layers (60 SWA / 10 GA), window 128, 128 Q / 8 KV heads, head dims 192/128, 384 experts / 8 active, no shared experts; first block global with a dense FFN; 5-layer SWA drafter predicting 7 tokens; MXFP4 QAT during mid-training. The backbone design and the sink ablations come from the MiMo-V2-Flash Technical Report (arXiv:2601.02780): "sliding window size is 128-token and the hybrid local:global ratio is 5:1"; learnable sink bias following gpt-oss; Tables 2–3 (32B dense test models). The MRCR/NoLiMa numbers in Ch. 6 are from those tables.
- GLM-5.3: model card ("the same base model as GLM-5.2 — every gain comes from post-training"); GLM-5: from Vibe Coding to Agentic Engineering, arXiv:2602.15763: MLA with Muon Split (Table 1), MLA-256 ("increase the head dimension from 192 to 256 and decrease the number of attention heads by 1/3"), DSA continued pre-training (Table 3), MTP with shared parameters. GLM-5.2 model card and blog: IndexShare "reuses the same indexer across every four sparse attention layers, reducing per-token FLOPs by 2.9× at a 1M context length"; MTP acceptance length 4.56 → 5.47 (+20%), measured on GLM-5.1's backbone with 7 MTP steps. Overlap of 70–100% between adjacent layers' selections: Bai et al., IndexCache, arXiv:2603.12201 (a 30B DSA model).
- DeepSeek Sparse Attention: DeepSeek-AI, DeepSeek-V3.2, arXiv:2512.02556, eq. 1 (I_{t,s} = Σ_j w_{t,j}·ReLU(q_{t,j}·k_s), FP8, few heads) and the top-k selection.
- MLA: DeepSeek-AI, DeepSeek-V2, 2024 (latent KV, decoupled RoPE key, absorbed projections).
- Kimi K3: model card and Kimi K3: Open Frontier Intelligence (Moonshot AI, Aug 2026; GitHub): 2.8T / 104B; 93 layers, 69 KDA + 24 Gated MLA (3:1 plus a final MLA layer); NoPE in all MLA layers; full-rank sigmoid output gates; KDA eq. 1–6 with the lower-bounded decay g_min = −5; Block AttnRes with 12-layer blocks (eq. 8–10); Stable LatentMoE: 896 experts / 16 active / 2 shared, latent 3,584, RMSNorm before W↑ (eq. 11), SiTU-GLU with β₁ = 4, β₂ = 25 (eq. 12), Quantile Balancing (eqs. 13–14); context 8K → 64K in pre-training, 256K → 1M in cooldown; MXFP4 weights / MXFP8 activations, QAT from SFT onward; "approximately 2.5× improvement in overall scaling efficiency over Kimi K2" (Fig. 7, attributed to architecture, data and training recipe together); one MTP layer (Table 1).
- Kimi Linear / KDA: Kimi Team, Kimi Linear, arXiv:2510.26692: KDA extends Gated DeltaNet with channel-wise gates; "reducing KV cache usage by up to 75% and achieving up to 6× decoding throughput for a 1M context" vs. full MLA (48B-total model).
- Delta rule: Widrow & Hoff, Adaptive switching circuits, 1960; for linear attention: Schlag, Irie & Schmidhuber, Linear Transformers Are Secretly Fast Weight Programmers, 2021; Yang et al., Gated Delta Networks, 2024. Linear attention as a matrix memory: Katharopoulos et al., 2020.
- Attention Residuals: Kimi Team, Attention Residuals, 2026 (cited by the K3 report as [58]).
- LatentMoE: Elango et al. (NVIDIA), arXiv:2601.18089.
- Auxiliary-loss-free balancing: DeepSeek-AI, DeepSeek-V3 Technical Report, arXiv:2412.19437.
- Attention sinks: Xiao et al., Efficient Streaming Language Models with Attention Sinks, 2023; learnable sink logits as in OpenAI's gpt-oss (2025).
- SwiGLU: Shazeer, GLU Variants Improve Transformer, 2020.
- MXFP4: OCP Microscaling Formats (MX) v1.0 specification (E2M1 elements, E8M0 shared scale per 32).
The video makes no claims about the models' training data or about proprietary models beyond their AA scores. Lab-reported results (ablations, speedups, scaling efficiency) are attributed on screen and in the narration, and were not independently reproduced.
What is computed and built
| Source | What | Used in |
|---|---|---|
Artificial Analysis /models/open-source |
Intelligence Index v4.3.2 (10 evaluations) of every listed open-weights model, and the page's "Open Source Progress" timeline (59 models, open vs. proprietary). The top three on Oct 8, 2026 are asserted. | 0 |
Hugging Face config.json |
Layer layouts, heads, dims, window, expert counts, MLA/KDA/indexer settings, SiTU β's, AttnRes block size. | everywhere |
| Safetensors shard headers (range requests) | Name, dtype and shape of all 160,040 / 118,629 / 497,220 tensors. | 0, 2, 14 |
| Small tensors (range requests, ~5 MB) | MiMo attention_sink_bias (60 × 128); every MoE layer's e_score_correction_bias; K3's A_log + dt_bias (69 KDA layers) and *_res_norm/*_res_proj (186 pseudo-queries); one 32-value MXFP4 block from a K3 and a MiMo expert. |
3, 6, 10, 12, 14 |
Method notes (so the numbers can be reproduced and are not over-read)
- Parameter counts. Every stored tensor is counted by its shape. MXFP4 tensors (
U8, two 4-bit values per byte) count twice their byte count. Block scales (weight_scale,weight_scale_inv) are not parameters. Totals: MiMo 1,024.2B (published 1.02T), GLM 753.3B (753B), Kimi K3 2,779.9B (2.78T, report Table 1). They include the vision/audio encoders and the multi-token-prediction layers shipped in each checkpoint. - Active parameters. Everything in the language model except vision/audio encoders, the MTP layers, and the routed experts a token isn't sent to (k/N of the routed experts are counted). Result: 42.2B / 41.3B / 105.4B, vs. the labs' 42B / "40B" / 104.2B. The small differences are definitional (e.g. whether embeddings count).
- Router biases.
e_score_correction_biasis DeepSeek-V3's auxiliary-loss-free balancing bias (all three usetopk_method: noaux_tc). It is added to the sigmoid scores for top-k selection only. The plotted layer is the middle MoE layer of each model (MiMo layer 36, GLM 41, K3 48, 1-based). - Sink logits. MiMo's
attention_sink_biasexists only in its 60 SWA layers (add_swa_attention_sink_bias: true). The modeling code appends it as an extra logit column before the softmax and drops that column afterwards, exactly as on screen. The color map is clipped at ±2. The range is −6.2 to +3.0, and 96.8% of the values are positive. - KDA half-lives. K3's bounded gate (report eq. 5): g = g_min·σ(e^{A_h}·z) with g_min = −5 and retention α = e^g. The input-dependent part of z (
f_b(f_a(x))) is set to zero, leaving z =dt_bias: the retention at rest, before a token's own input moves it. The half-life is ln 2 / (−g) tokens.A_logis stored padded to 128 entries; the first 96 (the heads) are used. Real retention is data-dependent, so this is the learned default, not what happens on any particular text. - Attention-residual queries. Each sublayer's query is
*_res_norm.weight ⊙ *_res_proj.weight(the code folds RMSNorm's gain into the query). The heat map shows cosine similarities of the 186 queries. Layer 1's attention query is all zeros (nothing to attend over yet), so its row is blank. The quoted numbers average neighbouring layers within a block vs. across a block boundary. - Cache sizes. BF16 (2 bytes) per cached number for MiMo's K/V and the MLA latents (512 + 64 per token per layer), FP8 for DSA indexer keys (128 per token in the 21 indexer layers), and FP32 for KDA states (69 × 96 × 128 × 128). "Textbook attention at GLM's size" = 64 heads × (256-d key + 256-d value) × 78 layers. Production engines can store caches in FP8, which halves the BF16 numbers.
- 4-bit block. The first 16 bytes of row 0 of
layers.12…experts.0.w1.weight_packed(K3, layer 13, expert 1, 0-based in the file) are decoded low nibble first through the E2M1 table {0, 0.5, 1, 1.5, 2, 3, 4, 6, and their negatives}. The scale is the first byte ofweight_scale, an E8M0 exponent (127-biased): 2⁻⁶. - Toys (
toys.py) use random vectors, not model activations. The 2-D memory and the 64-d reassignment test (16 keys, 20 trials) compare a plain sum with the delta rule. The balancing demo routes 8,192 random tokens per step to 16 synthetic experts with built-in popularity skew, k = 2, comparing DeepSeek's fixed-step sign update (γ = 0.01) with Kimi's quantile rule. Each step routes a fresh batch with the bias computed from the previous one. The sink example uses six window logits near 0 and a sink logit of 2.
Chapter notes
| # | Scene | What it establishes | Real data on screen |
|---|---|---|---|
| 0 | Hook |
The open/closed race; the top three open models; their size vs. what each token uses; three different machines. Roadmap. | AA's progress timeline (59 models) and scores; parameters counted from every tensor; real layer layouts from the three configs. |
| 1 | Blueprint |
Tokens → vectors → attention + FFN → prediction. Bill 1: ≈2 operations per parameter per token. Bill 2: the KV cache grows with context, comparisons with its square. | — |
| 2 | Experts |
Split the FFN into experts, route each token to a few. Capacity grows with all experts, compute only with the active ones. Combinatorics; shared experts. | Expert counts (384/8, 256+1/8, 896+2/16); routed experts are 98% / 96% / 98% of all parameters. |
| 3 | Routing |
Sigmoid router, top-k, normalized weights. Rich-get-richer imbalance. DeepSeek's selection-only bias. Kimi's Quantile Balancing. | Real learned balancing biases of one layer of each model (GLM's sit near +8); toy QB vs. fixed nudges. |
| 4 | LongContext |
Textbook attention at GLM's size: 5.1 MB per token, 5.1 TB at 1M tokens (~7× the weights). ½·10¹² comparisons. Three strategies. | GLM's dims; its 0.76 TB of weights on disk. |
| 5 | SlidingWindow |
Causal triangle → 128-token band. MiMo's 60 local / 10 global layout. Reach through depth (7,620 tokens). Cache 51 vs 358 KB/token. GQA 128/8. Partial RoPE (64 of 192 dims). | Real layer layout; cache sizes from the config. |
| 6 | Sinks |
Softmax must sum to 1. First-token sinks vs. windows. A learnable sink logit: weights can sum to < 1. Xiaomi's ablation: the 128 window beats all-global and 512. | All 60 × 128 learned sink logits; MiMo-V2-Flash report Tables 2–3. |
| 7 | LatentAttention |
MLA: cache a 512-d latent (+64 positional) instead of per-head K/V: 57× smaller. Absorbing the up-projection into the query. GLM's Muon Split and 64×256 heads. | GLM's MLA dims. |
| 8 | SparseAttention |
DSA's lightning indexer, top-2,048 by content. IndexShare: one indexer per four layers. Training from a dense model. | Real indexer layout (21 of 78 layers); GLM-5 report Table 3. |
| 9 | LinearMemory |
Drop the softmax and attention regroups into a memory matrix S = Σ v kᵀ. Fixed size. Geometry of storing pairs; crosstalk; why a plain sum can't update a fact. | — (2-D toy) |
| 10 | DeltaRule |
Read, compare, write the error: one gradient step on recall error. Toy reassignment test. KDA's per-channel, per-token forgetting. Lower-bounded gates. | Half-lives at rest of all 847,872 KDA channels (median 29 tokens; layer 1 ≈ 4); toy recall curves. |
| 11 | Hybrid |
Fixed memory can't hold a needle exactly → every 4th layer global MLA (+1 on top). NoPE in MLA; order from KDA's decay and 4-token convolution. Output gates. Cache: 28 GB + 434 MB fixed. | Real 69/24 layout; cache sizes from the config. |
| 12 | AttentionResiduals |
The residual stream as an RNN over depth. AttnRes: each layer attends over earlier outputs with a learned query. Blocks of 12 (≤ 9 sources). | The 186 learned depth-attention queries: within-block neighbours 0.47 vs. 0.25 across a boundary. |
| 13 | LatentMoE |
Dispatch traffic. LatentMoE: experts at half width (3,584). RMSNorm before the up-projection. SiTU-GLU soft caps (β = 4, 25). 2.5× scaling efficiency (reported). | K3's latent and expert dims, SiTU β's. |
| 14 | SideBySide |
Cache vs. context for all three. Speculative decoding. 4-bit weights. Summary table. | Cache curves from configs; 32 real 4-bit weights from a K3 expert; on-disk sizes. |
| 15 | Outro |
Recap; what's not covered (training, RL); credits. |
The visual languageColor legend (consistent across every scene)
| Concept | Color |
|---|---|
| MiMo-V2.6-Pro / GLM-5.3 / Kimi K3 (model identity, chart series) | orange / blue / lavender |
| token vectors, residual stream | blue |
| query / key / value | yellow / teal / red |
| attention weights, global attention layers, attention across depth | orange |
| experts (routed) / shared experts | purple / light purple |
| router scores | gold |
| balancing biases, expert load | light brown |
| sliding-window (local) layers | light teal |
| attention sinks | warm grey |
| MLA latent | light green |
| DSA indexer, selected tokens | pink |
| KDA / linear-attention memory | green |
Build the film
python tools/build.py open_models # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py open_models Hook # one chapter, silent, with a contact sheet
Scenes: videos/ml/open_models. Setup: see the course page. Source of these notes: the README and the scenes' narration.