Quick guide: With 8 GB of RAM or unified memory, use E2B and check the package and spare memory first. The Ollama Q4_K_M download is about 4.6 GB, before runtime and conversation memory. With 16 GB, use E4B. With 32 GB, or a dedicated GPU with 12 GB or more, use 12B. The 26B A4B and 31B models are for systems with 24 GB of GPU memory or 64 GB of unified memory and above. For basic text chat, a small model is enough. E2B and E4B already accept image and audio input at the model level. Choose a larger model only when it suits your task and fits your memory budget, and confirm that your runner supports the input you need.
Choose a Gemma 4 download by its real memory footprint and the input your app supports. E2B and E4B are candidates for smaller systems; 12B is a middle option; 26B A4B and Gemma 4 31B require substantially more memory. A model card's image or audio capability matters only if the selected package and runner expose that input.
This guide suits someone choosing a first Gemma 4 model in Ollama or LM Studio. Start with a short text chat, then add an image or document.
Choose a starting size
| Hardware | Starting candidate | Check before moving up |
|---|---|---|
| 8 GB RAM or unified memory | A small supported E2B package, if it leaves enough memory for the system | The common Ollama Q4_K_M download is about 4.6 GB; that can already be tight on an 8 GB computer. |
| 16 GB RAM or unified memory | E4B at a short context | Inspect the actual file and memory use before trying compressed 12B. A discrete GPU has a separate memory limit. |
| 32 GB unified memory or ample CPU RAM | Compressed 12B | Try one model and a modest context first. Larger Gemma models need a separate fit check. |
| 12 GB–16 GB dedicated GPU memory | Compressed 12B | Allow space for image processing, conversation memory, the app, and the display. |
| 24 GB dedicated GPU memory | Compressed 26B A4B or 31B as larger-model candidates | Inspect the exact package. |
| 64 GB or more unified memory | Compressed 31B or higher-precision smaller variants | Context, other apps, and runtime support still determine practical use. |
On the same machine, run the same prompt in 26B A4B and dense 31B. Record load time and time to the final answer separately. The expert-routed model activates only part of its weights per token. Use the memory calculator, then inspect actual loading and responsiveness. The 6 GB GPU guide and CPU-only guide cover tighter machines.
The sizes are different architectures
Google's release history lists the original E2B, E4B, 26B A4B, and 31B release on March 31, 2026, multi-token prediction companions on April 16, and 12B Unified on June 3.
| Variant | Parameters and architecture | Model-level input | Published context limit |
|---|---|---|---|
| E2B | 2.3B effective parameters; 5.1B including per-layer embeddings | Text, image, audio | 128K |
| E4B | 4.5B effective parameters; 8B including embeddings | Text, image, audio | 128K |
| 12B Unified | About 11.95B, dense and encoder-free | Text, image, audio | 256K |
| 26B A4B | About 25.2B total; 3.8B active per token, Mixture of Experts | Text and image | 256K |
| 31B | About 30.7B, dense | Text and image | 256K |
The “E” names are effective parameter labels. The large embedding tables still use memory, so E2B is not a conventional 2B file.
The 26B A4B model is a Mixture of Experts (MoE) model. Think of a team of specialists. Per the model card, it has 128 experts, and for each token it uses 8 of them plus 1 shared expert. That is why Google lists 25.2B total parameters but only 3.8B active per token. Because only the active experts do the work, Google says it runs almost as fast as a 4B model. But every expert must stay loaded. Google's documentation says all 26 billion parameters must be in memory for fast routing, so its memory need is much closer to a dense 26B model than to a 4B model. Plan its memory like a 26B model.
Google's Q4_0 loading figures
These are Google's approximate Q4_0 loading figures.
- E2B: about 2.9 GB to load. Published context limit 128K.
- E4B: about 4.5 GB to load. Published context limit 128K.
- 12B: about 6.7 GB to load. Published context limit 256K.
- 26B A4B: about 14.4 GB to load. Published context limit 256K.
- 31B: about 17.5 GB to load. Published context limit 256K.
Google lists about 2.9 GB for E2B under its Q4_0 loading assumptions. Ollama's E2B Q4_K_M package is about 4.6 GB to download. Use the first figure only with Google's assumptions, and the second for download space.
These loading figures leave out conversation memory.
These standard models generate text; image input is analysis, not image generation. Ollama's cited tags list text and image input.
Static estimates and actual downloads
Google's planning table gives approximate Q4_0 loading figures of 2.9 GB for E2B, 4.5 GB for E4B, 6.7 GB for 12B, 14.4 GB for 26B A4B, and 17.5 GB for 31B. It includes a loading allowance but excludes supporting software and conversation memory.
For example, the named Ollama gemma4:e2b-it-q4_K_M tag is about 4.6 GB, while gemma4:12b-it-q4_K_M is about 8.0 GB. Different compression methods and included components change the package. Use the file or tag you will actually run.
Your working-memory budget also includes conversation memory (the KV cache), plus runtime allocations and any image processing. On Apple Silicon, macOS and the CPU and GPU share the same pool. On a PC with a dedicated GPU, RAM and VRAM are separate; CPU offloading is possible in supported runners but can slow the result.
Start at 4096 tokens for a short chat. Increase only when the source and output require it and the machine has room. Reducing context is useful only if the task's necessary text still fits. See the context-length guide.
Make the first chat work in Ollama
Install a current supported version through the Ollama setup guide. Check the exact Gemma 4 tag before downloading. Avoid a cloud tag for local inference.
For a smaller text-and-image package:
ollama run gemma4:e2b-it-q4_K_M
For a machine with more memory, a separate 12B choice is:
ollama run gemma4:12b-it-q4_K_M
Choose one; you do not need both. After the chat opens, set a modest context:
/set parameter num_ctx 4096
Ask it:
Which delivery is delayed? A is on schedule. B is delayed until Tuesday.
Expected: “B, until Tuesday.” In another terminal, run ollama ps while the model is loaded. Inspect processor allocation and context. Restart the app and confirm a new short chat still works.
If ollama is not found, close and reopen the terminal and run ollama --version. The command-not-found help covers what to do if it is still missing. If a download fails or the model will not load, check free disk space against the tag size (E2B at Q4_K_M is 4.6 GB) and free memory against the table above. The model-loading troubleshooting guide covers the next steps.
Use Gemma 4 in LM Studio
Install the supported app through the LM Studio guide. Search for the exact Gemma 4 variant and choose a supported GGUF or Apple Silicon MLX package. Compare the publisher, compression, model type, and engine support instead of choosing a file by size alone.
For ordinary chat, choose an instruction-tuned package, usually marked it. A base model, a QAT intermediate checkpoint, and a ready-to-run instruction model have different purposes. Download all required parts and any image projection companion indicated by the publisher. Start with one loaded model at a short context before adding a document.
Check that the selected engine supports the architecture. If loading fails, preserve the exact error and use the LM Studio loading diagnostic.
Add the task after the setup works
For writing or extracted document text, repeat the same known-fact exercise before using a real file. Check dates, conditions, names, and missing information against the source.
For images, try one clear screenshot with a detail you already know, such as a visible appointment time. Confirm that the runner accepted the image and the answer matches it. Then try a small chart or page. Blurred text, crop boundaries, and unsupported attachments can fail before reasoning becomes the main issue.
For PDFs, check whether the app passes extracted text, retrieved excerpts, or page images. Scanned pages need OCR or a supported image path. The document guide walks through that distinction.
Google's documentation says Gemma 4 has native function-calling support for structured tool use, which enables agentic workflows, and reports better coding-benchmark results. For coding, use a disposable folder and run a small test before enabling agent access. Tool calling requires the model's template, a compatible runner, a client that executes tools correctly, and explicit permissions.
If answers are wrong, use the incorrect-answer guide to separate source extraction, context, template, and task difficulty. For example, if the model misses a fact, check whether the source passage actually contains it and whether the prompt context omitted it. Compare candidates on your own small tasks before downloading a substantially larger model.
QAT, draft companions, and DiffusionGemma
Quantization-aware training, or QAT, adapts a model to tolerate lower-precision numbers. Google publishes ready-to-run QAT GGUF packages and other deployment formats. The -unquantized QAT checkpoints are intermediate weights for conversion. Choose the format intended for your engine.
QAT can reduce compression losses; the total-weight and conversation-memory budget still applies. Preserve the exact variant and compression label when comparing results. See the compression guide.
Multi-token prediction uses a companion model to draft tokens that the target model checks. The companion must match the target and the runner must support the mechanism. Its extra weights consume resources. Get the target model working before trying this optimization.
DiffusionGemma is a separate experimental branch based on the 26B A4B architecture. It generates blocks through a diffusion process and accepts text, image, and video inputs, without audio. It requires its own supported implementation. It is a research choice, not a substitute for the beginner chat steps above.
Local use and licensing
The cited Gemma 4 checkpoints are published under Apache 2.0.
For local-only work, download the engine and package first and select local providers. See the offline guide and privacy guide.
