Skip to main content

News

Gemma 4 Local Guide: Which Gemma 4 Model Should You Run on Mac or Windows?

By 8 min read

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 31B require substantially more memory. A model card's image or audio capability is useful only when 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. A published context limit and a completed download do not establish that a long document or multiple images will fit.

Choose a starting size

HardwareStarting candidateCheck before moving up
8GB RAM or unified memoryA small supported E2B package, if it leaves enough memory for the systemThe common Ollama Q4_K_M download is about 4.6GB; that can already be tight on an 8GB computer. Consider another smaller model when necessary.
16GB RAM or unified memoryE4B at a short contextInspect the actual file and memory use before trying compressed 12B. A discrete GPU has a separate memory limit.
32GB unified memory or ample CPU RAMCompressed 12BTry one model and a modest context first. Larger Gemma models need a separate fit check.
12GB–16GB dedicated GPU memoryCompressed 12BAllow space for image processing, conversation memory, the app, and the display.
24GB dedicated GPU memoryCompressed 26B A4B or 31B as larger-model candidatesInspect the exact package; full 256K context is not implied by loading its weights.
64GB or more unified memoryCompressed 31B or higher-precision smaller variantsContext, other apps, and runtime support still determine practical use.

These are starting choices under stated conditions. They do not establish a quality winner or a measured speed. Use the memory calculator, then inspect actual loading and responsiveness. The 6GB 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.

VariantParameters and architectureModel-level inputPublished context limit
E2B2.3B effective parameters; 5.1B including per-layer embeddingsText, image, audio128K
E4B4.5B effective parameters; 8B including embeddingsText, image, audio128K
12B UnifiedAbout 11.95B, dense and encoder-freeText, image, audio256K
26B A4BAbout 25.2B total; 3.8B active per token, Mixture of ExpertsText and image256K
31BAbout 30.7B, denseText and image256K

The “E” names are effective parameter labels. Their large embedding tables still occupy memory; E2B is not simply a conventional 2B file. A 26B A4B model uses only some experts for each generated token, but full-speed inference loads the total weights. Its active count does not make it fit like a 4B model.

These standard models generate text. Their ability to analyze an image is separate from image generation. Audio input in the model card does not mean every desktop runner accepts an audio attachment. Ollama's cited tags list text and image input; check an audio-enabled implementation separately.

Static estimates and actual downloads

Google's planning table gives approximate Q4_0 loading figures of 2.9GB for E2B, 4.5GB for E4B, 6.7GB for 12B, 14.4GB for 26B A4B, and 17.5GB for 31B. It includes a loading allowance but excludes supporting software and conversation memory. Those figures describe that planning format; they are not the sizes of every downloadable package.

For example, the named Ollama gemma4:e2b-it-q4_K_M tag is about 4.6GB, while gemma4:12b-it-q4_K_M is about 8.0GB. Different compression methods and included components change the package. Use the file or tag you will actually run.

Your working-memory budget also includes the conversation memory, called 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 to extract facts from this harmless source:

The meeting is scheduled for Friday at 10:30.
It moves to Monday only if the draft is not ready.
No fee amount has been agreed.

State the scheduled time, the condition for moving it,
and the agreed fee. Use only the passage.
Say "not stated" for missing information.

A useful answer preserves Friday at 10:30, the conditional move, and the missing fee. This is an exercise for the reader, not a reported model result. 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 the command is missing, use command-not-found help. If loading fails, use model-loading help.

Use Gemma 4 in LM Studio

Install the supported app through the LM Studio guide. Search the exact Gemma 4 variant and choose a supported GGUF or Apple Silicon MLX package. Compare publisher, compression, model type, and engine support rather than selecting 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. A file with a .gguf extension does not establish support in an older engine. 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. A larger model can still invent facts.

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; increasing the chat model's size does not repair empty text extraction. The document guide walks through that distinction.

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. A plausible code block does not establish a working agent.

If answers are wrong, use the incorrect-answer guide to separate source extraction, context, template, and task difficulty. 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; their name does not mean they are already a small GGUF download. Choose the format intended for your engine.

QAT can reduce compression losses, but it does not erase the total-weight or conversation-memory budget. 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. Establish a working target model before trying this optimization; a reported acceleration on another device does not predict your speed.

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 for someone investigating that generation method, rather than a substitute tag for the beginner chat steps above.

Local use and licensing

The cited Gemma 4 checkpoints are published under Apache 2.0. Read the license attached to the exact package, preserve required notices when distributing it, and distinguish it from earlier Gemma releases that used different terms. A third-party conversion, fine-tune, app, or dataset can have separate terms.

Open weights do not establish that the complete training process and data are open. They also do not make answers reliable or authorize use of someone else's documents.

For local-only work, download the engine and package first, select local providers, and check document search, tools, stored history, and sync settings. Use the offline guide and privacy guide before using confidential files.

Sources