BestLLMfor Your hardware. Your LLM. Your call.
The Local Copilot Kit APIOpen data Find my LLM
Updated September 2026

Run Gemma 4 with Ollama.

Verdict (September 2026): Gemma 4 31B is one of the strongest all-round local models you can run today — vision and audio input, 256K context, ~18 GB at Q4, so it wants a 24GB GPU. On laptops and 12GB cards, Gemma 4 E4B (4B effective parameters, ~10 GB at Q4 with its multimodal stack) is the pick. Both are a single ollama pull away.

Which Gemma 4, for which machine

Gemma 4 31BGemma 4 E4B
Parameters31B4B effective (MatFormer)
VRAM at Q4~18 GB → 24GB GPU~10 GB → 12GB GPU
VRAM at Q8~33 GB~18 GB
Context window256K tokens128K tokens
ModalitiesText + vision + audioText + vision + audio
Speed we measure (mid-range)~12 tok/s~40 tok/s
Best for24GB desktops, quality-firstLaptops, speed-first

Figures from our tracked catalog (specs and quantized sizes verified per model, not vendor claims — full sheets: 31B / E4B). Between the two sits nothing: if you have 16GB, run E4B comfortably rather than starving the 31B.

Setup in three commands

1. Install Ollama (installer from ollama.com — details in our Ollama guide).
2. ollama pull the Gemma 4 size you chose — check the exact tag on the Ollama library page for the gemma4 family (tags name the size and quantization; the default tag is the Q4 build).
3. ollama run it, or call it from any app via the local API. For images or audio, pass the file path in your prompt from a client that supports attachments (Open WebUI does).

The VRAM math before you download

The Q4 figures above assume a standard context. Push toward the 31B’s 256K-token window and the KV cache grows well beyond the “+20%” rule of thumb — a long-context session can add several GB. Run your exact scenario through the LLM VRAM calculator first; the formula is on the page. If the model overflows your card, Ollama spills to system RAM and speed falls off a cliff (dense models don’t degrade gracefully — see our 12GB benchmarks).

The license caveat

Gemma 4 ships under the Gemma license — free to use, including commercially, but with Google’s use restrictions attached; it is not an OSI license like Apache 2.0. For most products that’s fine; if your legal team wants unambiguous terms, Qwen 3.5 27B (Apache 2.0) occupies the same ~16 GB Q4 footprint with comparable capability and none of the ambiguity. Our commercial-license ranking tracks exactly this trade-off.

Frequently asked questions

How much VRAM do I need for Gemma 4?

About 18 GB at Q4 quantization for Gemma 4 31B — a 24GB GPU (RTX 3090/4090 class) is the comfortable home. Gemma 4 E4B needs about 10 GB at Q4 and fits 12GB cards. Long contexts add several GB of KV cache on top.

Can Gemma 4 process images and audio in Ollama?

The models are natively multimodal (vision and audio input). In practice you'll want a client with attachment support (like Open WebUI) on top of Ollama's API; plain terminal chat is text-first.

Is Gemma 4 free for commercial use?

Yes, under the Gemma license — which permits commercial use but attaches Google's use restrictions. It is not Apache/MIT; read the terms if your use case is sensitive, or pick an Apache-licensed alternative like Qwen 3.5.

Gemma 4 vs Gemma 3 — worth switching?

Yes if the sizes fit your hardware: per our catalog, Gemma 4 adds audio input and doubles the 27B/31B-class context (128K → 256K) at a nearly identical VRAM footprint (~16 vs ~18 GB at Q4).


By Mohamed Meguedmi — independent comparator of locally-runnable LLMs, benchmarked on a real RTX 5070 Ti (data CC BY 4.0). See the local LLM leaderboard and the best Ollama models.