Cloud AI coding agents and automated daily pipelines burn through weekly quotas fast when every extraction and classification call goes to a frontier API.

On a base Apple M4 Mac mini (16GB unified memory, macOS 27.2.1), we benchmarked Ternary-Bonsai-2.5-27B-Q2_0-mtp.gguf (7.37 GiB) under deterministic settings (temperature=0.0, seed=42, cache_prompt=false) to see how far a $0-marginal-cost local node can carry daily workloads before escalating hard tasks to cloud APIs.

Deterministic Benchmark Results (Before vs After)

Configuration Prefill (Medium) Decode (Medium) Physical Footprint Dirty Malloc Heap Swap Delta
Before (Default llama-server) 54.55 tok/s 10.30 tok/s 2.840 GB 2,374 MB +2,621.2 MB
After 1 (Stock Binary Tuned) 52.80 tok/s 15.53 tok/s (+50.8%) 1.437 GB (-49.4%) 213 MB (-91.0%) +115.3 MB
After 2 (M4 Custom Build) 55.02 tok/s (+0.9%) 16.21 tok/s (+57.4%) 0.897 GB (-68.4%) 236 MB (-90.1%) -122.8 MB

What Actually Worked (and What Regressed)

  • Enable Built-in Multi-Token Prediction (MTP): Adding --spec-type draft-mtp --spec-draft-n-max 4 --spec-draft-p-min 0.3 achieved a 65.0% acceptance rate and roughly 1.5x faster medium-length decoding without hurting deterministic JSON structure (q_ok=True).
  • Disable Default RAM Cache & Multi-Slot Overhead: Passing --cache-ram 0 --no-webui --no-slots -sm none --no-repack --no-host eliminated over 2 GB of Dirty Malloc heap and stopped swap growth.
  • Settings That Hurt Performance: --load-mode none ballooned physical footprint to 11.0 GB; GGML_METAL_TENSOR_ENABLE=1 dropped prefill by -17% (46.32 tok/s); --spec-type ngram-mod dropped long-context decode to 8.55 tok/s.
caffeinate -s llama-server \ -m /path/to/Ternary-Bonsai-2.5-27B-Q2_0-mtp.gguf \ --offline --alias bonsai-2.5-27b --no-mmproj --jinja \ -ngl 99 -fa on -c 12288 -np 1 -ctk q4_0 -ctv q4_0 \ --spec-type draft-mtp --spec-draft-n-max 4 --spec-draft-p-min 0.3 \ --no-repack --no-host --no-webui --no-slots --cache-ram 0 -sm none \ --host 127.0.0.1 --port 8080 

Honest 16GB Hardware Limits

On a 16GB M4 Mac mini, recommendedMaxWorkingSetSize is 12.42 GiB. Models in the 7–9 GB range (Gemma 4 12B at 7.1 GB or 27B Q2_0 at 7.37 GiB) run smoothly, while 30B–35B models (13.9–19.6 GB), Strata Q2_0 (46 GB / 64 GB recommended), Qwen3.8 Flash Next (70.1 GB+), and DeepSeek V4.1 Flash (259 GB+) exceed 16GB capacity. Offload high-volume extraction locally and route final synthesis to cloud models.

Full Benchmark & Compatibility Matrix