The Rabbit Hole / AI / Model architectures
Microsoft · Architecture mapPhi-3.5-MoE
A 16-expert, top-2 mixture of experts that keeps LayerNorm and puts bias terms on its attention and output head.
Phi-3.5-MoE-instruct, August 2024 · Phi release timeline
Inside Phi-3.5-MoE
- Parameters
- 42B · 6.6B active
- Layers
- 32
- Width
- 4,096
- Mixer
- Grouped-query
Select a component to explore it.Inside grouped-query attention · Transformer layers 1–32
4 query heads per group × 8 K/V groups.Earlier context dimmed · current token bright · dashed regions contain cached entries.
Model-specific details
- Transformer layers 1–32 · 32 repetitions
- 16 experts, 2 selected per token (expert hidden size 6400). The router is SparseMixer, with input jitter noise during training.
- Attention and positions
- 32 query heads share 8 key/value heads, with bias terms on the projections; causal attention over up to 131,072 tokens using LongRoPE scaling.
- Memory
- Keys and values for 8 heads, 128 values each, per token per layer.
Experts with SparseMixer routing
All 32 layers select two of 16 experts, without a shared expert. Attention uses 32 query heads and eight key/value heads.
- Norms are LayerNorm despite the config’s
rms_norm_eps field name.
- Attention projections and the output head include biases.
- LongRoPE extends the original 4,096 positions to 131,072.
The August 2024 Instruct model has about 42B parameters, 6.6B active. Its window setting equals the whole context.
Explore the components
Sources for this map