local llm tools
Gemma 4
Google DeepMind's multimodal open family on Ollama: E2B / E4B for edge, 12B / 26B MoE / 31B dense for workstations. Text + image + audio (sizes vary), thinking mode, 128K–256K context.
## what it does
tl;dr: Gemma 4 is Google’s open multimodal family — five sizes from laptop-fit (E2B) to workstation-dense (31B), with text/image/audio on the small models and text/image on the larger ones. Thinking mode is on by default.
Variants
gemma4:e2b— 2.3B effective (5.1B with embeddings). Text + image + audio. 128K context. Edge.gemma4:e4b— 4.5B effective (8B with embeddings). Text + image + audio. 128K context. Edge.gemma4:12b— 12B dense. Text + image. 256K context.gemma4:26b— 25.2B MoE (3.8B active, 8 of 128 experts). Text + image. 256K context.gemma4:31b— 30.7B dense. Text + image. 256K context. Frontier local.
gemma4 (no tag) routes to a sensible default per platform. MLX builds (*-mlx) and cloud variants (*-cloud) also exist on the library page.
Pull
ollama run gemma4:e2b
ollama run gemma4:31b
# frontier via Ollama's cloud:
ollama run gemma4:31b-cloud
What you get
- Native
system/assistant/userchat roles and native function calling. - Configurable thinking: prepend
<|think|>to the system prompt to enable, remove to disable. Output uses<|channel|thought\n...<|channel|>for reasoning + answer. - Variable-resolution image input: visual token budgets of 70, 140, 280, 560, 1120. Place images before text in the prompt.
- Audio input on E2B and E4B (CoVoST + FLEURS in their benchmark table).
- MLX builds optimized for Apple Silicon.
Hardware
| Variant | What fits |
|---|---|
| E2B / E4B | Phones, laptops, Apple Silicon base, 8GB+ RAM |
| 12B / 26B | 24GB+ VRAM or 32GB+ unified memory |
| 31B dense | 48GB+ unified or 24GB+ VRAM with offload |
Sampling defaults (from the library page)
temperature=1.0,top_p=0.95,top_k=64. Reasoning models want the higher temperature.
Gotchas
- The library page does not state a license here — Gemma models are published under Google’s Gemma Terms upstream; check
ai.google.dev/gemmabefore commercial deployment. - Thinking tokens appear in the output by default. Don’t append prior thoughts to multi-turn history — the model expects only the final assistant turn.
- 26B is the MoE (A4B) — 3.8B active params, not the full 25.2B.
- Audio is only on E2B/E4B. The 31B dense has no audio input.
Related: Ollama for the runtime, llama.cpp for the engine, Open WebUI for a chat UI, LM Studio for a GUI runner, GPT-OSS as the OpenAI counterpart.
Untested here — facts from ollama.com/library/gemma4 fetched 2026-09-10.
## platforms
linux
## embed this badge
cache ✓ in cache.directory
