The Rabbit Hole / AI / Model architectures
Allen Institute for AI · Architecture mapOLMoE 1B-7B
A small, fully open mixture-of-experts model: 64 experts per layer, 8 chosen per token, and ordinary multi-head attention.
OLMoE-1B-7B-0924, September 2024 · OLMo release timeline
Inside OLMoE 1B-7B
Inside multi-head attention · Transformer layers 1–16
Earlier context dimmed · current token bright · dashed regions contain cached entries.
Model-specific details
- Transformer layers 1–16 · 16 repetitions
- 64 experts per layer, 8 selected per token, each expert with a hidden size of 1024. No dense layers and no shared expert in the config.
- Attention and positions
- 16 query heads and 16 key/value heads, so no sharing. Causal attention with rotary positions (theta 10,000). Queries and keys are normalised over their full width before the attention scores.
- Memory
- Keys and values for all 16 heads, per token per layer.
Small experts in every layer
All 16 layers select eight of 64 experts, each of intermediate width 1,024, with no shared expert. About 1B of the 7B parameters are active per token.
Attention is full multi-head with 16 key/value heads and whole-vector QK-norm. Router weights use softmax over all experts without renormalising the selected eight.
The September 2024 checkpoint uses a 4,096-token context.
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
- Mixture of experts (MoE): a big model that uses only part of itself
- Routing: selecting experts and weighting their work
- RoPE: position as a rotation
- Transformer layers: attention is only half of what you need
- Attention, from scratch
- The KV cache: why LLMs remember every key and value