The Rabbit Hole / AI / Model architectures
Hugging Face · Architecture mapSmolLM3 3B
A small dense model that omits explicit rotary positions from every fourth layer. Causal masks and earlier layers still carry order information.
SmolLM3-3B, July 2025 · SmolLM release timeline
Inside SmolLM3 3B
Inside grouped-query attention · RoPE layers
Earlier context dimmed · current token bright · dashed regions contain cached entries.
Inside grouped-query attention · NoPE layers
Earlier context dimmed · current token bright · dashed regions contain cached entries.
Model-specific details
- RoPE layers · 27 repetitions
- Dense SwiGLU network (hidden size 11008). Attention uses rotary positions.
- NoPE layers · 9 repetitions
- Every fourth layer. Same shape, but attention applies no rotary positions.
- Attention and positions
- 16 query heads share 4 key/value heads. Full attention in every layer. Rotary positions (theta 5,000,000) in most layers; every fourth layer has no position encoding.
- Memory
- Keys and values for 4 heads, per token per layer, in all 36 layers.
NoPE every fourth layer
Three rotary-attention layers precede each global NoPE layer. Sixteen query heads share four key/value heads, and the tied embedding table contains 128,256 tokens.
Long-context training extends 4K to 32K and then 65,536 tokens. The 131,072-token YaRN setting is an extrapolated window rather than the training length shown in the diagram.
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
- NoPE: attention with no position information at all
- RoPE: position as a rotation
- Grouped-query attention (GQA): sharing keys and values in groups
- RoPE scaling: stretching context beyond the training length
- Transformer layers: attention is only half of what you need
- Attention, from scratch
- The KV cache: why LLMs remember every key and value