Repository navigation
docs: Apple M5 Max basal-bench tables (basal-1.0 and basal-2.0) in HARDWARE.md - #18
Merged
Merged
Conversation
…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
Reviewer's GuideDocumentation-only update adding reproducible Apple M5 Max basal-bench tables and derived scaling comparisons, with no code or test-suite changes. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
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>
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 |
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
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'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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), modeseager-fp32,mps,mlx,mlx-q8, so M5 Max and M5 Pro compare one to one;mpsin bf16 andmlxwith the-MLX-8bitports;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,
mlxat v2.2.0 is slower than at3fa2eeaon 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
basal-benchon the 44 bundled examples, agreement againsteager-fp32on 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 mlxfor the two 4.5B models are in the doc.mlxfrom the-MLX-8bitrepos:basal-benchtakes one--model, so I ranbasal.bench.main()unchanged and only pointed themlxmode at the-MLX-8bitfolder, keeping bf16eager-fp32as the reference.--outfiles below. No code changes, so the test suite is unaffected.Refs #7
Raw
basal-bench --outm5max-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:
Documentation: