# Mac exercise for mission 9.2: Q4 versus Q8: speed and answer

Part of the course “AI from Zero to Autonomous Agents” (https://llm.yoga/en). Page for humans: https://llm.yoga/en/mac-9-2

About 15 minutes at your computer · Type this address: **llm.yoga/en/mac-9-2**

You ask two levels of the same model the same question and measure how fast they write. The rough ceiling used here is memory bandwidth divided by file size, assuming weight reads are the bottleneck. On the MacBook Air M4 that’s 120 GB/s; other Macs have other values, which you’ll find in Apple’s technical specifications.

**Before you start**

You need **Ollama** and Python 3 in the terminal. Ollama comes as an app: download it from ollama.com/download and drag it into your Applications folder. On first launch, the app asks permission, if needed, to set up the `ollama` terminal command. It requires macOS 14 or newer. More on this in [chapter 10](https://llm.yoga/en/10-lokale-modelle-4.md). Check:

```
ollama --version
```

Python 3 may need to be installed. On the first `python3` call, macOS may offer to install developer tools; alternatively, Python is available from python.org.

### 1. Load both levels

Q4_K_M is the default (1.4 GB), plus the Q8_0 level (2.2 GB according to the tag list on Ollama).

```
ollama pull qwen3:1.7b
```

```
ollama pull qwen3:1.7b-q8_0
```

### 2. Ask Q4_K_M and measure

`--verbose` shows the timings at the end, `--think=false` turns off thinking mode. The question is in German, as in the measurement: “How many bits does BF16 have in the exponent?”

```
ollama run qwen3:1.7b --verbose --think=false "Wie viele Bit hat BF16 im Exponenten?"
```

**End of the output (Measured on an M4 Mac (24 GB) on November 24, 2026, under load)**

```
prompt eval count:    28 token(s)
prompt eval rate:     548.61 tokens/s
eval count:           156 token(s)
eval rate:            27.62 tokens/s
```

Check the answer too, and repeat the comparison on several tasks. A single difference does not establish a quantization effect. For me, the small model in Q4_K_M wrote „BF16 hat 5 Bit im Exponenten“ (BF16 has 5 bits in the exponent). The correct answer is 8 ([chapter 9](https://llm.yoga/en/09-quantisierung-1.md)). Whether Q8_0 does better here is shown in the next step.

### 3. Ask Q8_0 and measure

```
ollama run qwen3:1.7b-q8_0 --verbose --think=false "Wie viele Bit hat BF16 im Exponenten?"
```

(Checked against the documentation, not run here) No second model was downloaded for this measurement series.

### 4. Compare the measured speeds

Paste both output blocks, Q4_K_M first, then Q8_0. Use the same context settings, similar output lengths and comparable background load. The page compares them with the upper limit and with the ratio of the file sizes (1.4 to 2.2 GB, so about 0.64).

The upper limits apply to 120 GB/s. Other running apps can further reduce speed. Under load, the test Mac reached about a third of the estimated ceiling.

### 5. Clean up

```
ollama rm qwen3:1.7b-q8_0
```

With 8 GB the exercise works the same way. For programming, the comparison is more useful with a small coding task instead of the factual question.
