Gemma 3

Google DeepMind (Gemma Team) · 2025-03-25 · analysed 2026-08-10 · skill v0.3.5

dense efficient-attention multimodal open-weights large on-device

Design overview

Gemma 3 is Google DeepMind's third-generation open decoder-only transformer family (1B–27B), and its headline architectural change targets long-context inference cost: the uniform attention stack of Gemma 2 gives way to a 5:1 interleaving of local and global layers, starting with a local layer, where each local layer is a sliding-window self-attention with a span of only 1024 tokens and each global layer keeps full-length attention. Only the global layers therefore attend over the full 128K context, cutting KV-cache memory overhead from roughly 60% of model memory (global-only) to under 15% at 32K prefill. Attention remains grouped-query (GQA) with RMSNorm pre- and post-norm, and Gemma 2's logit soft-capping is replaced by QK-norm, borrowed from the ViT and Chameleon lines. Long context is reached by pre-training at 32K and rescaling RoPE at the end of pre-training (positional-interpolation-style factor 8), with the global layers' RoPE base raised from 10k to 1M while local layers stay at 10k. Multimodality is an adapter: a frozen 400M SigLIP encoder (896×896, shared across 4B/12B/27B) converts images into 256 soft tokens with 4×4 average pooling, plus an inference-time Pan & Scan windowing scheme for arbitrary aspect ratios; the 1B variant is text-only. All models are trained with knowledge distillation (teacher unnamed) on 2T–14T tokens, and the IT models use an improved post-training recipe built on distillation and BOND/WARM/WARP-style RL with math and code-execution rewards. The report is unusually light on architecture numbers: it discloses no layer counts, hidden dims, FFN widths, or head counts for any variant.

What the report claims is novel

Atlas assessment: The block is a conservative evolution of the dense GQA decoder-only skeleton shared with meta-llama-3.1/meta-llama-3 (RMSNorm pre/post-norm, RoPE, SwiGLU-class FFN by lineage). The genuinely new axis for the atlas is the per-layer attention pattern: a 5:1 local/global interleaving with a 1024-token sliding-window span (the first sliding-window record in the atlas; phi-3-small's blocksparse pattern is the nearest peer but is a different mechanism) and the dual RoPE bases (10k local / 1M global). QK-norm replacing soft-capping follows deepseek-v3's QK-norm practice but is applied to a dense GQA model. Long context reuses positional interpolation (factor 8) rather than a new mechanism. Vision is an adapter (frozen SigLIP + P&S), not native. The 'novel post-training recipe' is a training contribution (distillation from an unnamed teacher + BOND/WARM/WARP-based RL), and the report's flagship claim (4B-IT ≈ Gemma2-27B-IT; 27B-IT ≈ Gemini-1.5-Pro) is internal to the report and not independently verifiable. The report is unusually sparse on architecture disclosure: no layer counts, hidden dims, FFN widths, or head counts for any variant.

Relation to the atlas

Lineage in

Influence out

Notable omissions

Closest relatives in the atlas

Spec sheet

Identity

FamilyGemma 3[1]
OrganisationGoogle DeepMind (Gemma Team)[2]
Release date2025-03-25[3]
Report URLhttps://arxiv.org/abs/2503.19786[4]
Licensenot disclosed
Open weightsyes[5]

Variants

Scale

Total parameters27B[6]
Active parameters / token27B
Layersnot disclosed
Hidden dimensionnot disclosed
FFN inner dimensionnot disclosed
FFN rationot disclosed
Query headsnot disclosed
KV headsnot disclosed
Head dimensionnot disclosed
Vocabulary size262000[7]
Embedding tyingnot disclosed

Per-variant configs

VariantTotalLayersHiddenFFNQ headsKV headsContext
1B1Bnot disclosednot disclosednot disclosednot disclosednot disclosed32,768
4B4.301Bnot disclosednot disclosednot disclosednot disclosednot disclosed131,072
12B12.188Bnot disclosednot disclosednot disclosednot disclosednot disclosed131,072
27B27.016Bnot disclosednot disclosednot disclosednot disclosednot disclosed131,072

Core block

Block typedense
Attention variantsliding-window[8]
Attention layer pattern5:1 interleaving: 5 local sliding-window layers (span 1024 tokens) per 1 global layer, starting with a local layer as the first layer of the model[9]
Depth mixingsequential-residual
Activationnot disclosed
Expert countn/a[10]
Experts per tokenn/a[10]
Shared expertsn/a[10]
Routingn/a[10]
Load balancingn/a[10]
Expert granularityn/a[10]
MethodRoPE[14]
RoPE base frequency1000000[15]
Partial RoPEno
TypeRMSNorm[16]
Placementmixed[17]
QK-normyes[18]
Attention sinksno
Softcappingno[19]
Other

Context

Trained context length131,072[20]
Deployed context length131,072[21]
Extension methodRoPE rescaling (positional-interpolation-style, factor 8) applied at the end of pre-training to extend the 32K-trained 4B/12B/27B models to 128K; global-layer RoPE base raised 10k → 1M while local layers stay at 10k[22]

Tokenizer

AlgorithmSentencePiece[23]
NotesSame tokenizer as Gemini 2.0; ~262k entries, more balanced for non-English languages; PT and IT models share the tokenizer, with control tokens reserved for IT formatting (<start_of_turn>/<end_of_turn>); a [BOS] token must be added explicitly (add_bos=True); PT models end generation with <eos>, IT models with <end_of_turn>[24]

Training

Training tokens14T[25]
Data compositionSlightly larger token budget than Gemma 2; mixture of images and text; increased multilingual data (both monolingual and parallel) with language-imbalance handling inspired by Unimax (Chung et al. 2023); filtering to reduce unsafe/unwanted utterances and personal information, decontamination of evaluation sets, recitation-risk reduction, and a quality reweighting step (Sachdeva et al. 2024)[26]
Curriculum / stagingPre-train at 32K sequences, then rescale the 4B/12B/27B models to 128K at the end of pre-training via RoPE rescaling (factor 8); knowledge distillation during pre-training; per-size token budgets (2T/1B, 4T/4B, 12T/12B, 14T/27B)[27]
Optimizernot disclosed
LR schedulenot disclosed
Batch schedulenot disclosed
Precisionnot disclosed
ParallelismZeRO-3 optimizer-state sharding; data-replica reduction over the data center network (Pathways) for multi-pod training; sharding by data, sequence, and replica (Table 2); JAX/Pathways single-controller paradigm with the GSPMD partitioner and the MegaScale XLA compiler[28]
HardwareTPUv4, TPUv5e, and TPUv5p (1B: 512 TPUv5e chips; 4B: 2048 TPUv5e; 12B: 6144 TPUv4; 27B: 6144 TPUv5p); vision embeddings pre-computed so the vision encoder adds no training cost[28]
Disclosed computenot disclosed

Post-training

SFTyes[29]
Preference optimisationRLHF[30]
Reasoning trainingRL objectives cover helpfulness, math (ground-truth rewards for solving math problems), coding (code execution feedback), reasoning, instruction-following, and multilingual abilities; no long-CoT / RLVR pipeline is described[31]
DistillationAll Gemma 3 models are trained with knowledge distillation (256 logits per token sampled, weighted by teacher probabilities, cross-entropy on the renormalized teacher distribution); IT models use an improved distillation from a large IT teacher; the teacher model is never named[32]

Modality

Typemultimodal[33]
Attachmentadapter[34]

Inference efficiency

KV-cache design5:1 local:global interleaving with a 1024-token local span bounds each local layer's KV cache at 1024 tokens while only global layers attend the full context; report measures KV-cache memory overhead falling from ~60% (global-only) to <15% (5:1, sw=1024) of model memory at 32K prefill[35]
Quantisation shippedQAT (typically ~5,000 finetuning steps, targeting llama.cpp-style engines) producing per-channel int4, per-block int4 (blocks=32), and switched fp8 weight representations; Table 3 reports memory footprints (e.g. 27B: 54.0 GB bf16 / 14.1 GB int4 / 15.3 GB int4_blocks=32 / 27.4 GB SFP8, +KV at 32K context)[36]
Speculative decodingnone disclosed[37]
Serving optimisationsnone disclosed[37]

Evaluation

Benchmarks (report's own numbers only)

BenchmarkValueRef
MMLU-Pro67.5Table 6
LiveCodeBench29.7Table 6
Bird-SQL (dev)54.4Table 6
GPQA Diamond42.4Table 6
SimpleQA10.0Table 6
FACTS Grounding74.9Table 6
Global MMLU-Lite75.1Table 6
MATH89.0Table 6
HiddenMath60.3Table 6
MMMU (val)64.9Table 6
Chatbot Arena (Elo)1338Table 5
RULER (128K)66.0Table 15
MRCR (128K)59.3Table 15

Provenance references

  1. stated · Title
  2. stated · Title page byline
  3. stated · Header: 'arXiv:2503.19786v1 [cs.CL] 25 Mar 2025'
  4. stated · pipeline
  5. stated · Abstract: 'We release all our models to the community.'
  6. stated · Abstract, Table 1
  7. stated · §2.2 Tokenizer
  8. stated · §1, §2
  9. stated · §2 ('We alternate between a local sliding window self-attention and global self-attention, with a pattern of 5 local layers for every global layer, starting with a local layer as the first layer of the model'); §1
  10. n/a · block_type dense
  11. stated · §5.3 ('we pre-train our models with 32K sequences and then scale the 4B, 12B, and 27B models up to 128K tokens at the end of pre-training while rescaling RoPE [Chen et al., 2023]'); §2 ('We follow a process similar to the positional interpolation of Chen et al. [2023] to extend the span of the global self-attention layers')
  12. stated · §5.3 ('We find a scaling factor of 8 to work well in practice')
  13. stated · §2 Long context ('Gemma 3 models support context length of 128K tokens, with the exception of the 1B model that has 32K')
  14. stated · §2 Long context ('We increase RoPE base frequency from 10k to 1M on global self-attention layers')
  15. stated · §2, §5.3
  16. stated · §2 ('Grouped-Query Attention (GQA) with post-norm and pre-norm with RMSNorm')
  17. stated · §2 ('with post-norm and pre-norm with RMSNorm' — both pre- and post-norm applied)
  18. stated · §2 ('Inspired by Dehghani et al. [2023], Wortsman et al. [2023] and Chameleon Team [2024], we replace the soft-capping of Gemma 2 with QK-norm.')
  19. stated · §2 ('we replace the soft-capping of Gemma 2 with QK-norm')
  20. stated · §5.3 ('pre-train our models with 32K sequences and then scale the 4B, 12B, and 27B models up to 128K tokens at the end of pre-training')
  21. stated · §2 Long context ('Gemma 3 models support context length of 128K tokens')
  22. stated · §5.3, §2
  23. stated · §2.2 Tokenizer ('a SentencePiece tokenizer with split digits, preserved whitespace, and byte-level encodings')
  24. stated · §2.2, §3, Table 4
  25. stated · §2.2 Pre-training ('we train on 14T tokens for Gemma 3 27B, 12T for the 12B version, 4T for the 4B, and 2T tokens for the 1B')
  26. stated · §2.2
  27. stated · §5.3, §2.2
  28. stated · §2.4, Table 2
  29. stated · §3 ('Pre-trained models are turned into instruction-tuned models with an improved post-training approach'); §7.2 ('we also use both SFT and RLHF')
  30. stated · §7.2 ('both SFT and RLHF'); §3
  31. stated · §3
  32. stated · §2.2 Distillation, §3, Abstract ('The Gemma 3 models are trained with distillation')
  33. stated · §1 ('most Gemma 3 models are compatible with a tailored version of the SigLIP vision encoder')
  34. stated · §1, §2.1, §5.5
  35. stated · §1, §5.2 (Figs. 5, 6)
  36. stated · §2.3, Table 3
  37. stated · report