[PR #2649] [CLOSED] Community benchmark: Apple M3 Max (Metal), Flash-Next IQ3_S #4190

Closed
opened 2026-11-07 15:33:54 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2649
Author: @alvarorsouza-arch
Created: 10/15/2026
Status: ❌ Closed

Base: main ← Head: community-m3-max-metal


📝 Commits (4)

  • 23074a9 Community benchmark: Apple M3 Max (Metal), Flash-Next IQ3_S
  • c67a12a M3 Max report: name the quant_bound input, cite generate.cpp:5929, add the second trace cost pair
  • 440c119 M3 Max report: --batch on Metal takes the flag, builds slots and exits 86 on the first concurrent request
  • 63c1b69 M3 Max report: the resident prompt chain, which switches reach it, its tiles, its chunk, and the GEMM budget

📊 Changes

2 files changed (+383 additions, -0 deletions)

View changed files

➕ bench/results/2026-10-15-community-m3-max-metal/README.md (+378 -0)
📝 docs/COMMUNITY_BENCHMARKS.md (+5 -0)

📄 Description

Report from hardware the maintainers do not have: an Apple M3 Max (40-core GPU, 128 GB unified memory, macOS 26.6) on engine 0.1.44.1-metal built from source at 296b59d, original Flash-Next IQ3_S resident, 65,536-token context, setup defaults otherwise.

The folder adds one README.md plus the index bullet above. No engine code and no other docs change in this PR.

Headline numbers

Decode 55.0 / 58.8 / 58.8 tok/s at the defaults, where the drafter is on (--spec 2 with the MTP draft layer). With no drafter at all the same build gives 48.2 / 48.6 / 48.8 tok/s, and prompt ingestion 504 tok/s at 16,388 tokens. docs/MAC.md shows 94 to 102 tok/s for IQ3_S on an M5 Max, so this chip lands about 1.6x slower, close to the 400 against 546 GB/s bandwidth ratio.

What else the report carries

  • The repo's own Metal benches on this GPU: rt_bench bw reads 381.8 GB/s best (five runs, 381.8 to 394.9) and 365.7 GB/s for the 1 MB chunks the experts arrive in; gridbar_bench reads a 48 phase layer shaped chain at 379.4 GB/s; mm_bench reaches 12.0 to 13.3 TFLOP/s fp16 at 4096 cubed and 2.0 to 3.1 TFLOP/s at a 16 token batch.
  • The byte inventory of one token (5,159 MB: 982 MB routed experts, 4,177 MB dense) put beside the measured step, which makes pure decode 255 GB/s, or 70% of a plain streaming read of the same bytes.
  • A per class breakdown from STRATA_METAL_KPROF=1. The LM head, attention and SSM gemvs run at 363 to 430 GB/s; the hyper connection read at 242 and the expert path at 275 are the laggards.
  • A power finding: the same build and config ran at 24.1 / 24.4 / 24.3 tok/s before I moved the machine to high power and 57.4 / 57.6 / 58.1 after. That is larger than every tuning result in the report, which is why the doc asks ask reports to quote the power mode.
  • Settings measured one boot each that do not beat the defaults on decode: a larger --expert-cache, COOP_K4=1, STRATA_METAL_MATH=fast, STRATA_METAL_GEMV_NR=2, STRATA_METAL_PROMPT_EXPERTS=v3, STRATA_METAL_PROMPT_QSA=flash, STRATA_HC_Q8=0, and four drafter configurations. COOP_K4=1 also produces wrong output on this GPU, so the probe is right to keep it off.
  • Broken or absent on this backend: --kv int8 and --kv-resident abort at boot with no Metal implementation for kv_block_bytes; --expert-cache at 1024 and above fails every prompt request until --no-prefill-borrow; --no-fused-gr is inert (the fused gr entry points are missing() stubs); --dump-routing writes a trace with 0 records because the Metal engine has no host expert pool; and --batch 2, 3 and 4 are accepted at boot, build 1.73 GiB of slots each, then exit the engine with code 86 on the first request that runs two sequences together (with STRATA_METAL_STUBS=log the batch route reaches 17 entry points that have no Metal implementation), now filed on its own as #2715.
  • The resident prompt chain, measured. The matrix units carry a 16K prompt 5.9x faster than the 8 row window path (STRATA_METAL_PROMPT=window: 79.5 tok/s against 475 and 466), and the shipped tiles are already the good ones, the alternatives costing 3 to 5% on the dense GEMM and 3% and 15% on the grouped expert GEMMs. A longer STRATA_METAL_PROMPT_CHUNK costs 11% at 4,096 and 21% at 8,192 here, where docs/MAC.md measures 2 to 4% on Q2_0, and STRATA_METAL_PROFILE shows why: GPU time falls 5% while the chain's host rows work triples. The budget is 239.4 TFLOP of matmul in a 16,383 token prompt, 27.9 s of its 34.1 s on the GPU, 8.6 TFLOP/s, against the 23.7 s mm_bench prices the two GEMM classes at. The report also notes that STRATA_METAL_PROMPT_GEMM and the dense tile in Window::prompt_chunk belong to the streaming path, so on a resident pack they do nothing, and it corrects its own element count from 6.67 G to 7.31 G per token.
  • A measured U(P) for tools/quant_bound.py, 1.684 at two tokens and 4.615 at eight, which needed a small local patch to reach the routed ids on Metal. That patch is a separate PR and is not part of this folder; every other number here comes from an unmodified 0.1.44.1 binary.

Doc asks

Twelve of them, listed at the end of the report. They are documentation only: the Metal limits for --kv, --expert-cache and --no-fused-gr, a note that a Mac in a low power mode runs at roughly half, a paragraph for STRATA_METAL_KPROF, having collect_profile_traces.py reject an empty routing trace instead of accepting the file, naming --batch rather than the old --parallel in the Mac limits, which prompt variables belong to the streaming path rather than the resident one, and a paragraph for STRATA_METAL_PROFILE beside the KPROF one.

Not tested

The guide's 4,096 / 32,768 / 128,000 token sweep, vision, any context above 65,536, --spec above 2, --parallel, soaks, and concurrency. The pack and the MTP draft layer were copied from an existing 0.1.40.3 install rather than freshly built, so a clean first install on 0.1.44.1 on this hardware is unverified and no hashes are included. I can add provenance.json and REPRODUCE.md the way some other reports here do, if that is wanted.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/2649 **Author:** [@alvarorsouza-arch](https://github.com/alvarorsouza-arch) **Created:** 10/15/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `community-m3-max-metal` --- ### 📝 Commits (4) - [`23074a9`](https://github.com/Niko1221/Strata/commit/23074a9d21060bec5759722f93ade419802cd2cd) Community benchmark: Apple M3 Max (Metal), Flash-Next IQ3_S - [`c67a12a`](https://github.com/Niko1221/Strata/commit/c67a12adcd918e03bcbe854e27c70f299ff7c45f) M3 Max report: name the quant_bound input, cite generate.cpp:5929, add the second trace cost pair - [`440c119`](https://github.com/Niko1221/Strata/commit/440c119b18b774f9ea9131ef508c882ca7ef78d1) M3 Max report: --batch on Metal takes the flag, builds slots and exits 86 on the first concurrent request - [`63c1b69`](https://github.com/Niko1221/Strata/commit/63c1b69badbfef332b47f1f77cb907e8db37339d) M3 Max report: the resident prompt chain, which switches reach it, its tiles, its chunk, and the GEMM budget ### 📊 Changes **2 files changed** (+383 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `bench/results/2026-10-15-community-m3-max-metal/README.md` (+378 -0) 📝 `docs/COMMUNITY_BENCHMARKS.md` (+5 -0) </details> ### 📄 Description Report from hardware the maintainers do not have: an Apple M3 Max (40-core GPU, 128 GB unified memory, macOS 26.6) on engine 0.1.44.1-metal built from source at `296b59d`, original Flash-Next IQ3_S resident, 65,536-token context, setup defaults otherwise. The folder adds one `README.md` plus the index bullet above. No engine code and no other docs change in this PR. ## Headline numbers Decode 55.0 / 58.8 / 58.8 tok/s at the defaults, where the drafter is on (`--spec 2` with the MTP draft layer). With no drafter at all the same build gives 48.2 / 48.6 / 48.8 tok/s, and prompt ingestion 504 tok/s at 16,388 tokens. `docs/MAC.md` shows 94 to 102 tok/s for IQ3_S on an M5 Max, so this chip lands about 1.6x slower, close to the 400 against 546 GB/s bandwidth ratio. ## What else the report carries - The repo's own Metal benches on this GPU: `rt_bench bw` reads 381.8 GB/s best (five runs, 381.8 to 394.9) and 365.7 GB/s for the 1 MB chunks the experts arrive in; `gridbar_bench` reads a 48 phase layer shaped chain at 379.4 GB/s; `mm_bench` reaches 12.0 to 13.3 TFLOP/s fp16 at 4096 cubed and 2.0 to 3.1 TFLOP/s at a 16 token batch. - The byte inventory of one token (5,159 MB: 982 MB routed experts, 4,177 MB dense) put beside the measured step, which makes pure decode 255 GB/s, or 70% of a plain streaming read of the same bytes. - A per class breakdown from `STRATA_METAL_KPROF=1`. The LM head, attention and SSM gemvs run at 363 to 430 GB/s; the hyper connection read at 242 and the expert path at 275 are the laggards. - A power finding: the same build and config ran at 24.1 / 24.4 / 24.3 tok/s before I moved the machine to high power and 57.4 / 57.6 / 58.1 after. That is larger than every tuning result in the report, which is why the doc asks ask reports to quote the power mode. - Settings measured one boot each that do not beat the defaults on decode: a larger `--expert-cache`, `COOP_K4=1`, `STRATA_METAL_MATH=fast`, `STRATA_METAL_GEMV_NR=2`, `STRATA_METAL_PROMPT_EXPERTS=v3`, `STRATA_METAL_PROMPT_QSA=flash`, `STRATA_HC_Q8=0`, and four drafter configurations. `COOP_K4=1` also produces wrong output on this GPU, so the probe is right to keep it off. - Broken or absent on this backend: `--kv int8` and `--kv-resident` abort at boot with no Metal implementation for `kv_block_bytes`; `--expert-cache` at 1024 and above fails every prompt request until `--no-prefill-borrow`; `--no-fused-gr` is inert (the fused gr entry points are `missing()` stubs); `--dump-routing` writes a trace with 0 records because the Metal engine has no host expert pool; and `--batch 2`, `3` and `4` are accepted at boot, build 1.73 GiB of slots each, then exit the engine with code 86 on the first request that runs two sequences together (with `STRATA_METAL_STUBS=log` the batch route reaches 17 entry points that have no Metal implementation), now filed on its own as #2715. - The resident prompt chain, measured. The matrix units carry a 16K prompt 5.9x faster than the 8 row window path (`STRATA_METAL_PROMPT=window`: 79.5 tok/s against 475 and 466), and the shipped tiles are already the good ones, the alternatives costing 3 to 5% on the dense GEMM and 3% and 15% on the grouped expert GEMMs. A longer `STRATA_METAL_PROMPT_CHUNK` costs 11% at 4,096 and 21% at 8,192 here, where docs/MAC.md measures 2 to 4% on Q2_0, and `STRATA_METAL_PROFILE` shows why: GPU time falls 5% while the chain's host rows work triples. The budget is 239.4 TFLOP of matmul in a 16,383 token prompt, 27.9 s of its 34.1 s on the GPU, 8.6 TFLOP/s, against the 23.7 s `mm_bench` prices the two GEMM classes at. The report also notes that `STRATA_METAL_PROMPT_GEMM` and the dense tile in `Window::prompt_chunk` belong to the streaming path, so on a resident pack they do nothing, and it corrects its own element count from 6.67 G to 7.31 G per token. - A measured U(P) for `tools/quant_bound.py`, 1.684 at two tokens and 4.615 at eight, which needed a small local patch to reach the routed ids on Metal. That patch is a separate PR and is not part of this folder; every other number here comes from an unmodified 0.1.44.1 binary. ## Doc asks Twelve of them, listed at the end of the report. They are documentation only: the Metal limits for `--kv`, `--expert-cache` and `--no-fused-gr`, a note that a Mac in a low power mode runs at roughly half, a paragraph for `STRATA_METAL_KPROF`, having `collect_profile_traces.py` reject an empty routing trace instead of accepting the file, naming `--batch` rather than the old `--parallel` in the Mac limits, which prompt variables belong to the streaming path rather than the resident one, and a paragraph for `STRATA_METAL_PROFILE` beside the KPROF one. ## Not tested The guide's 4,096 / 32,768 / 128,000 token sweep, vision, any context above 65,536, `--spec` above 2, `--parallel`, soaks, and concurrency. The pack and the MTP draft layer were copied from an existing 0.1.40.3 install rather than freshly built, so a clean first install on 0.1.44.1 on this hardware is unverified and no hashes are included. I can add `provenance.json` and `REPRODUCE.md` the way some other reports here do, if that is wanted. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:33:54 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4190
No description provided.