Mistral Large 4
Map all 72 layers from the checkpoint, find where choosing positions starts to cost more than attending to them, and read the learned scales that stretch attention to a million positions.
Jump to a section
A trillion parameters, 49.8 billion per token
Mistral Large 4, nicknamed "Le Chonk", is the largest model Mistral AI has built. Its open weights came out on 29 October 2026, after an API preview earlier that month. It reads text and images, writes text, accepts 1,048,576 tokens of context, and reasons at a chosen effort: low, medium or high. Mistral says it trained the model from scratch on 3,800 NVIDIA Grace Blackwell GPUs in its own European datacenters.
The technical report has been announced but not published. Everything below comes from the checkpoint itself: its configuration, the shapes and some learned values in its weights, and the Transformers implementation.
The model is sparse twice over. In 71 of its 72 layers, each token goes through 4 of 128 routed experts plus one shared expert, so a token uses 49.8B of the 1,051B stored parameters (52.3B counting the embeddings and output head). Separately, each attention layer reads at most 2,048 earlier positions from a compressed cache, chosen by a small indexer. On top of both, layers borrow from each other: some attend over another layer's cache, and others reuse another layer's choice of positions.
98% of the weights are routed experts, so a token uses under 5% of the model
1,029.18B
32.16B
8.04B
8.04B
7.96B
7.96B
1.15B
1.15B
0.45B
0.45B
0.06B
0.06B
2.52B
2.52B
1.70B
per image
Exact counts summed from the shapes in the checkpoint’s 54 safetensors headers. Mistral’s “49B active, 52B including embeddings and output layers” matches. The DSpark draft head ships alongside and adds 2.10B (BF16). The checkpoint is 1.06 TB: FP8 weights with 128 × 128 block scales, plus BF16 for the vision tower, output head, latent projections and parts of the indexer. Every expert must sit in memory even though each token reads four of 128, which is why serving starts at a full 8-GPU node.
Checkpoint · consolidated-*.safetensors headersWhat each layer keeps, and where it looks
Before it can attend, an attention layer has two jobs. It has to decide what to store about each past position, and which of those positions to read.
What to store. Multi-head Latent Attention (MLA, from DeepSeek-V2) compresses each position into a 512-value latent plus one 64-value rotary key that all 64 heads share. Each head rebuilds its own keys and values from the latent through a learned up-projection. The cache holds 576 values per position per layer instead of 64 heads × 256.
Which positions to read. DeepSeek Sparse Attention (DSA, introduced with DeepSeek-V3.2) adds an indexer: a cheap scorer with 32 small heads that rates every earlier position and keeps the best 2,048. All 64 attention heads then attend to those positions only.
Mistral takes that recipe and changes six things:
- Queries come from a direct projection, with no low-rank compression.
- Every fourth layer has no rotary position encoding at all (NoPE).
- From layer 39 onward, every fourth layer reads layer 35's latent instead of computing its own.
- 28 layers reuse the selection made by the most recent layer that ran its indexer.
- Each head rescales its query by a learned amount that depends on position.
- The rotary frequencies get learned multipliers.
After attention, a router sends the token to 4 experts.
Inside one layer: two selections, then attention
Then residual add → RMSNorm → router: softmax over 128 expert scores, keep the top 4, renormalize their weights to sum to 1 → those 4 experts + the shared expert → residual add
Drawn from the Transformers implementation and the checkpoint’s weight shapes. Queries are a direct projection (no low-rank query compression). At decode time the up-projection is usually absorbed into the query, so scores are taken against the 512-value latent directly, which is what makes the small cache usable. In NoPE layers the 64 dimensions that would rotate become content dimensions instead, in both the attention and the indexer.
Transformers · modular_mistral_large4.pyThe three kinds of reuse are independent. Every layer that borrows a cache is a NoPE layer, and so is the layer it borrows from, layer 35. The implementation keeps separate shared slots for rotated and unrotated caches, so no layer ever reads a cache built under a different positional scheme. Reuse saves memory and compute, but a borrowing layer gives up its own choice, and with no published ablations the quality cost is unknown. The map below lays out all 72 layers; select one to see what it computes and what it borrows.
Seventy-two layers: what each computes and what it reuses
- RoPE × 54
- NoPE × 18
- Own latent × 63
- Layer 35, also read by 9 others
- Reads layer 35’s × 9
- Runs indexer × 44
- Reuses a selection × 28
- Dense × 1
- MoE × 71
Every row comes from the checkpoint’s config.json: no_rope_layers, kv_source_layers, indexer_types and mlp_layer_types. Select a layer. The three reuse patterns are independent: layer 39 reads layer 35’s cache but runs its own indexer, while layer 50 caches its own latent but reuses layer 48’s selection.
Where choosing positions costs more than attending
A layer with its own latent stores for each position , and a RoPE layer also stores a rotary key . Across the model, 54 RoPE layers and 9 NoPE layers own a latent:
Without sharing, the nine borrowing layers would add 4,608 values. Full per-head keys and values would cost values per position, 33 times more. In BF16 at positions, the latent cache takes GB.
For the query at position , the indexer scores every earlier position , keeps the top 2,048, and attention normalizes over those alone:
The indexer's cost still grows with . Each scored position costs 32 × 128 multiply-adds, against 64 × (512 + 64 + 512) for each position a head actually attends to. Summed over the model, one new token costs about multiply-adds per attended position and per scored position. Attention stops at 2,048 positions and scoring does not, so the indexer becomes the larger cost beyond tokens.
Past 56K tokens, choosing positions costs more than attending to them
- Dense MLA: every earlier position
- DSA: indexer + 2,048 positions
- of which the indexer
| Attention multiply-adds per new token · dense vs DSA | 5,179.7B vs 199.1B · 26.0× |
| Share of the DSA work spent in the indexer | 95% |
| Latent cache, BF16 · 35,712 values per position | 74.9 GB |
| Indexer keys, FP8 · 5,632 values per position | 5.9 GB |
| For scale: full per-head K and V in every layer, BF16 | 2.47 TB |
Our arithmetic from config.json, counting the absorbed form used in decoding: per attended position, 64 heads × (512 + 64) for scores and 64 × 512 for the value read (NoPE layers 512 + 512); per scored position, 32 indexer heads × 128 in the 44 layers that run an indexer. Below 2,048 tokens DSA attends to everything and the indexer is pure overhead. The latent is 35,712 values per position, 33× less than full per-head keys and values; sharing layer 35’s latent saves 11%. Mistral’s reference configuration stores both caches in FP8, which halves the latent. Weights, activations and kernel efficiency are excluded, and the indexer’s FP8 arithmetic is cheaper per operation than this count suggests.
params.json · dsa, kv_sharingShort prompts gain nothing. Below 2,048 tokens every position is attended anyway, and the indexer adds about 4% on top. The saving over dense MLA then grows with context: 3.5× at 8K tokens, 19× at 128K and 26× at 1M. Reusing selections in 28 layers removes 39% of the indexer's work, which matters most past 56K tokens, where the indexer is the dominant cost.
Stretching attention to a million positions
Each head multiplies its query by a learned function of position before the usual dot product:
The reason is dilution. Suppose one key beats competitors by a logit gap . Its attention weight is , which shrinks as grows. Multiply the logits by and the competitors' total becomes , which stays bounded when . This is the idea behind Scalable-Softmax, and the configuration calls it ssmax.
Because and are learned, a head can also choose to flatten its attention with distance. Averaged over heads, the scale at position ranges from 0.43 in layer 0, which flattens, to 2.40 in layer 38, which sharpens.
Deeper layers sharpen attention as the context grows
Each cell is a layer, colored by its multiplier at 1M positions: orange below 1, purple above. Select one to highlight its line.
Each head multiplies its query by s · ln(t + 1) + b, with s and b learned. Lines are the mean over a layer’s 64 heads, from the BF16 values of ssmax_scaling in the checkpoint; because the formula is linear in ln(t + 1), each mean is a straight line on this axis. Individual heads range from −0.18 to 9.53 at 1M positions. The first layer flattens with distance, most later layers sharpen, and the 44 indexers have their own, milder scaling (mean 0.89 to 1.52 at 1M). Without such a term, a fixed logit gap buys less and less attention weight as the number of competing keys grows.
RoPE rotates dimension pair at angular frequency . YaRN is configured with an original window of 512 and a factor of 2,048, and . It leaves alone the pairs that complete at least 32 turns within 512 positions, divides by 2,048 the pairs that complete less than one, and blends linearly in between. LeRoPE then multiplies each frequency by a learned :
The learned multipliers are not small corrections everywhere. Pair 16 turns once every 628 positions in plain RoPE and once every 1.29M after YaRN, which is longer than the context. Its learned multiplier of 2.54 brings that back to about 506K positions.
Thirty-two rotary frequencies, stretched and then tuned
- Plain RoPE, θ = 10⁴
- After YaRN
- After LeRoPE (used)
Our calculation from the YaRN settings in config.json (θ = 10⁴, original window 512, factor 2,048, β = 32 and 1) and the 32 values of lerope.alpha in the checkpoint; frequency i is multiplied by eαi. YaRN leaves the four fastest frequencies alone, divides the slowest sixteen by 2,048, and blends in between, which opens a gap from about 6K to 1.3M positions per turn. LeRoPE barely touches the fast frequencies but speeds frequency 16 up 2.54× and 17 up 1.94×, so their wavelengths, about 506K and 887K positions, fall inside the 1M context. NoPE layers use none of this.
The layer schedule in code
This script rebuilds the layer schedule from the configuration rules, checks the cache and work arithmetic, and implements the router and the YaRN frequencies.
1import math
2
3LAYERS = 72
4rope = [(l + 1) % 4 != 0 for l in range(LAYERS)] # no_rope_layers
5kv_source = [35 if l >= 39 and (l + 1) % 4 == 0 else l for l in range(LAYERS)]
6indexer = "F" * 17 + "SSFF" * 13 + "SSF" # F runs, S reuses
7assert len(indexer) == LAYERS and indexer.count("F") == 44
8
9# Cache per position: a 512-value latent, plus a 64-value rotary key in RoPE layers.
10latent = sum(512 + (64 if rope[l] else 0) for l in range(LAYERS) if kv_source[l] == l)
11full_kv = LAYERS * 64 * (128 + 128)
12assert latent == 35_712 and all(not rope[l] for l in range(LAYERS) if kv_source[l] != l)
13print(latent, "cached values per position,", round(full_kv / latent), "x fewer than full K/V")
14
15# Multiply-adds per new token: attend to at most 2,048 positions, but score all of them.
16attend = sum(64 * (512 + (64 if rope[l] else 0) + 512) for l in range(LAYERS))
17score = indexer.count("F") * 32 * 128
18def work(t):
19 return attend * t, attend * min(t, 2048) + score * t
20print("indexer outweighs attention beyond", round(attend * 2048 / score), "tokens")
21dense, sparse = work(2 ** 20)
22print(f"at 1M tokens: {dense / sparse:.0f}x fewer multiply-adds than dense MLA")
23
24# Router: softmax over 128 experts, keep the top 4, renormalize their weights.
25def route(logits, k=4):
26 top = max(logits)
27 p = [math.exp(x - top) for x in logits]
28 chosen = sorted(range(len(p)), key=p.__getitem__, reverse=True)[:k]
29 return {e: p[e] / sum(p[i] for i in chosen) for e in chosen}
30weights = route([math.sin(7 * e) for e in range(128)])
31assert len(weights) == 4 and abs(sum(weights.values()) - 1) < 1e-12
32
33# YaRN wavelengths: original window 512, factor 2,048, beta 32 and 1.
34def yarn_wavelengths(dims=64, theta=1e4, window=512, factor=2048, fast=32, slow=1):
35 corr = lambda r: dims * math.log(window / (r * 2 * math.pi)) / (2 * math.log(theta))
36 lo, hi = math.floor(corr(fast)), math.ceil(corr(slow))
37 waves = []
38 for i in range(dims // 2):
39 w = theta ** (-2 * i / dims)
40 keep = 1 - min(max((i - lo) / (hi - lo), 0), 1)
41 waves.append(2 * math.pi / (w * keep + w / factor * (1 - keep)))
42 return waves
43waves = yarn_wavelengths()
44assert waves[3] < 16 and waves[16] > 2 ** 20
45print(f"frequency 16: {waves[16]:,.0f} positions per turn, {waves[16] / math.exp(0.9336):,.0f} after LeRoPE")The weights explain the hardware bill. Every expert has to be resident in memory even though each token reads only four of them. The checkpoint stores FP8 weights in 128 × 128 blocks with one scale per block, and keeps the vision tower, output head, latent projections and parts of the indexer in BF16. The final logits are soft-capped at .
Drafting, benchmarks and the hardware bill
The checkpoint ships a DSpark draft head for speculative decoding. The drafter proposes three tokens and the full model verifies them in one pass, so the output is the same as without drafting. If each draft is accepted independently with probability , a pass yields tokens, at most 4. Generation only speeds up when the drafts are accepted.
A built-in drafter proposes three tokens; the model checks them in one pass
- 1Read the target’s hidden statesLayers 1, 18, 36, 54, 71: 5 × 6,144 = 30,720 values per position, projected to 6,144 as context for the drafter
- 2Draft a block in parallelInputs: the last accepted token and two position-specific mask embeddings. 3 dense MLA layers run once over all three
last tokenmask₁mask₂
- 3Add dependence, left to rightA small recurrent head with a 512-value state adjusts each position’s logits using the token drafted before it, so d₂ can follow d₁
d₁d₂d₃
- 4Verify in one target passThe 72-layer model scores all three drafts at once, keeps the longest prefix it agrees with and adds one token of its own. Output is unchanged from plain decoding
Expected tokens per target pass: 2.18 (1 + a + a² + a³), at most 4.
Structure from params.json (mtp: 3 layers, depth 3, Markov rank 512, RNN head, position-specific draft inputs, target layers 1, 18, 36, 54, 71) and the draft tensors’ shapes; the sampling scheme follows vLLM’s DSpark speculator. The slider assumes each draft is accepted with the same probability once its predecessors are, and ignores the drafter’s own cost (2.10B parameters, dense), so it is an upper bound on speed-up. Mistral reports up to 1.9× throughput; Hugging Face measured about 65 tokens/s for one request on 8 H200s, and 120–138 on chat prompts where drafts are accepted.
On Mistral's own comparisons the model sits at or near the top of open-weight models for agentic coding: 41.4 on Terminal-Bench 4.0 against 40 for GLM-5.3, and 48 on the Artificial Analysis Coding Agent Index against GLM-5.3's 49. At high effort it gets there with 47% fewer tokens than GLM-5.3. It refuses harmful cyber requests more often and resists more attacks on Lakera's B3 benchmark.
It trails the best listed open models on the Artificial Analysis Cyber and Intelligence indices, on finance (Finch) and on web browsing (BrowseComp). Reasoning effort is the main cost lever: medium effort scores 13 points lower on the coding index and uses 32% fewer tokens.
Near the top of the coding index with about half the tokens
Artificial Analysis Coding Agent Index against tokens used per task, from the chart data embedded in Mistral’s release post. At high reasoning effort Mistral Large 4 scores 48% with 8.5M tokens per task; GLM-5.3 scores 49% with 15.9M, so Mistral Large 4 uses 47% fewer tokens, Mistral’s headline figure. Medium effort trades 13 points for a further 32% fewer tokens.
Mistral release post · chart data; model card · AA indicesThe checkpoint is 1.06 TB. Eight H200s hold 1,128 GB, which leaves about 67 GB for cache and activations. That covers Hugging Face's 8 × H200 recipe of 131K context and 16 concurrent requests, but not with all 16 at full length: one 131K-token sequence holds 9.4 GB of BF16 latent cache. An NVFP4 checkpoint targets Blackwell GPUs, and Hugging Face reports that a 2-bit GGUF runs on one 512 GB Mac at about 15 tokens per second. The licence allows commercial use, but offering the model as a hosted service needs a separate licence from Mistral.
A million-token session, worked through
Suppose you serve one 1M-token session on eight 192 GB GPUs, 1,536 GB in total. Memory is not the limit. The weights take 1,060.5 GB, which leaves about 475 GB. At 1M tokens the BF16 latent cache needs 74.9 GB and the FP8 indexer keys 5.9 GB, so the cache fits several times over. The real ceiling is the positional range the model was configured for: 1,048,576 positions.
Per new token, attention reads a fixed 2,048 positions per layer. What grows is the indexer's scoring, which at 1M tokens is 95% of the attention-related work. Prefill is heavier still: scoring a 1M-token prompt takes about multiply-adds, roughly twice the work of all the weight matrices over the same prompt.
Quality is the open question. A fact 900K tokens back helps only if it wins one of the 2,048 places in the layers that need it, and in 28 layers that choice is inherited from an earlier layer. Mistral has published no long-context results, so measure retrieval and multi-step use of distant facts at your own lengths before relying on them.
Sources and further reading
Mistral's technical report was not available when this was written. Parameter totals, cache sizes, multiply-add counts, wavelengths, the code and the worked scenario are LiminalML derivations. Benchmarks are as reported by Mistral and Artificial Analysis. We have not run the model.
- Mistral Large 4 model card, with its
config.jsonandparams.json. - Tensor shapes from all 54 safetensors headers, and the BF16 values of
lerope.alphaandssmax_scaling, read from the checkpoint on 29 October 2026. - The Transformers implementation and model documentation.
- vLLM's DSpark speculator.
- Mistral's release post. Its chart data was read from the page.
- Hugging Face's release post.