Measured on a 16 GB Mac.
Speed of okAI-helper's engines (llama.cpp, MLX) on the Mac mini M4, 16 GB, the target machine. Every figure is in the measurement log with how it was taken.
Models that fit into memory: answer speed
Generation of 128 tokens after a prompt of 512, three runs. The two Ministral files are quantized differently, so the engines compare only roughly.
tokens/s, 0 to 50
Table
| Model | Engine | Prompt t/s | Generation t/s |
|---|---|---|---|
| Ministral 3 8B, Q4_K_M | llama.cpp, Metal | 211.9 | 19.7 |
| Ministral 3 8B, MLX 4 bit | mlx-lm | 220 | 21.7 |
| Qwen3-4B, MLX 4 bit | mlx-lm | 434.2 | 41.1 |
Source: docs/MEASUREMENTS.md, Spike 2026-11-05: models that fit into memory
Bigger than memory: streamed from the SSD on the CPU
The first spike: llama-bench, prompt 32, 8 tokens generated, CPU only (never Metal: a model bigger than memory on the GPU wired all memory and froze the Mac), with llama.cpp's weight repacking still on (see the next chart). A dense model gave no token within 20 minutes.
tokens/s, 0 to 2
Table
| Model | Disk | Prompt t/s | Generation t/s |
|---|---|---|---|
| Qwen3-30B-A3B Q4_K_M, MoE | external SSD | 3.02 | 1.24 |
| Qwen3-30B-A3B Q4_K_M, MoE | internal SSD (partly cached) | 3.12 | 1.5 |
| Qwen3-32B Q4_K_M, dense | external SSD | 0.32 | – |
| Qwen3-32B Q4_K_M, dense | internal SSD (partly cached) | 0.28 | – |
Source: docs/MEASUREMENTS.md, Spike 2026-11-05: models bigger than memory (mmap streaming)
Streamed from the SSD: without weight repacking
llama.cpp copies the weights into memory of its own by default; for a model bigger than memory macOS then swaps them to the internal SSD (writing about 210 MB/s) and never reads the model's drive. Without repacking the weights stay mapped and are read from their own drive.
tokens/s, 0 to 10
Table
| Setting | Tokens/s | Load s | Swap written MB/s | File read MB/s |
|---|---|---|---|---|
| repacking on (llama.cpp default) | 2.89 | 109 | 213 | 0 |
| --no-repack (okAI-helper) | 6.66 | 30 | 0 | 205 |
Source: docs/MEASUREMENTS.md, Streaming a model bigger than memory: llama.cpp's weight repacking, 2026-11-06
The gateway: time to the first token
Ministral 3 8B Q4_K_M, 128 tokens, temperature 0, five runs in each of two rounds. Throughput stays the same (19.35 / 19.3 tokens/s).
ms, 0 to 70
Table
| Path | First token ms | Tokens/s |
|---|---|---|
| direct to llama-server | 59 | 19.35 |
| through the gateway | 60.45 | 19.3 |
Source: docs/MEASUREMENTS.md, Spike 2026-11-05: gateway overhead
Speculative decoding with n-grams: all six tasks
Ministral 3 8B Q4_K_M, llama.cpp b12131, temperature 0, six different tasks once per mode. Not built in: no reliable gain, and ngram-cache gave other answers in four of six tasks.
tokens/s, 0 to 25
Table
| Task | none | ngram-mod | ngram-map-k | ngram-cache |
|---|---|---|---|---|
| Java refactor | 18 | 18 = | 17.4 = | 21.9 ≠ |
| Python, new | 19.2 | 18.4 = | 18 = | 18.3 ≠ |
| SQL change | 19.4 | 18.7 = | 18 = | 24.8 = |
| JSON extract | 19.3 | 18.6 = | 18 = | 18.5 = |
| Summary (German) | 19.4 | 19.1 = | 18 = | 21.1 ≠ |
| Free text (German) | 19.3 | 18.3 = | 18 = | 18 ≠ |
= the same answer as without, ≠ another answer.
Source: docs/MEASUREMENTS.md, Speculative decoding without a draft model (n-gram), 2026-11-05