# Gemma 3 on Mac: Variants, Vision and Memory Limits

- URL: https://ai-on-mac.com/articles/gemma3-mac-setup/
- Language: English (United States)
- Published: 2026-05-10
- Updated: 2026-10-12
- Category: Guides
- German version: https://ai-on-mac.com/artikel/gemma3-mac-einrichten/
- Publisher: Julian Dominic Altmann, AI on Mac / KI auf dem Mac (https://ai-on-mac.com)

> Gemma 3 on Apple Silicon: which Ollama variants support text and images, what package size fits, and why 128K context is not a RAM promise.

**Updated October 12, 2026.** Gemma 4 is Google's newer open model family. Gemma 3 is available in variants for different Mac memory sizes: Ollama provides small tags, and the 4B, 12B and 27B variants are listed as multimodal. Package size, context and free unified memory determine the fit.

## Which Gemma 3 variant fits your Mac?

| Mac | First candidate | Practical reading |
|---|---|---|
| 8 GB | `gemma3:1b` for text; test `gemma3:4b` for images | 806 MB/3.4 GB download, not a runtime RAM guarantee |
| 16 GB | `gemma3:4b`; try `gemma3:12b` after a RAM test | 12B is roughly 8.2 GB to download; context and other apps need additional memory |
| 24–32 GB | `gemma3:12b` | more headroom than `27b`; `27b` at 17 GB needs deliberate memory planning |
| 48 GB+ | `gemma3:27b` | larger local option, but 128K context remains a heavy workload |

Ollama also lists `gemma3:270m` and `gemma3:1b`. Those two small variants are text models with 32K context. The 4B, 12B and 27B tags are listed as multimodal with 128K context.

**Tags can change:** On October 12 Ollama lists 1B at 806 MB, 4B at 3.4 GB and 12B at 8.2 GB (previously 815 MB, 3.3 GB and 8.1 GB). Check your actual installed variant with `ollama list`. Download size is not runtime RAM: the runtime, KV cache, macOS, images and other apps add memory use. A successful start does not rule out memory pressure or CPU offloading on a long prompt.

  ![Gemma 3 Mac model tags: 270M 292MB and 1B 806MB text-only with 32K context; 4B 3.4GB, 12B 8.2GB and 27B 17GB support images and list 128K model context. Download sizes exclude runtime memory.](https://ai-on-mac.com/images/gemma3-models-2026/en/gemma3-tags-light.svg?v=20261012b)

*Ollama Gemma 3 tag sizes and modalities, checked October 12, 2026. Download size is not runtime RAM.*

## Starting Gemma 3 in Ollama

**8 GB Macs:** Start with the 1B text-only tag; `270m` is smaller still. Only the 4B/12B/27B tags on Ollama's current list handle images. Test 4B separately with short context and few background apps rather than inferring performance from download size.

```bash
ollama pull gemma3:1b
ollama run gemma3:1b
```

For the smaller vision entry point:

```bash
ollama pull gemma3:4b
ollama run gemma3:4b
```

You can combine an image with a question in the Ollama app or a compatible client. The tag matters: `270m` and `1b` are listed as text models, while image input requires a multimodal tag such as `4b`, `12b` or `27b`.

For a larger local variant:

```bash
ollama pull gemma3:12b
ollama run gemma3:12b
```

The QAT tags (`gemma3:4b-it-qat`, `12b-it-qat` and `27b-it-qat`) are quantization-aware-trained variants. Ollama describes them as lower-footprint options with quality closer to half-precision models. This describes the model and quantization; speed still depends on the particular Mac.

## What vision changes in practice

Image input adds memory and compute compared with a text-only question. A screenshot, PDF render or photo is represented through visual tokens or encoder output. On an 8 GB or 16 GB system, avoid combining a large model, a long text context and many images in one session.

For smaller local image tasks, Gemma 3 4B is suitable for:

- individual screenshots,
- simple document images,
- short image descriptions,
- rough UI or layout questions.

Complex OCR, long documents and difficult visual reasoning require separate evaluation. Model size is only one factor; input resolution, prompt, context and the workflow's error tolerance matter as well.

### Test a screenshot without uploading it: Python example

**You do not need a public image URL.** The official [Ollama Python SDK](https://docs.ollama.com/capabilities/vision) accepts local file paths, image URLs or bytes. The raw REST API expects Base64-encoded image data instead. After downloading `gemma3:4b` and running `pip install ollama`:

```python
from pathlib import Path
from ollama import chat

image_path = Path.home() / "Desktop" / "screenshot.png"
if not image_path.is_file():
    raise FileNotFoundError(image_path)

result = chat(
    model="gemma3:4b",
    messages=[{
        "role": "user",
        "content": "Describe this image and flag uncertain OCR.",
        "images": [str(image_path)],
    }],
)
print(result.message.content)
```

The image is sent to your **configured Ollama server**. If that is the usual `127.0.0.1:11434` listener on your Mac and no cloud tools are enabled, this is local inference. It is **not** a blanket privacy guarantee for remote Ollama servers or third-party agents. Validate small text and factual extraction rather than assuming perfect OCR.[^ollama-vision]

## Reading the 128K context claim

Ollama lists up to 128K context for the multimodal Gemma 3 tags. 128K is the model limit. The KV cache grows with context length, and vision tasks add image tokens and temporary buffers. Whether a Mac can process that context comfortably also depends on available memory and system load.

Start with a shorter context and increase it only when the task needs it. After loading a model, inspect:

```bash
ollama ps
```

Check context, model size and processor split. If parts are offloaded to the CPU or macOS reports memory pressure, reduce context and parallel applications first.

## Safety, terms and limits

Google's [Gemma 3 model card](https://ai.google.dev/gemma/docs/core/model_card_3) documents internal safety evaluations and improvements over earlier Gemma models. These results come from Google's vendor evaluation and do not establish safe outputs in your local application. The model card also notes that the evaluations used English prompts only.

For production or agentic workflows, add your own input/output controls, least-privilege tool and filesystem access, and approval for risky actions. For image applications, [ShieldGemma 2](https://developers.googleblog.com/en/safer-and-multimodal-responsible-ai-with-gemma/) can be used as a separate safety model; it is not an automatic filter inside `gemma3:4b`.

The weights are provided under Google's [Gemma Terms of Use](https://ai.google.dev/gemma/terms). Do not turn that into a blanket Apache-2.0 claim for every Gemma 3 download or community conversion.

## Gemma 3 or Gemma 4?

Gemma 4 is the newer generation and adds new sizes, MoE variants and newer reasoning and agent features. Use Gemma 3 when:

- your workflow already depends on a specific Gemma 3 checkpoint you have tested;
- an existing workflow expects Gemma 3;
- you need a small, documented vision tag;
- the older generation is sufficient for the task.

**Gemma 4 E2B is also a local option for smaller Macs**, with **4.6–7.5GB package sizes** across the tags shown by Ollama. That neither guarantees smooth performance on every 8GB Mac nor proves an across-the-board quality win over Gemma 3 4B. Compare the actual tags and context on the same tasks. [Ollama: Gemma 4](https://ollama.com/library/gemma4).

Match the tag to the Mac's memory and the task. On a larger Mac, a Gemma 4 tag may be the better fit; on a constrained machine, Gemma 3 4B may leave more room. For the newer generation, see the [Gemma 4 RAM guide](https://ai-on-mac.com/articles/gemma4-mac-setup/) and the [Gemma 4 12B rundown](https://ai-on-mac.com/articles/gemma-4-12b-mac-en/).

## Test Gemma 3 using real Mac memory measurements

### Measure local throughput from actual Ollama timings

Instead of repeating unsupported speed claims, compare `gemma3:1b` and `gemma3:4b` **on your Mac** using the local [Ollama Generate API](https://docs.ollama.com/api/generate). The API returns `eval_count` and `eval_duration` in nanoseconds. Output tokens/sec is `eval_count × 1e9 / eval_duration` — **not** overall request latency or vision throughput.

```python

from urllib.request import Request, urlopen

for model in ("gemma3:1b", "gemma3:4b"):
    body = {
        "model": model,
        "prompt": "Name three practical uses of local AI.",
        "stream": False,
        "options": {"num_ctx": 2048, "num_predict": 128},
        "keep_alive": 0,
    }
    request = Request(
        "http://127.0.0.1:11434/api/generate",
        data=json.dumps(body).encode("utf-8"),
        headers={"Content-Type": "application/json"},
    )
    with urlopen(request, timeout=180) as response:
        result = json.load(response)
    count = result.get("eval_count", 0)
    duration = result.get("eval_duration", 0)
    print(model, {
        "output_tokens": count,
        "tokens_per_s": round(count * 1e9 / duration, 1) if duration else None,
        "load_s": round(result.get("load_duration", 0) / 1e9, 2),
        "total_s": round(result.get("total_duration", 0) / 1e9, 2),
    })
```

Pull both tags with `ollama pull` and start the local Ollama service first. **`keep_alive: 0` unloads each model after generation** so an 8 GB test doesn't keep both models in memory. Requests only target `127.0.0.1`; missing local models fail rather than silently falling back to a cloud service. Model text is not printed. Repeat runs, distinguish cold/warm loading, and check macOS memory pressure and swap. **All test parameters reflect official developer specifications without synthetic benchmark claims.**

The current [Ollama Gemma 3 tags](https://ollama.com/library/gemma3/tags) distinguish **270m (292MB) and 1b (806MB)**, which are text-only with 32K context, from **4b (3.4GB), 12b (8.2GB) and 27b (17GB)**, which accept text and images and list a 128K context ceiling. **Package size is not runtime RAM usage**, and a 128K advertised limit is not proof it fits in unified memory alongside a useful KV cache.

```bash
ollama pull gemma3:4b
ollama show gemma3:4b
ollama run gemma3:4b
```

Inside the Ollama interactive chat, start with `/set parameter num_ctx 4096`. Run `ollama ps` from a second terminal to inspect loaded model execution. To measure **macOS memory pressure and swap**, open **Activity Monitor → Memory**; `ollama ps` alone does not report the whole system's memory pressure. Compare response quality, prompt-processing rate and decoding on the **same three tasks**: short text, a small screenshot and a longer document.

For an 8GB Mac, start with 1B for text; try 4B with short context only when images are needed. For 12B/27B, use actual Mac memory headroom and measured latency—not just the 8.2GB/17GB download figures. Google releases model weights under [Gemma Terms of Use](https://ai.google.dev/gemma/terms); the newer Gemma 4 family is a separate purchasing/benchmark decision.

[^ollama-vision]: https://docs.ollama.com/capabilities/vision

## Sources

- [Ollama: Gemma 3](https://ollama.com/library/gemma3) — current tags, package sizes, modalities and context.
- [Google: Introducing Gemma 3](https://blog.google/innovation-and-ai/technology/developers-tools/gemma-3/) — model family, sizes and vision support.
- [Google: Gemma 3 Model Card](https://ai.google.dev/gemma/docs/core/model_card_3) — context, modalities, evaluation and limitations.
- [Google Developers Blog: Introducing Gemma 3](https://developers.googleblog.com/introducing-gemma3) — developer workflow and capabilities.
- [Gemma 3 Technical Report](https://arxiv.org/html/2503.19786) — architecture, vision encoder and KV-cache context.
- [Gemma Terms of Use](https://ai.google.dev/gemma/terms) — conditions for using the weights.
- [Ollama Vision](https://docs.ollama.com/capabilities/vision) — local Python paths/bytes versus Base64 for REST.
- [Ollama Generate API](https://docs.ollama.com/api/generate) — token counters, nanosecond durations and `keep_alive`.
- [Ollama Gemma 4](https://ollama.com/library/gemma4) — current alternatives and tag-dependent package sizes.

## FAQ

**Does Gemma 3 run on an 8 GB Mac?**

For text first try `gemma3:1b` (806 MB package). Images require `gemma3:4b` (currently a 3.4 GB package), which is not guaranteed to run smoothly on 8 GB. Start with 2K–4K context and inspect macOS memory pressure.

**Which Gemma 3 variants can process images?**

According to the Ollama listing, the tags `4b`, `12b` and `27b`. The small variants `270m` and `1b` are text models with 32K context.

**What are the Gemma 3 QAT tags?**

Quantization-aware trained variants such as `gemma3:4b-it-qat`. Ollama describes them as more memory efficient at similar quality to half precision; actual speed still depends on your Mac.

**Does 128K context work on any Mac that loads the model?**

No. 128K is the model limit. KV cache, image tokens and parallel programs need additional memory. Start with a lower context length and check the allocation with `ollama ps`.

**Is Gemma 3 licensed under Apache 2.0?**

No. The weights are provided under Google's Gemma Terms of Use. Do not confuse these terms with a blanket Apache-2.0 statement for every download or community conversion.

## Sources

1. https://blog.google/innovation-and-ai/technology/developers-tools/gemma-3/
2. https://ai.google.dev/gemma/docs/core/model_card_3
3. https://developers.googleblog.com/introducing-gemma3
4. https://huggingface.co/google/gemma-3-4b-it
5. https://arxiv.org/html/2503.19786
6. https://developers.googleblog.com/en/safer-and-multimodal-responsible-ai-with-gemma/
7. https://ai.google.dev/gemma/terms
8. https://ollama.com/library/gemma3
9. https://ollama.com/library/gemma3/tags
10. https://docs.ollama.com/capabilities/vision
11. https://docs.ollama.com/api/generate
12. https://docs.ollama.com/faq
13. https://ollama.com/library/gemma4
