The Rabbit Hole / AI / Model architectures
IBM · Architecture mapGranite 4.0 H Small
Only 4 of 40 layers use attention. The rest are Mamba-2 layers, and every layer routes through experts.
Granite 4.0 H Small, October 2025 · Granite release timeline
Inside Granite 4.0 H Small
Inside grouped-query attention · Attention layers 6, 16, 26 and 36
Earlier context dimmed · current token bright · dashed regions contain cached entries.
Model-specific details
- Mamba-2 layers (all except 6, 16, 26 and 36) · 36 repetitions
- Mamba-2 mixer, then the expert block.
- Attention layers 6, 16, 26 and 36 · 4 repetitions
- Attention layer, then the expert block.
- Attention and positions
- Attention in 4 of 40 layers (32 query heads, 8 key/value heads). The other 36 layers are Mamba-2 state-space layers, not softmax attention. No positional embeddings.
- Memory
- Keys and values for 8 heads of size 128 in the 4 attention layers only. The 36 Mamba-2 layers keep a fixed-size state (128 state values per channel), which does not grow with context length.
A mostly Mamba stack
Thirty-six Mamba-2 layers share the stack with attention at layers 6, 16, 26 and 36. No positional embeddings are applied.
Every layer selects ten of 72 experts of width 768, alongside a shared expert of width 1,536. There are no dense feed-forward layers. Embedding, residual, attention and logits multipliers remain explicit model constants.
IBM validates a 131,072-token context; training included samples up to 512K tokens.
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 |
|---|---|---|
| Granite 4.0 H Small | 6Estimated by AA | AA Index 4.3.2Published checkpoint |
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
- Mamba: letting each token control what the state keeps
- Hybrid attention and SSM models: different kinds of memory
- Mixture of experts (MoE): a big model that uses only part of itself
- NoPE: attention with no position information at all
- Grouped-query attention (GQA): sharing keys and values in groups
- Scaling multipliers: fixed constants on embeddings, branches and logitscoming soonFixed constants multiplying embeddings, branches and outputs, chosen so training settings carry over between sizes.
- Routing: selecting experts and weighting their work
- Attention, from scratch
- The KV cache: why LLMs remember every key and value