Skip to content

Gemma 4 26B-A4B inference in ~2 GB of RAM on any M-series MacBook

21.3 KB
Raw Blame

Contribute a benchmark result

TurboFieldfare's community benchmark uses three chat-framed generation cases: a short explanation, a medium design review, and a long document synthesis. They exercise different prompt lengths and require coherent text that reaches the end of the model turn. A repeating calibration prompt is not a valid speed result because repeated expert choices can make decode artificially fast.

Submitted measurements are listed under Community results.

The frozen prompts are in benchmark-prompts/real-generation-v1/. Runs use the app sampling defaults with fixed seeds: temperature 0.2, Top-K 64, Top-P 0.95, a 4,096-token context, and up to 1,024 generated tokens.

Prepare the Mac

Install the model with the README instructions, connect a laptop to power, turn off Low Power Mode, quit other demanding apps, and build the release CLI:

swift build -c release --product TurboFieldfareCLI

Confirm that no other model process is running:

pgrep -fl 'TurboFieldfareServer|TurboFieldfareMac|TurboFieldfareDecodeService|TurboFieldfareCLI|TurboFieldfarePackageTests|swiftpm-testing-helper|mlx_lm|mlx-lm'

Continue only when that command prints nothing.

Record the machine

mkdir -p benchmark-results/system benchmark-results/warmup benchmark-results/measured
{
  git status --short
  git rev-parse HEAD
  sw_vers
  swift --version
  system_profiler SPHardwareDataType |
    awk -F': ' '/Model Name|Model Identifier|Chip|Total Number of Cores|Memory/ { print $1 ": " $2 }'
  shasum -a 256 scratch/gemma4.gturbo/manifest.json
  shasum -a 256 docs/benchmark-prompts/real-generation-v1/*.json
} 2>&1 | tee benchmark-results/system/system.txt

Review the system file before sharing it. The filtered hardware command omits the serial number and hardware UUID.

If you calculate memory from vm_stat, use the page size printed on its first line. Do not assume 4 KB; the A18 Pro report in issue #80 used 16 KB pages.

Run the cases

Run one discarded warmup for each case:

for case_seed in \
  short-explanation:20260721 \
  medium-review:20260722 \
  long-synthesis:20260723; do
  case_id="${case_seed%%:*}"
  seed="${case_seed##*:}"
  .build/release/TurboFieldfareCLI \
    --model scratch/gemma4.gturbo \
    --messages-file "docs/benchmark-prompts/real-generation-v1/${case_id}.json" \
    --max-new 1024 \
    --max-context 4096 \
    --temperature 0.2 \
    --top-k 64 \
    --top-p 0.95 \
    --seed "$seed" \
    > "benchmark-results/warmup/${case_id}.stdout" \
    2> "benchmark-results/warmup/${case_id}.stderr"
done

Then run the three measured cases in fresh processes:

for case_seed in \
  short-explanation:20260721 \
  medium-review:20260722 \
  long-synthesis:20260723; do
  case_id="${case_seed%%:*}"
  seed="${case_seed##*:}"
  .build/release/TurboFieldfareCLI \
    --model scratch/gemma4.gturbo \
    --messages-file "docs/benchmark-prompts/real-generation-v1/${case_id}.json" \
    --max-new 1024 \
    --max-context 4096 \
    --temperature 0.2 \
    --top-k 64 \
    --top-p 0.95 \
    --seed "$seed" \
    > "benchmark-results/measured/${case_id}.stdout" \
    2> "benchmark-results/measured/${case_id}.stderr"
done

grep -h '^\[stop=' benchmark-results/measured/*.stderr |
  tee benchmark-results/summary.txt

Every measured footer must say stop=endOfTurn. Read the three output files as well: reject the result if an answer loops, repeats a block, or ends incomplete. Report the prompt and generated token counts from each footer because different output tokens create a different routing workload.

Report the result

Open an issue titled Benchmark: <chip>, <memory>, <macOS version> and include:

  • benchmark-results/system/system.txt;
  • benchmark-results/summary.txt;
  • the three measured stdout and stderr files;
  • energy mode, whether the Mac was connected to power, and any other active workload; and
  • any output-quality problem or protocol change.

Compare rows only when the case, prompt tokens, generated tokens, settings, and stop reason match. The reference M5 range uses controlled non-repeating continuations for stable token-for-token measurement, while this public protocol checks autonomous product generation.

Community results

These measurements were submitted by GitHub users. They are collected here for reference, not as a controlled hardware comparison. Prompt length, generated tokens, storage, cache state, and the number of runs all affect decode speed.

Source Mac Memory Storage Prompt / generated tokens Decode Measurement
bangddong · issue #80 A18 Pro MacBook Neo 8 GB Internal SSD 61 / 516 4.134 tok/s One submitted run
bangddong · issue #80 A18 Pro MacBook Neo 8 GB Internal SSD 430 / 780 3.672 tok/s One submitted run
bangddong · issue #80 A18 Pro MacBook Neo 8 GB Internal SSD 3,015 / 617 3.012 tok/s One submitted run
Maxim Voronin · issue #116 M1 MacBook Air 8 GB Internal 256 GB SSD 61 / 511 3.340 tok/s One submitted run
Maxim Voronin · issue #116 M1 MacBook Air 8 GB Internal 256 GB SSD 430 / 669 3.053 tok/s One submitted run
Maxim Voronin · issue #116 M1 MacBook Air 8 GB Internal 256 GB SSD 3,015 / 604 2.642 tok/s One submitted run
German · issue #76 M1 MacBook Air 16 GB Internal SSD 61 / 511 7.802 tok/s One submitted run
German · issue #76 M1 MacBook Air 16 GB Internal SSD 430 / 669 7.173 tok/s One submitted run
German · issue #76 M1 MacBook Air 16 GB Internal SSD 3,015 / 604 6.093 tok/s One submitted run
gandalfk7 · issue #94 M1 Mac mini 16 GB Internal 512 GB SSD 61 / 511 6.754 tok/s One submitted run
gandalfk7 · issue #94 M1 Mac mini 16 GB Internal 512 GB SSD 430 / 669 6.265 tok/s One submitted run
gandalfk7 · issue #94 M1 Mac mini 16 GB Internal 512 GB SSD 3,015 / 604 5.570 tok/s One submitted run
Felix Li · issue #37 M1 Pro MacBook Pro 16 GB Internal SSD 61 / 511 9.477 tok/s One submitted run
Felix Li · issue #37 M1 Pro MacBook Pro 16 GB Internal SSD 430 / 669 8.576 tok/s One submitted run
Felix Li · issue #37 M1 Pro MacBook Pro 16 GB Internal SSD 3,015 / 604 7.805 tok/s One submitted run
Vaibhav Malik · issue #64 M1 Max MacBook Pro 64 GB Internal SSD 61 / 511 22.888 tok/s One submitted run
Vaibhav Malik · issue #64 M1 Max MacBook Pro 64 GB Internal SSD 430 / 669 22.043 tok/s One submitted run
Vaibhav Malik · issue #64 M1 Max MacBook Pro 64 GB Internal SSD 3,015 / 604 20.493 tok/s One submitted run
stefinuxha · issue #131 M2 Mac mini 16 GB Not reported 61 / 511 9.674 tok/s One submitted run
stefinuxha · issue #131 M2 Mac mini 16 GB Not reported 430 / 669 8.889 tok/s One submitted run
stefinuxha · issue #131 M2 Mac mini 16 GB Not reported 3,015 / 604 6.578 tok/s One submitted run
Matt 'Smartis' W · issue #69 M2 Pro Mac mini 16 GB Internal SSD 61 / 511 15.713 tok/s One submitted run
Matt 'Smartis' W · issue #69 M2 Pro Mac mini 16 GB Internal SSD 430 / 669 17.826 tok/s One submitted run
Matt 'Smartis' W · issue #69 M2 Pro Mac mini 16 GB Internal SSD 3,015 / 604 15.755 tok/s One submitted run
Eli Smith · issue #139 M2 Pro MacBook Pro 16 GB Internal SSD 61 / 511 11.749 tok/s One submitted run
Eli Smith · issue #139 M2 Pro MacBook Pro 16 GB Internal SSD 430 / 669 10.428 tok/s One submitted run
Eli Smith · issue #139 M2 Pro MacBook Pro 16 GB Internal SSD 3,015 / 604 9.384 tok/s One submitted run
elroyonline · issue #59 M2 Max Mac Studio 32 GB External PCIe NVMe 61 / 511 25.310 tok/s One submitted run
elroyonline · issue #59 M2 Max Mac Studio 32 GB External PCIe NVMe 430 / 669 25.172 tok/s One submitted run
elroyonline · issue #59 M2 Max Mac Studio 32 GB External PCIe NVMe 3,015 / 604 23.730 tok/s One submitted run
Benjamin Schilling · issue #27 M3 Pro MacBook Pro 18 GB Internal SSD 61 / 516 19.09 tok/s One submitted run
Benjamin Schilling · issue #27 M3 Pro MacBook Pro 18 GB Internal SSD 430 / 780 16.50 tok/s One submitted run
Benjamin Schilling · issue #27 M3 Pro MacBook Pro 18 GB Internal SSD 3,015 / 617 13.88 tok/s One submitted run
castillovas-arch · issue #172 M4 Mac mini 16 GB Internal SSD 61 / 489 11.649 tok/s One measured run after one discarded warmup
castillovas-arch · issue #172 M4 Mac mini 16 GB Internal SSD 430 / 760 10.119 tok/s One measured run after one discarded warmup
castillovas-arch · issue #172 M4 Mac mini 16 GB Internal SSD 3,015 / 594 8.058 tok/s One measured run after one discarded warmup
gandalfk7 · issue #95 M4 Mac mini 16 GB Internal 256 GB SSD 61 / 516 10.847 tok/s One submitted run
gandalfk7 · issue #95 M4 Mac mini 16 GB Internal 256 GB SSD 430 / 780 9.878 tok/s One submitted run
gandalfk7 · issue #95 M4 Mac mini 16 GB Internal 256 GB SSD 3,015 / 617 8.658 tok/s One submitted run
22f · issue #23 M4 Mac mini 16 GB Internal 256 GB SSD 61 / 516 11.38 tok/s Median of five runs
22f · issue #23 M4 Mac mini 16 GB Internal 256 GB SSD 430 / 780 8.43 tok/s Median of five runs
22f · issue #23 M4 Mac mini 16 GB Internal 256 GB SSD 3,015 / 617 8.58 tok/s Median of five runs
22f · issue #23 M4 Mac mini 16 GB External Samsung 990 Pro 61 / 516 11.53 tok/s Median of five runs
22f · issue #23 M4 Mac mini 16 GB External Samsung 990 Pro 430 / 780 10.79 tok/s Median of five runs
22f · issue #23 M4 Mac mini 16 GB External Samsung 990 Pro 3,015 / 617 11.21 tok/s Median of five runs
dragonwang1019 · issue #101 M4 Pro Mac mini 24 GB External NVMe SSD 61 / 516 22.256 tok/s One submitted run
dragonwang1019 · issue #101 M4 Pro Mac mini 24 GB External NVMe SSD 430 / 780 28.964 tok/s One submitted run
dragonwang1019 · issue #101 M4 Pro Mac mini 24 GB External NVMe SSD 3,015 / 617 24.209 tok/s One submitted run
r1tz · issue #175 M4 Pro Mac mini 24 GB Not reported 61 / 489 33.343 tok/s One submitted run
r1tz · issue #175 M4 Pro Mac mini 24 GB Not reported 430 / 760 31.236 tok/s One submitted run
r1tz · issue #175 M4 Pro Mac mini 24 GB Not reported 3,015 / 594 25.186 tok/s One submitted run
Marcelo Barros · issue #67 M4 Pro MacBook Pro 24 GB Internal SSD 61 / 516 34.060 tok/s Automatic mode
Marcelo Barros · issue #67 M4 Pro MacBook Pro 24 GB Internal SSD 430 / 780 30.954 tok/s Automatic mode
Marcelo Barros · issue #67 M4 Pro MacBook Pro 24 GB Internal SSD 3,015 / 617 25.292 tok/s Automatic mode
Marcelo Barros · issue #67 M4 Pro MacBook Pro 24 GB Internal SSD 61 / 516 33.379 tok/s High Power mode
Marcelo Barros · issue #67 M4 Pro MacBook Pro 24 GB Internal SSD 430 / 780 30.614 tok/s High Power mode
Marcelo Barros · issue #67 M4 Pro MacBook Pro 24 GB Internal SSD 3,015 / 617 25.230 tok/s High Power mode
nxexcelsior · issue #111 M5 MacBook Air 24 GB Internal SSD 61 / 497 11.982 tok/s One submitted run
nxexcelsior · issue #111 M5 MacBook Air 24 GB Internal SSD 430 / 721 12.429 tok/s One submitted run
nxexcelsior · issue #111 M5 MacBook Air 24 GB Internal SSD 3,015 / 610 9.783 tok/s One submitted run
chongdlh-pixel · issue #170 M5 Pro MacBook Pro 24 GB Not reported 61 / 497 36.2 tok/s Median of 3 runs, default 16 expert-cache slots
chongdlh-pixel · issue #170 M5 Pro MacBook Pro 24 GB Not reported 430 / 721 34.0 tok/s Median of 3 runs, default 16 expert-cache slots
chongdlh-pixel · issue #170 M5 Pro MacBook Pro 24 GB Not reported 3,015 / 610 29.5 tok/s Median of 3 runs, default 16 expert-cache slots
chongdlh-pixel · issue #170 M5 Pro MacBook Pro 24 GB Not reported 61 / 497 38.9 tok/s Median of 3 runs, 24 expert-cache slots
chongdlh-pixel · issue #170 M5 Pro MacBook Pro 24 GB Not reported 430 / 721 36.5 tok/s Median of 3 runs, 24 expert-cache slots
chongdlh-pixel · issue #170 M5 Pro MacBook Pro 24 GB Not reported 3,015 / 610 31.5 tok/s Median of 3 runs, 24 expert-cache slots
chongdlh-pixel · issue #170 M5 Pro MacBook Pro 24 GB Not reported 61 / 497 40.8 tok/s Median of 3 runs, 32 expert-cache slots
chongdlh-pixel · issue #170 M5 Pro MacBook Pro 24 GB Not reported 430 / 721 38.5 tok/s Median of 3 runs, 32 expert-cache slots
chongdlh-pixel · issue #170 M5 Pro MacBook Pro 24 GB Not reported 3,015 / 610 33.3 tok/s Median of 3 runs, 32 expert-cache slots
Matt Skipton · issue #97 M5 Pro MacBook Pro 64 GB Not reported 61 / 497 37.426 tok/s One submitted run
Matt Skipton · issue #97 M5 Pro MacBook Pro 64 GB Not reported 430 / 721 34.194 tok/s One submitted run
Matt Skipton · issue #97 M5 Pro MacBook Pro 64 GB Not reported 3,015 / 610 31.485 tok/s One submitted run
Ulises · issue #149 M5 Max MacBook Pro 36 GB Internal SSD 61 / 497 43.440 tok/s One submitted run
Ulises · issue #149 M5 Max MacBook Pro 36 GB Internal SSD 430 / 721 40.965 tok/s One submitted run
Ulises · issue #149 M5 Max MacBook Pro 36 GB Internal SSD 3,015 / 610 37.370 tok/s One submitted run

These submissions use the public community prompts and generate until the end of the model turn. Compare rows only when the prompt and generated-token counts match.

Issue #172 reports macOS 26.6.2 (25G83), Swift 6.3.3, and commit 6c044011c24dd55595af823cfef10f26b525cfca. Each measured case ran in a fresh process with the sampling settings above; all three ended with stop=endOfTurn. The reporter reviewed the outputs and reported no loops, repeated blocks or protocol deviations.

Issue #175 reports a 12-core M4 Pro Mac mini (Mac16,11), macOS 26.6.2 (25G83), Swift 6.4, and commit 4c6db1e698ea861609109d4bc517410ff302af46. The attached prompt hashes match the frozen community prompts. All three measured runs ended with stop=endOfTurn; the attached outputs finish without obvious loops or repeated blocks. Storage, energy mode and other active workloads were not reported. These are individual submitted runs, not repeated-run averages.