Skip to content

docs: M1 Ultra fmt=2 Metal perf report + benchmarks row + fmt4→fmt2 converter - #836

Merged
JustVugg merged 3 commits into
JustVugg:devfrom
boblaublaw:fmt_2_m1u
Aug 8, 2026
Merged

docs: M1 Ultra fmt=2 Metal perf report + benchmarks row + fmt4→fmt2 converter#836
JustVugg merged 3 commits into
JustVugg:devfrom
boblaublaw:fmt_2_m1u

Conversation

@boblaublaw

Copy link
Copy Markdown

Summary

M1 Ultra counterpart to the M5 Max Metal report (#116, data from #103): same methodology, same prompt, same frozen expert history, on fmt=2 (per-row int4) weights — the format the Metal backend fully supports while fmt=4 dispatch is open (#585/#587).

Headline: best 1.50 tok/s (--ram 125, tuned) vs the M5 Max's 2.24 — −33% with near-equal GPU core counts (48 vs 40). Disk wait is 55–60% of the fully serial decode wall, and the drive runs at ~93% of its 6.89 GB/s iobench (F_NOCACHE) ceiling in-decode: on this workload the SSD, not the GPU, sets the speed.

Secondary findings: the M5 Max OMP active-spin trap does not reproduce on M1 Ultra; PIPE is the only tuning lever (+6.9%), PIPE_WORKERS=8 the sweet spot; MTP is a strict loss at 128 GB (memory knee → swap thrash); v1.4.0's fast-SSD cap=1 default costs −33% here (--cap 33 restores it); v1.2.0→v1.4.0 rebase is performance-neutral.

Files (4)

  • docs/METAL-M1ULTRA-FMT2-REPORT.md — full report (setup, results, analysis, rebase check, recommendations, caveats)
  • docs/benchmarks.md — one community-benchmarks row + one Takeaways sentence
  • c/tools/convert_fmt4_to_fmt2.py — the fmt=4 (g64) → fmt=2 (per-row) re-quant converter used to build the benchmark container (--selftest passes). The only in-tree path to an fmt=2 container while Metal fmt=4 is open — happy to drop it from the PR if you'd rather not carry a GLM-5.2-specific tool.
  • c/tools/README.md — one-line entry for the converter

Notes for review

  • Engine: dev @ c024a46 (v1.4.0); single run per config (±0.05 tok/s noise) — repeats for confidence intervals are listed as the follow-up.
  • fmt=2 quality caveat (~9pp vs grouped scales) is stated in the report and the row — it's a Metal-compatibility vehicle, not a quality recommendation.
  • The raw benchmark workspace (logs, harness, usage snapshot) is intentionally not part of this PR; squash-merge welcome (branch history contains a large local snapshot commit).

…ans, scripts

Goal a: reproduce the issue JustVugg#103 M5 Max result (2.06-2.24 tok/s) on M1 Ultra
using fmt=2 (per-row int4) weights, which the Metal backend fully supports.

- docs/issue_103.md: the reproduction target (full original issue text)
- docs/metal_fmt2.md: fmt=4 -> fmt=2 conversion + benchmark plan (Configs A-E)
- docs/ultra_benchmark_plan.md: overall M1 Ultra plan (both tracks)
- docs/metal_dispatch_gap.md: why the fmt=2 track exists (fmt=4 Metal gap)
- docs/metal_issues.txt: master index of Metal issues/PRs
- Issue summaries: benchmark datapoints (JustVugg#47 JustVugg#87 JustVugg#107 JustVugg#180), tuning A/Bs
  (JustVugg#387), cache-slowdown diagnosis (JustVugg#379), OMP spin-wait (JustVugg#707), prefill
  GEMM token-exactness caveat (JustVugg#622)
- PR summaries: Metal backend (JustVugg#72), M5 Max report + methodology (JustVugg#116),
  platform-aware cache defaults (JustVugg#386), tuned Apple defaults (JustVugg#750),
  shared-experts GPU technique (JustVugg#757), GPU prefill attention option (JustVugg#763)
- c/convert_fmt4_to_fmt2.sh: the fmt=4 -> fmt=2 converter invocation
- c/x.sh, c/venv.sh: benchmark runner + python env helper
… converter

Safety checkpoint before restructuring. Contains the full ephemeral
workspace: v1.4.0 run logs + SUMMARY, pre-rebase v1.2.0 logs (fmt2.old),
benchmark harness, usage snapshot, context docs, and the staged
fmt4->fmt2 converter. None of the docs/fmt2* content is intended for
the upstream PR; it will be untracked and excluded in a later commit.
…rter

PR content (the whole intended upstream diff):

- docs/METAL-M1ULTRA-FMT2-REPORT.md: fmt=2 on M1 Ultra, best 1.50 tok/s
  @ --ram 125 vs M5 Max 2.24 (-33%) with near-equal GPU cores (48 vs 40).
  Disk wait is 55-60% of the serial decode wall and the drive runs at
  ~93% of its 6.89 GB/s iobench F_NOCACHE ceiling in-decode: the SSD,
  not the GPU, sets the speed. OMP spin trap absent; PIPE is the only
  lever (+6.9%); PIPE_WORKERS=8 sweet spot; MTP strict loss at 128 GB.
- docs/benchmarks.md: community row (same shape as the M5 Max JustVugg#103 row)
  + one Takeaways sentence (M1 Ultra <-> M5 Max as the GPU-core-count
  control).
- c/tools/convert_fmt4_to_fmt2.py: the fmt=4 (g64) -> fmt=2 (per-row)
  re-quant converter used to build the benchmark container (--selftest
  passes); the only in-tree path to an fmt=2 container while Metal fmt=4
  dispatch is open (JustVugg#585/JustVugg#587). One-line c/tools/README.md entry.

The ephemeral benchmark workspace (logs, SUMMARY, harness, usage
snapshot, plan/context docs) stays on disk under docs/fmt2/ but is
untracked and locally excluded (.git/info/exclude) — not part of the PR.
@JustVugg JustVugg added benchmark Datapoint di misurazione hardware docs Documentazione metal Backend Metal/Apple labels Aug 7, 2026
@JustVugg
JustVugg merged commit a126067 into JustVugg:dev Aug 8, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

benchmark Datapoint di misurazione hardware docs Documentazione metal Backend Metal/Apple

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants