The Rabbit Hole / AI / Model architectures
Mistral AI · Architecture mapMistral Small 4 119B
A small latent-attention mixture of experts in the DeepSeek mould: 36 layers, 128 experts with 4 chosen, no dense layers, and a vision encoder.
Mistral Small 4 119B 2603, March 2026 · Mistral release timeline
Inside Mistral Small 4 119B
Inside latent attention · Transformer layers 1–36
Earlier context dimmed · current token bright · dashed regions contain cached entries.
Model-specific details
- Transformer layers 1–36 · 36 repetitions
- Latent attention, then an expert block in every layer (no dense layers): 128 routed experts (size 2048), 4 chosen per token, plus 1 shared expert (size 2048).
- Attention and positions
- 32 heads with multi-head latent attention: queries go through a 1024-wide latent, keys and values through a 256-wide latent plus a 64-wide shared rotary key. Each head has a 64-wide content part and a 64-wide rotary part for queries and keys, and a value size of 128. Rotary positions use YaRN scaling (factor 128 from 8192). No sliding window.
- Memory
- Each token and layer stores the 256-value KV latent plus the 64-value rotary key (320 values), not per-head keys and values.
A smaller latent-attention MoE
All 36 layers use experts at width 4,096. Each selects four of 128 routed experts plus one shared expert, with about 6.5B parameters active out of 119B.
The query latent is 1,024-wide; the KV latent is 256-wide with 64 position coordinates. A 24-layer vision encoder supplies images.
The 2603 card and serving command use 262,144 tokens. The config permits 1,048,576 positions with long-context scaling.
How it scores
AA Intelligence Index
Version 4.3.2 · higher is better · checked 2026-11-01. Separate from Epoch ECI.
| Checkpoint / size | Result | Evaluation |
|---|---|---|
| Mistral Small 4 | 11 | AA Index 4.3.2Best evaluated setting |
Explore the components
- Embeddings: giving every token a meaning
- Residual connections: when more layers made things worse
- A whole LLM, layer by layer
- RMSNorm: keeping a token's scale under control
- Multi-head latent attention (MLA): caching a compressed latent
- The KV cache: why LLMs remember every key and value
- RoPE: position as a rotation
- RoPE scaling: stretching context beyond the training length
- Mixture of experts (MoE): a big model that uses only part of itself
- Routing: selecting experts and weighting their work
- Transformer layers: attention is only half of what you need
- Vision encoders: how can image patches join the text?
- Speculative decoding: guessing ahead and checking in one pass
- Weight quantisation: could we store the model in fewer bits?
- Attention, from scratch