In Gemma 4, what do the E in E4B and the A4B in 26B A4B mean for memory versus per-token compute?
answer
- two numbers hide in one name
- effective versus stored parameters
- per-layer tables used only for lookups
- every expert resident, few compute
- audio stops at 12B Unified
basics
~20 sGemma 4's E sizes count effective parameters: E4B computes with 4.5B per token but stores 8B including Per-Layer Embeddings. The 26B A4B is a mixture of experts: 3.8B active per token, yet all 25.2B must be held in memory.
solid answer
~50 sGemma 4 ships five sizes: E2B, E4B, 12B Unified, 26B A4B and 31B Dense. The `E` means *effective* parameters. With **Per-Layer Embeddings**, each decoder layer has its own small per-token embedding table that is only looked up, so E2B computes like 2.3B while its checkpoint holds 5.1B, and E4B 4.5B of 8B. A runtime can memory-map those tables instead of keeping them in accelerator memory, but the model card does not promise where they live. The `A4B` means about 4B active: a router picks 8 of 128 experts plus 1 shared, 3.8B parameters per token, yet every expert stays resident, so you provision memory for 25.2B and get compute close to a 4B dense model. Audio input exists on E2B, E4B and 12B Unified; context is 128K on the two E sizes and 256K on the rest.
go deeper
Recall the five Gemma 4 sizes and read each name: E means effective parameters, A4B means about 4B active per token. Know that audio input is on E2B, E4B and 12B Unified.
Explain why effective and stored counts differ: Per-Layer Embeddings are lookup tables, and the MoE router activates 8 of 128 experts plus a shared one. Then say which count sizes memory and which sizes per-token compute.
Show you provision for what the runtime keeps resident: all 25.2B parameters for the MoE, the with-embeddings count for E sizes unless the tables are memory-mapped, plus attention cache for the context you allow.
Frame the line-up as a trade between memory budget and per-token latency: the MoE buys near-4B speed for 26B-class memory, while the E sizes keep compute small for constrained devices at the cost of extra stored tables.
## The Gemma 4 line-up at a glance **Gemma 4** is Google's open-weight model family, released in April 2026 under Apache 2.0. It comes in five sizes, and the size names encode two different ideas: how many parameters each token **computes** with, and how many the checkpoint **stores**. Reading them correctly is the first step in matching a size to a phone-class device, a single GPU or a server. | Size | Parameters | Layers | Context | Input | |---|---|---|---|---| | E2B | 2.3B effective (5.1B with embeddings) | 35 | 128K | text, image, audio | | E4B | 4.5B effective (8B with embeddings) | 42 | 128K | text, image, audio | | 12B Unified | 11.95B | 48 | 256K | text, image, audio | | 26B A4B (MoE) | 25.2B total, 3.8B active | 30 | 256K | text, image | | 31B Dense | 30.7B | 60 | 256K | text, image | Every size also takes **video as frames** (up to 60 seconds at 1 frame per second). Audio clips run up to 30 seconds. The vocabulary is 262K tokens. ## What the E means: effective parameters The `E` in `E2B` and `E4B` stands for **effective** parameters. These two sizes use **Per-Layer Embeddings (PLE)**: - In a plain decoder, a token becomes one embedding vector at the input, and its hidden state is then transformed layer by layer. - With PLE, **each decoder layer also gets its own small embedding** for each token, read from a per-layer table. - Those tables are **large but used only for lookups**: fetching a row is cheap, so they add little to the work each token does. - The model card therefore counts them apart: E2B is **2.3B effective** and **5.1B with embeddings**; E4B is **4.5B effective** and **8B with embeddings**. What this means for memory is less settled than the name suggests. The checkpoint holds the with-embeddings count, and the model card gives **no memory table** and does not say where the tables must live. Because the tables are only read row by row, **a runtime can** memory-map them from storage instead of holding them in accelerator memory. One on-device runtime's E2B package does exactly that: a 2.58 GB file in which 0.79 GB of text-decoder weights stay in memory and 1.12 GB of embedding parameters are memory-mapped. That is one runtime's choice, not a property of every runtime; a runtime that loads everything into accelerator memory needs room for the full with-embeddings count. ## What A4B means: active versus resident `26B A4B` is a **mixture-of-experts (MoE)** model. It has 128 experts plus 1 shared expert, and a router picks **8 of the 128** for each token, alongside the shared one. - **Total parameters: 25.2B.** This is what must be loaded. The router chooses experts token by token, so any expert may be needed for the next token, and serving keeps every expert resident. - **Active parameters: 3.8B.** This is what each token actually computes through, rounded to "A4B" in the name. - The model card says the 26B A4B runs much faster than its total size suggests, close to a 4B dense model. So **memory follows total parameters and per-token compute follows active ones**. A team that provisions memory for "about 4B" will not fit the model; a team that budgets latency as if it were a 26B dense model overestimates what each token costs. ## Context, attention and the Unified size Context length is a second memory bill on top of the weights, because the attention cache grows with the tokens a request holds. - **E2B and E4B: 128K tokens.** - **12B Unified, 26B A4B and 31B Dense: 256K tokens.** - Every size interleaves **local sliding-window attention** layers with **global attention** layers, and the final layer is always global. The window is 512 tokens on E2B and E4B and 1024 on the other sizes. `12B Unified` is **encoder-free**: raw image patches and audio waveforms are projected straight into the embedding space instead of passing through a separate encoder first. It is the largest Gemma 4 size that accepts audio; the 26B A4B and the 31B Dense take text and images, not audio. ## Reading a size name when you provision hardware 1. Separate the two numbers: effective or active parameters set per-token compute; stored or total parameters set what must be held. 2. For an E size, check whether your runtime keeps the per-layer embedding tables in accelerator memory or memory-maps them. 3. For the 26B A4B, budget memory for all 25.2B parameters at the precision you serve. 4. Add the attention cache for the context you will allow, up to 128K or 256K depending on the size. 5. Check modality: if the product must hear voice notes, only E2B, E4B and 12B Unified accept audio.
- Why must every expert of Gemma 4's 26B A4B stay in memory if only 8 of 128 run per token?Because the router picks experts per token, and the next token can need any of them. Fetching experts from slower storage on demand would put those reads on the per-token path, so serving keeps all 25.2B parameters resident. The saving is per-token compute: about 3.8B parameters work on each token, which is why the model card says it runs close to a 4B dense model.
- Does Per-Layer Embeddings mean Gemma 4 E2B needs only 2.3B parameters' worth of memory?Not by guarantee. The checkpoint holds 5.1B parameters including the per-layer embedding tables. Because those tables are only looked up, a runtime can memory-map them instead of holding them in accelerator memory; one on-device runtime's E2B package keeps 0.79 GB of decoder weights in memory and memory-maps 1.12 GB of embeddings. The model card itself gives no memory table.
- What does Unified mean in the name Gemma 4 12B Unified?It is encoder-free: raw image patches and audio waveforms are projected straight into the embedding space instead of passing through a separate encoder. With 11.95B parameters across 48 layers and a 256K context, it is the largest Gemma 4 size that accepts audio input.
- E4B has only 4B parameters, so its checkpoint stores about 4B.
- The 26B A4B needs only about 4B parameters of memory, since 3.8B are active.
- Only the two small E sizes of Gemma 4 accept audio input.
- Every Gemma 4 size has a 256K context window.
- The 26B A4B costs as much compute per token as a 26B dense model.
- Per-layer embedding tables stay out of accelerator memory on every runtime.
Assumes Gemma 4 as documented on its model card (April 2026 release); Gemma 3 and earlier generations use different sizes and none of these E or A4B names.