Skip to content

docs: Apple M5 Max basal-bench tables (basal-1.0 and basal-2.0) in HARDWARE.md - #18

Merged
rkinas merged 2 commits into
rkinas:mainfrom
agentGreg:docs/hardware-m5-max
Oct 20, 2026
Merged

rkinas merged 2 commits into
rkinas:mainfrom
agentGreg:docs/hardware-m5-max

Conversation

@agentGreg

@agentGreg agentGreg commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Title: docs: Apple M5 Max basal-bench tables (basal-1.0 and basal-2.0) in HARDWARE.md

Problem

HARDWARE.md has Apple Silicon numbers for the M4 Pro and M4 Max only, and the basal-2.0 docs only for the M4 Pro. #7 added an M5 Pro (20-core GPU) measurement of basal-1.0, which raised the question how latency scales with GPU cores on M5.

Change

Docs only. A new subsection "Apple M5 Max (basal-1.0 and basal-2.0)" under the M4 Max engine comparison:

  • basal-1.0-4.5B and basal-1.0-1.5B at commit 3fa2eea (the commit of the M5 Pro numbers in Benchmark na Apple M5 Pro: bf16 (mlx/mps) 2–2,5× szybciej niż M4 Max #7), modes eager-fp32, mps, mlx, mlx-q8, so M5 Max and M5 Pro compare one to one;
  • basal-2.0-mini and basal-2.0 (4.5B) at v2.2.0, mps in bf16 and mlx with the -MLX-8bit ports;
  • two bullets on scaling: twice the GPU cores within M5 (M5 Max 40 vs M5 Pro 20) gives 1.35–1.63× in bf16/8-bit and 1.71–1.88× in fp32; the same core count across generations (M5 Max vs M4 Max) gives 2.8–4.1× in bf16 and 1.5–1.7× in fp32.

I left the two sentences that #7 asks to correct ("bf16, fp16 and fp32 differ little", "latency should scale roughly with GPU core count and clock") untouched, so this does not overlap with the M5 Pro PR from #7. The new numbers support both corrections.

One observation that may deserve its own issue: with two option orders, mlx at v2.2.0 is slower than at 3fa2eea on the same machine (basal-1.0-4.5B: 115.6 vs 65.7 ms; with one order 68.0 vs 62.3 ms; three runs at v2.2.0: 115.6 / 116.4 / 116.1 ms). I did not look for the cause.

Verification

  • Apple M5 Max (Mac17,6, 40-core GPU, 128 GB), macOS 27.0.1, Python 3.12.2, torch 2.14.1 (MPS), MLX 0.32.4, mlx-lm 0.32.2; on mains power, automatic power mode, modes back to back, no thermal warnings.
  • basal-bench on the 44 bundled examples, agreement against eager-fp32 on the same machine, as in the M4 Max table and Benchmark na Apple M5 Pro: bf16 (mlx/mps) 2–2,5× szybciej niż M4 Max #7. Repeats of --modes mps mlx for the two 4.5B models are in the doc.
  • For basal-2.0 mlx from the -MLX-8bit repos: basal-bench takes one --model, so I ran basal.bench.main() unchanged and only pointed the mlx mode at the -MLX-8bit folder, keeping bf16 eager-fp32 as the reference.
  • Every number in the doc comes from the raw --out files below. No code changes, so the test suite is unaffected.

Refs #7

Raw basal-bench --out

m5max-3fa2eea-1.0-4.5B.json

{"mode": "eager-fp32", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 2.4, "lat1_ms": 185.897, "lat2_ms": 312.788, "lat2_p95_ms": 386.063, "dec_s": 2.81, "mem_gb": 22.966, "acc": 0.795}
{"mode": "mps", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 1.7, "lat1_ms": 68.134, "lat2_ms": 81.105, "lat2_p95_ms": 92.805, "dec_s": 13.84, "mem_gb": 10.149, "acc": 0.795, "agree": 1.0}
{"mode": "mlx", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 0.4, "lat1_ms": 62.314, "lat2_ms": 65.73, "lat2_p95_ms": 87.917, "dec_s": 15.557, "mem_gb": 10.056, "acc": 0.795, "agree": 1.0}
{"mode": "mlx-q8", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 0.3, "lat1_ms": 77.882, "lat2_ms": 85.419, "lat2_p95_ms": 98.696, "dec_s": 13.52, "mem_gb": 5.983, "acc": 0.773, "agree": 0.977}

m5max-3fa2eea-1.0-1.5B.json

{"mode": "eager-fp32", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 1.3, "lat1_ms": 72.179, "lat2_ms": 119.765, "lat2_p95_ms": 144.366, "dec_s": 7.479, "mem_gb": 10.157, "acc": 0.727}
{"mode": "mps", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 0.6, "lat1_ms": 31.514, "lat2_ms": 34.829, "lat2_p95_ms": 39.382, "dec_s": 37.252, "mem_gb": 4.102, "acc": 0.75, "agree": 0.977}
{"mode": "mlx", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 0.2, "lat1_ms": 25.663, "lat2_ms": 26.013, "lat2_p95_ms": 32.051, "dec_s": 43.22, "mem_gb": 4.016, "acc": 0.75, "agree": 0.977}
{"mode": "mlx-q8", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 0.2, "lat1_ms": 30.611, "lat2_ms": 32.729, "lat2_p95_ms": 37.35, "dec_s": 38.231, "mem_gb": 2.622, "acc": 0.727, "agree": 1.0}

m5max-2.0-mini.json

{"mode": "eager-fp32", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 1.2, "lat1_ms": 66.412, "lat2_ms": 104.314, "lat2_p95_ms": 129.419, "dec_s": 9.11, "mem_gb": 9.133, "acc": 0.75}
{"mode": "mps", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 0.6, "lat1_ms": 28.44, "lat2_ms": 29.971, "lat2_p95_ms": 34.499, "dec_s": 45.947, "mem_gb": 4.096, "acc": 0.75, "agree": 1.0}
{"mode": "mlx", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 0.2, "lat1_ms": 30.919, "lat2_ms": 48.979, "lat2_p95_ms": 57.653, "dec_s": 21.046, "mem_gb": 2.054, "acc": 0.727, "agree": 0.977}
{"mode": "mlx-q8", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 0.1, "lat1_ms": 30.747, "lat2_ms": 49.409, "lat2_p95_ms": 58.809, "dec_s": 21.148, "mem_gb": 2.054, "acc": 0.727, "agree": 0.977}

m5max-2.0-4.5B.json

{"mode": "eager-fp32", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 4.0, "lat1_ms": 181.984, "lat2_ms": 304.87, "lat2_p95_ms": 385.449, "dec_s": 2.977, "mem_gb": 21.116, "acc": 0.795}
{"mode": "mps", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 2.1, "lat1_ms": 68.022, "lat2_ms": 72.461, "lat2_p95_ms": 83.995, "dec_s": 15.36, "mem_gb": 10.143, "acc": 0.795, "agree": 1.0}
{"mode": "mlx", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 0.5, "lat1_ms": 74.585, "lat2_ms": 130.007, "lat2_p95_ms": 153.052, "dec_s": 7.607, "mem_gb": 5.218, "acc": 0.795, "agree": 0.955}
{"mode": "mlx-q8", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 0.3, "lat1_ms": 74.02, "lat2_ms": 134.025, "lat2_p95_ms": 156.895, "dec_s": 7.614, "mem_gb": 5.217, "acc": 0.773, "agree": 0.977}

m5max-1.0-4.5B.json

{"mode": "eager-fp32", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 6.9, "lat1_ms": 192.264, "lat2_ms": 328.487, "lat2_p95_ms": 404.521, "dec_s": 2.642, "mem_gb": 22.966, "acc": 0.795}
{"mode": "mps", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 1.9, "lat1_ms": 72.991, "lat2_ms": 84.779, "lat2_p95_ms": 97.516, "dec_s": 12.386, "mem_gb": 10.143, "acc": 0.795, "agree": 1.0}
{"mode": "mlx", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 0.5, "lat1_ms": 68.019, "lat2_ms": 115.632, "lat2_p95_ms": 137.454, "dec_s": 8.777, "mem_gb": 9.033, "acc": 0.795, "agree": 1.0}
{"mode": "mlx-q8", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 0.3, "lat1_ms": 83.079, "lat2_ms": 158.402, "lat2_p95_ms": 174.357, "dec_s": 6.243, "mem_gb": 5.203, "acc": 0.795, "agree": 1.0}

m5max-1.0-1.5B.json

{"mode": "eager-fp32", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 1.3, "lat1_ms": 77.13, "lat2_ms": 131.671, "lat2_p95_ms": 159.644, "dec_s": 7.078, "mem_gb": 10.157, "acc": 0.727}
{"mode": "mps", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 0.6, "lat1_ms": 32.122, "lat2_ms": 34.805, "lat2_p95_ms": 40.558, "dec_s": 34.786, "mem_gb": 4.128, "acc": 0.75, "agree": 0.977}
{"mode": "mlx", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 0.2, "lat1_ms": 24.604, "lat2_ms": 43.629, "lat2_p95_ms": 51.228, "dec_s": 23.624, "mem_gb": 3.168, "acc": 0.75, "agree": 0.977}
{"mode": "mlx-q8", "reference_mode": "eager-fp32", "gpu": "Apple M5 Max", "n": 44, "load_s": 0.1, "lat1_ms": 30.297, "lat2_ms": 56.883, "lat2_p95_ms": 67.556, "dec_s": 16.628, "mem_gb": 2.06, "acc": 0.727, "agree": 1.0}

Summary by Sourcery

Document Apple M5 Max benchmark results and performance scaling comparisons for basal-1.0 and basal-2.0.

Enhancements:

  • Add Apple M5 Max basal-1.0 and basal-2.0 benchmark tables to HARDWARE.md, including MPS, MLX, quantized MLX, latency, throughput, memory, agreement, and accuracy results.
  • Document benchmark-based performance comparisons for M5 GPU-core scaling and M5-versus-M4 generation scaling, along with the observed basal-2.0 MLX performance difference.

Documentation:

  • Update the Apple Silicon hardware documentation with reproducible M5 Max benchmark context and results for basal-1.0 and basal-2.0.

…HARDWARE.md

basal-1.0 measured at 3fa2eea (the commit of the M5 Pro numbers in rkinas#7),
basal-2.0 at v2.2.0 with mps (bf16) and mlx (-MLX-8bit). Adds core-count
scaling within the M5 generation (M5 Max vs M5 Pro) and across generations
(M5 Max vs M4 Max), and notes that mlx with two option orders is slower at
v2.2.0 than at 3fa2eea on this machine.

Refs rkinas#7
@sourcery-ai

sourcery-ai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Documentation-only update adding reproducible Apple M5 Max basal-bench tables and derived scaling comparisons, with no code or test-suite changes.

File-Level Changes

Change Details Files
Adds a documented Apple M5 Max benchmark subsection covering basal-1.0 and basal-2.0.
  • Adds hardware, software, measurement, and comparison methodology context.
  • Adds basal-1.0 tables for 4.5B and 1.5B models across eager-fp32, MPS, MLX, and MLX-Q8 at commit 3fa2eea.
  • Adds basal-2.0 mini and 4.5B tables comparing MPS bf16 with MLX 8-bit ports at v2.2.0.
  • Records repeat-run observations and the observed MLX v2.2.0 performance regression relative to 3fa2eea.
  • Summarizes latency scaling for additional GPU cores, newer generations, and bf16 versus fp32.
docs/HARDWARE.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 4 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="docs/HARDWARE.md" line_range="306" />
<code_context>
+Two more runs of `--modes mps mlx` for the 4.5B: `mlx` 71.6 / 73.3 ms, `mps` 86.7 / 88.3 ms (2 orders).
+
+**basal-2.0**, at v2.2.0 (`e49665c`); `mps` in bf16, `mlx` with the `-MLX-8bit` ports (`basal-bench` takes one
+`--model`, so the `mlx` mode was run from the `-MLX-8bit` folder with the bf16 `eager-fp32` run as reference):
+
+| model | mode | 2 orders (ms) | 1 order (ms) | dec/s | agreement | accuracy | GB |
</code_context>
<issue_to_address>
**MLX agreement is not reproducible**

When the BF16 reference and MLX port are in separate model directories, `basal.bench.main()` resolves one `--model` path and passes it to every mode, so it cannot produce these agreement values using the BF16 reference directory for `eager-fp32` and the separate `-MLX-8bit` directory for `mlx`. Readers cannot reproduce the reported agreement with the described setup.

Clarify how agreement was computed across the separate runs, or document a runner that supports using different model directories per mode.
</issue_to_address>

### Comment 2
<location path="docs/HARDWARE.md" line_range="323-324" />
<code_context>
+
+- **Same generation, twice the GPU cores** (M5 Max 40 vs M5 Pro 20, basal-1.0 at `3fa2eea`, 2 orders): bf16 and 8-bit
+  modes are 1.35–1.63× faster, `eager-fp32` 1.71–1.88×; the 1.5B gains less than the 4.5B.
+- **Same core count, newer generation** (M5 Max vs M4 Max, both 40 cores): bf16 modes are 2.8–4.1× faster,
+  `eager-fp32` 1.5–1.7×. On the M5 Max bf16 is 3.4–4.8× faster than fp32.
+
 #### Inference engines on Apple Silicon
</code_context>
<issue_to_address>
**Generation comparison mixes backend implementations**

When the cross-generation speedup is interpreted as a comparison of M4 and M5 GPU generations, the M4 Max MLX rows use the MLX backend from contribution #4 (`docs/HARDWARE.md:252`), while the new M5 Max figures were measured with `basal-bench` at `3fa2eea` (`docs/HARDWARE.md:290`). Because the backends differ, the claimed cross-generation bf16 speedup includes implementation changes and does not isolate the effect of the newer GPU generation.

Rerun the M4 Max measurements with the same MLX backend as the M5 Max, or limit the comparison to modes measured with a consistent implementation.
</issue_to_address>

### Comment 3
<location path="docs/HARDWARE.md" line_range="324-325" />
<code_context>
+- **Same generation, twice the GPU cores** (M5 Max 40 vs M5 Pro 20, basal-1.0 at `3fa2eea`, 2 orders): bf16 and 8-bit
+  modes are 1.35–1.63× faster, `eager-fp32` 1.71–1.88×; the 1.5B gains less than the 4.5B.
+- **Same core count, newer generation** (M5 Max vs M4 Max, both 40 cores): bf16 modes are 2.8–4.1× faster,
+  `eager-fp32` 1.5–1.7×. On the M5 Max bf16 is 3.4–4.8× faster than fp32.
+
 #### Inference engines on Apple Silicon

</code_context>
<issue_to_address>
**Scaling range overstates peak speedup**

The listed M4 Max and M5 Max MLX bf16 latencies give 265.9 / 65.7 = 4.0× for the 4.5B model and 87.3 / 26.0 = 3.4× for the 1.5B model, so the stated 4.1× upper bound is not supported by the table.

Recalculate the stated range from the displayed measurements, or include the measurement that supports the 4.1× upper bound.
</issue_to_address>

### Comment 4
<location path="docs/HARDWARE.md" line_range="282" />
<code_context>
   was measured back to back, the comparison below after a cool-down before every engine.
 - **Early exit** (`fast-exit`) and the `fp8` / `nvfp4` modes are CUDA-only.

+### Apple M5 Max (basal-1.0 and basal-2.0)
+
+Measured by Greg Brzezinka with `basal-bench` on the **44 bundled examples**, like the M4 Max table above and the
</code_context>
<issue_to_address>
**Measurement coverage contradicts itself**

When the new M5 Max section appears alongside the existing M4 Max note, the new M5 Max tables report M-series measurements, while the existing M4 Max note says other M-series chips were not measured; readers see contradictory coverage claims.

Update the M4 Max note to say that other M-series chips had not been measured at the time, or remove the outdated claim.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread docs/HARDWARE.md Resolved
Comment thread docs/HARDWARE.md Resolved
Comment thread docs/HARDWARE.md Resolved
Comment thread docs/HARDWARE.md Resolved
rkinas#4), how -MLX-8bit agreement was measured, 4.0x upper bound, M4 Max note

Addresses the review comments on rkinas#18.
@rkinas
rkinas merged commit 8242ed8 into rkinas:main Oct 20, 2026
1 check passed
@rkinas

rkinas commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Thanks! Merged for basal 2.3.1. The M5 Max tables are in HARDWARE.md, and the scaling numbers support the two sentence fixes from #7. We are also looking at the mlx slowdown with two option orders that you noticed. You are credited in the 2.3.1 release notes.

rkinas added a commit that referenced this pull request Oct 20, 2026
rkinas added a commit that referenced this pull request Oct 21, 2026
…) into 2.3.1

# Conflicts:
#	docs/WHATS_NEW.md
rkinas added a commit that referenced this pull request Oct 21, 2026
…, and its cause (#18)

basal-1.0-1.5B 126 vs 149 ms, -4.5B 388 vs 506 ms (3fa2eea against v2.2.0 / 2.3.1). Since the merge of #4
into basal 1.5 (4c11a87) the mlx backend runs the shared prefix and the option blocks as two forwards instead
of one packed forward. A packed forward for Llama models changed probabilities (max 0.045 on 8-bit weights) and
was slower beyond ~900-token prompts, so 2.3.1 keeps the backend.
rkinas added a commit that referenced this pull request Oct 21, 2026
… warns when no family was tested (#19), M5 Pro table and the two-order mlx finding in HARDWARE.md (#7, #18) (branch gh-231)
rkinas added a commit that referenced this pull request Nov 2, 2026
The short README drops its sections for 2.4.1 back to 2.0 and its previous-releases text. What they had and
WHATS_NEW.md did not moves here: the 2.4.1 H100 start-up numbers, the 2.3.x community credits for #18, #21, #24
and #25, the precise 2.3 eager baselines, the 2.2 calibration summary and example, the release-note links for
2.1 to 2.3, and basal-1.5 / basal-1.0 under 'Previous releases'.
@agentGreg
agentGreg deleted the docs/hardware-m5-max branch November 16, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants