← Open-Weight LLM Parts Atlas home
Gemma 4 31B
31B (dense)
developers: Google (Gemma)
published: 2026-03-11
Apache-2.0 · Commercial use OK ↗
max context: 256K
KV(BF16): 40.0 KiB/tok
multimodal (text backbone shown)
window 1,024 5 layers + Full attention 1 layers (K=V shared)
Sliding-window attention 5 layers with full attention 1 layer inserted, in that order, and the last layer is full attention. Only the full-attention layers have KV heads to 4 (reduced), K and V made identical, and position uses proportional RoPE (rotating only 25% of head dims, a partial RoPE).
Interactive structure diagram · simulator (open) →
| layers | 60 = window 50 + full 10 |
|---|---|
| d | 5,376 |
| window | 1,024 token |
| Attention | Q 32 heads. Window layers: KV 16 heads · head 256 / full layers: KV 4 heads · head 512 · K=V |
| Position | window: RoPE (θ=10k) / full: Proportional RoPE (Partial RoPE variant · 25% rotated only, θ=1M) |
| FFN | dense, intermediate 21,504 |
| vocab | 262,144 |
| context | 262,144 |
| Other | Logit soft-capping 30 |
| KV calculation basis | full 10 layers×1(K=V)×4 heads×512d×2B = 40.0 KiB (window 50 layers keep only the latest 1,024 tokens (capped) · no growth with long context) |
| Supported inference | vLLM / SGLang / llama.cpp / Transformers |