Rúben GalvãoThe Rabbit Hole

The Rabbit Hole / AI / Model architectures

Google DeepMind · Architecture map

Gemma 3n

A model built to run on phones: per-layer embeddings and shared key/value caches shrink what must stay in fast memory.

Gemma 3n, 2025 · Gemma release timeline

Inside Gemma 3n

Size
Parameters
2B effective · 5B total
Layers
30
Width
2,048
Mixer
Grouped-query
Select a component to explore it. Layer colours match the execution-order strip.
The complete Gemma 3n architectureInput IDs select embeddings. Layer types execute in the order strip; dotted lines connect the type examples below. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own. 2 keys and 2 values of 256 values per token, only for the first 20 layers. The last 10 layers reuse them. Final normalisation and output weights produce vocabulary scores and the next-token distribution.Text becomes token IDs.Text → tokens → IDstheoldrabbitsleepsEmbedding lookup262,4002,048Input token vectorsCL2,048MobileNet-V5-300M, a convolutional encoder (not a transformer), 256 tokens per imageVision / videoencoder12-layer Conformer based on USM, one token per 160 ms of audioAudioencoderExecution order · 30 layersLayer 1: Local layers (own keys and values)Layer 2: Local layers (own keys and values)Layer 3: Local layers (own keys and values)Layer 4: Local layers (own keys and values)Layer 5: Global layers (own keys and values)Layer 6: Local layers (own keys and values)Layer 7: Local layers (own keys and values)Layer 8: Local layers (own keys and values)Layer 9: Local layers (own keys and values)Layer 10: Global layers (own keys and values)Layer 11: Local layers (own keys and values)Layer 12: Local layers (own keys and values)Layer 13: Local layers (own keys and values)Layer 14: Local layers (own keys and values)Layer 15: Global layers (own keys and values)Layer 16: Local layers (own keys and values)Layer 17: Local layers (own keys and values)Layer 18: Local layers (own keys and values)Layer 19: Local layers (own keys and values)Layer 20: Global layers (own keys and values)Layer 21: Local layers (shared keys and values)Layer 22: Local layers (shared keys and values)Layer 23: Local layers (shared keys and values)Layer 24: Local layers (shared keys and values)Layer 25: Global layers (shared keys and values)Layer 26: Local layers (shared keys and values)Layer 27: Local layers (shared keys and values)Layer 28: Local layers (shared keys and values)Layer 29: Local layers (shared keys and values)Layer 30: Global layers (shared keys and values)Local layers (own keys and values) · matches this colour in the execution-order barLocal layers (own keys and values)Local layers (own keys and values) · 16 repetitions16 layers · one layer shown16RMSNorm before this operation.RMSNormGrouped-query attention: Sliding-window attention over 512 tokens, then a dense gated feed-forward network 8,192 wide.Grouped-queryattentionRotate query and key position components before attention scores; values are unchanged. Sliding-window attention over 512 tokens, then a dense gated feed-forward network 8,192 wide.RoPENormalise queries and keys before attention scores. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.QK-normSliding-window attention over 512 tokens.5128 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Value normNormalise the branch output before the residual update.RMSNormAltUp streams. Combine the residual and branch contributions using the model’s learned weighting. +RMSNorm before this operation.RMSNormGeGLU: Sliding-window attention over 512 tokens, then a dense gated feed-forward network 8,192 wide.GeGLUNormalise the branch output before the residual update.RMSNormAltUp streams. Combine the residual and branch contributions using the model’s learned weighting. +A 256-wide vector looked up per token for this layer, gated, projected and added after the feed-forward network.Token ID, gate and projectionPer-layer embedding+Layer type · execution order aboveGlobal layers (own keys and values) · matches this colour in the execution-order barGlobal layers (own keys and values)Global layers (own keys and values) · 4 repetitions4 layers · one layer shown4RMSNorm before this operation.RMSNormGrouped-query attention: Full attention over the context, then a dense gated feed-forward network 8,192 wide.Grouped-queryattentionRotate query and key position components before attention scores; values are unchanged. Full attention over the context, then a dense gated feed-forward network 8,192 wide.RoPENormalise queries and keys before attention scores. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.QK-norm8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Value normNormalise the branch output before the residual update.RMSNormAltUp streams. Combine the residual and branch contributions using the model’s learned weighting. +RMSNorm before this operation.RMSNormGeGLU: Full attention over the context, then a dense gated feed-forward network 8,192 wide.GeGLUNormalise the branch output before the residual update.RMSNormAltUp streams. Combine the residual and branch contributions using the model’s learned weighting. +A 256-wide vector looked up per token for this layer, gated, projected and added after the feed-forward network.Token ID, gate and projectionPer-layer embedding+Layer type · execution order aboveLocal layers (shared keys and values) · matches this colour in the execution-order barLocal layers (shared keys and value…Local layers (shared keys and values) · 8 repetitions8 layers · one layer shown8RMSNorm before this operation.RMSNormGrouped-query attention: Sliding-window attention over 512 tokens, then a dense gated feed-forward network 8,192 wide. Keys and values come from an earlier layer; this layer computes none of its own.Grouped-queryattentionRotate query and key position components before attention scores; values are unchanged. Sliding-window attention over 512 tokens, then a dense gated feed-forward network 8,192 wide. Keys and values come from an earlier layer; this layer computes none of its own.RoPENormalise queries and keys before attention scores. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.QK-normSliding-window attention over 512 tokens.5128 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Value normNormalise the branch output before the residual update.RMSNormAltUp streams. Combine the residual and branch contributions using the model’s learned weighting. +RMSNorm before this operation.RMSNormGeGLU: Sliding-window attention over 512 tokens, then a dense gated feed-forward network 8,192 wide. Keys and values come from an earlier layer; this layer computes none of its own.GeGLUNormalise the branch output before the residual update.RMSNormAltUp streams. Combine the residual and branch contributions using the model’s learned weighting. +A 256-wide vector looked up per token for this layer, gated, projected and added after the feed-forward network.Token ID, gate and projectionPer-layer embedding+Layer type · execution order aboveGlobal layers (shared keys and values) · matches this colour in the execution-order barGlobal layers (shared keys and valu…Global layers (shared keys and values) · 2 repetitions2 layers · one layer shown2RMSNorm before this operation.RMSNormGrouped-query attention: Full attention over the context, then a dense gated feed-forward network 8,192 wide. Keys and values come from an earlier layer; this layer computes none of its own.Grouped-queryattentionRotate query and key position components before attention scores; values are unchanged. Full attention over the context, then a dense gated feed-forward network 8,192 wide. Keys and values come from an earlier layer; this layer computes none of its own.RoPENormalise queries and keys before attention scores. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.QK-norm8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Value normNormalise the branch output before the residual update.RMSNormAltUp streams. Combine the residual and branch contributions using the model’s learned weighting. +RMSNorm before this operation.RMSNormGeGLU: Full attention over the context, then a dense gated feed-forward network 8,192 wide. Keys and values come from an earlier layer; this layer computes none of its own.GeGLUNormalise the branch output before the residual update.RMSNormAltUp streams. Combine the residual and branch contributions using the model’s learned weighting. +A 256-wide vector looked up per token for this layer, gated, projected and added after the feed-forward network.Token ID, gate and projectionPer-layer embedding+Layer type · execution order aboveAfter all 30 layer executions4 residual streamsLast columnCL2,048Final RMSNormReuses the embedding table, transposed.Tied output weights2,048262,400Vocabulary scoresSoftmax262,400Next-token probabilities
Inside grouped-query attention · Local layers (own keys and values)
4 query heads per group × 2 K/V groups.

Earlier context dimmed · current token bright · dashed regions contain cached entries.

Gemma 3n: Local layers (own keys and values) · grouped-query attention8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own. 2 keys and 2 values of 256 values per token, only for the first 20 layers. The last 10 layers reuse them.2 KV groups; the front face shows one representative.2 KV groups4 heads / group; the front face shows one representative.4 heads / groupAttention input. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier context is dimmed; outlined columns are current.Current token computation.Attention input2,048CLWq. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Wq2,048256Wk. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Wk2,048256Wv. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Wv2,048256RMSNorm. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.RMSNormRoPE. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.RoPERMSNorm. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.RMSNormRoPE. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.RoPEValue norm. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Value normK cache. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.K cache256≤ 512V cache. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.V cache256≤ 512Q context. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier context is dimmed; outlined columns are current.Current token computation.Q context256CLScaled query–key scores, masking and softmax. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Window 512CLCL×. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.×Joined heads. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.8Wo. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Wo2,0482,048Attention output. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier context is dimmed; outlined columns are current.Current token computation.Attention output2,048CL
Inside grouped-query attention · Global layers (own keys and values)
4 query heads per group × 2 K/V groups.

Earlier context dimmed · current token bright · dashed regions contain cached entries.

Gemma 3n: Global layers (own keys and values) · grouped-query attention8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own. 2 keys and 2 values of 256 values per token, only for the first 20 layers. The last 10 layers reuse them.2 KV groups; the front face shows one representative.2 KV groups4 heads / group; the front face shows one representative.4 heads / groupAttention input. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier context is dimmed; outlined columns are current.Current token computation.Attention input2,048CLWq. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Wq2,048256Wk. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Wk2,048256Wv. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Wv2,048256RMSNorm. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.RMSNormRoPE. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.RoPERMSNorm. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.RMSNormRoPE. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.RoPEValue norm. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Value normK cache. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.K cache256CLV cache. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.V cache256CLQ context. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier context is dimmed; outlined columns are current.Current token computation.Q context256CLScaled query–key scores, masking and softmax. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.CLCL×. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.×Joined heads. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.8Wo. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Wo2,0482,048Attention output. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier context is dimmed; outlined columns are current.Current token computation.Attention output2,048CL
Inside grouped-query attention · Local layers (shared keys and values)
4 query heads per group × 2 K/V groups.

Earlier context dimmed · current token bright · dashed regions contain cached entries.

Gemma 3n: Local layers (shared keys and values) · grouped-query attention8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own. 2 keys and 2 values of 256 values per token, only for the first 20 layers. The last 10 layers reuse them.2 KV groups; the front face shows one representative.2 KV groups4 heads / group; the front face shows one representative.4 heads / groupAttention input. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier context is dimmed; outlined columns are current.Current token computation.Attention input2,048CLWq. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Wq2,048256RMSNorm. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.RMSNormRoPE. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.RoPELocal layers (own keys and values)Earlier layerK cache. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.K cache256≤ 512V cache. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.V cache256≤ 512Q context. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier context is dimmed; outlined columns are current.Current token computation.Q context256CLScaled query–key scores, masking and softmax. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Window 512CLCL×. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.×Joined heads. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.8Wo. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Wo2,0482,048Attention output. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier context is dimmed; outlined columns are current.Current token computation.Attention output2,048CL
Inside grouped-query attention · Global layers (shared keys and values)
4 query heads per group × 2 K/V groups.

Earlier context dimmed · current token bright · dashed regions contain cached entries.

Gemma 3n: Global layers (shared keys and values) · grouped-query attention8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own. 2 keys and 2 values of 256 values per token, only for the first 20 layers. The last 10 layers reuse them.2 KV groups; the front face shows one representative.2 KV groups4 heads / group; the front face shows one representative.4 heads / groupAttention input. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier context is dimmed; outlined columns are current.Current token computation.Attention input2,048CLWq. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Wq2,048256RMSNorm. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.RMSNormRoPE. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.RoPEGlobal layers (own keys and values)Earlier layerK cache. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.K cache256CLV cache. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.V cache256CLQ context. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier context is dimmed; outlined columns are current.Current token computation.Q context256CLScaled query–key scores, masking and softmax. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.CLCL×. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.×Joined heads. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.8Wo. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Wo2,0482,048Attention output. 8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.Earlier context is dimmed; outlined columns are current.Current token computation.Attention output2,048CL
Model-specific details
Local layers (own keys and values) · 16 repetitions
Sliding-window attention over 512 tokens, then a dense gated feed-forward network 8,192 wide.
Per-layer embedding
A 256-wide vector looked up per token for this layer, gated, projected and added after the feed-forward network.
Global layers (own keys and values) · 4 repetitions
Full attention over the context, then a dense gated feed-forward network 8,192 wide.
Per-layer embedding
A 256-wide vector looked up per token for this layer, gated, projected and added after the feed-forward network.
Local layers (shared keys and values) · 8 repetitions
Sliding-window attention over 512 tokens, then a dense gated feed-forward network 8,192 wide. Keys and values come from an earlier layer; this layer computes none of its own.
Reuses keys and values of layer 19
Layers 21 to 30 compute no keys or values. They read those of the last earlier layer of the same type.
Per-layer embedding
A 256-wide vector looked up per token for this layer, gated, projected and added after the feed-forward network.
Global layers (shared keys and values) · 2 repetitions
Full attention over the context, then a dense gated feed-forward network 8,192 wide. Keys and values come from an earlier layer; this layer computes none of its own.
Reuses keys and values of layer 20
Layers 21 to 30 compute no keys or values. They read those of the last earlier layer of the same type.
Per-layer embedding
A 256-wide vector looked up per token for this layer, gated, projected and added after the feed-forward network.
Attention and positions
8 query heads share 2 key/value heads, each 256 wide. Every fifth layer is global; the others look back 512 tokens. The last 10 layers reuse key/value caches from earlier layers instead of computing their own.
Memory
2 keys and 2 values of 256 values per token, only for the first 20 layers. The last 10 layers reuse them.

What changes between E2B and E4B

Both include vision and audio encoders and a 32,768-token input context. The effective parameter counts exclude embeddings that can be kept off the accelerator.

How it scores

AA Intelligence Index

Version 4.3.2 · higher is better · checked 2026-11-01. Separate from Epoch ECI.

Checkpoint / sizeResultEvaluation
Gemma 3n E2B InstructE2B5AA Index 4.3.2Published checkpoint
Gemma 3n E4B InstructE4B5AA Index 4.3.2Published checkpoint
AA Index distributionBest checkpoint per model variant among 97 scored variants in this atlas. Gemma 3n E2B Instruct scores 5; its bin is highlighted. Known estimates are excluded.Model variants0.0–3.0: 0 variants3.0–6.0: 15 variants6.0–9.0: 21 variants9.0–12.0: 13 variants12.0–15.0: 9 variants15.0–18.0: 5 variants18.0–21.0: 5 variants21.0–24.0: 6 variants24.0–27.0: 4 variants27.0–30.0: 2 variants30.0–33.0: 2 variants33.0–36.0: 2 variants36.0–39.0: 2 variants39.0–42.0: 3 variants42.0–45.0: 4 variants45.0–48.0: 3 variants48.0–51.0: 0 variants51.0–54.0: 0 variants54.0–57.0: 1 variants57.0–60.0: 0 variants21003060AA Index 4.3.2 →
Gemma 3n E2B Instruct: 5. Distribution of 97 scored variants in this atlas, using each variant’s best checkpoint. Known estimates excluded.

Explore the components

Sources for this map