Skip to content
StackDecode
LLM Library
Dense decoderOpen weightsArchitecture animation

Gemma 3

Raises the local-to-global ratio to 5:1 with a 1,024-token window, plus image input.

At a glance

Made by
Google
Released
2025
Type
Dense decoder
Access
Open weights
Parameters
1B to 27B
Context window
128k tokens (32k for 1B)
Attention
5 local sliding-window layers per 1 global layer, GQA

How it works

By making most layers local with a short window, Gemma 3 keeps the KV cache small for long contexts. Most sizes also accept images.

Architecture, step by step

A token travels from text in to prediction out. The boxed layers repeat many times.

× N layersText inTokenizerEmbedding + positionNormCausal self-attentionAdd (residual)NormFeed-forward (MLP)Add (residual)Final normLM head (vocabulary scores)Softmax, then sample next token

Raw text enters the system, for example "The cat sat on the".

stage:
1/12
part:
Text in
1/12

The green dot is one token travelling through the model. The boxed section repeats for every layer.

What stands out

  • 5:1 local-global attention
  • 128k context
  • Multimodal (except the 1B)

Keep in mind

Local layers see only a short window, so the very long context relies on the global layers.

Related models