speed-bench: add MacBook Pro M4 Max q2 sweep - #723
Conversation
Measured with the documented command on the ds4f-q2 build (DeepSeek-V4-Flash-IQ2XXS-w2Q2K-AProjQ8-SExpQ8-OutQ8-chat-v2-imatrix-0731.gguf, 80.76 GiB, fully resident) at b030961: ./ds4-bench -m <ds4f-q2> --prompt-file speed-bench/promessi_sposi.txt \ --ctx-start 2048 --ctx-max 65536 --step-incr 2048 --gen-tokens 128 MacBook Pro M4 Max, 128 GB, macOS 26, Metal: ctx prefill generation 2048 331.58 t/s 29.87 t/s 16384 280.53 t/s 28.75 t/s 32768 229.33 t/s 25.65 t/s 65536 190.79 t/s 23.28 t/s Added as a separate file rather than updating speed-bench/m4_max.csv, which predates the 0731 checkpoint and the current 9-column format, so the two are not directly comparable. Note for anyone reading these rows side by side: this machine logs "Metal 4 tensor API disabled for pre-M5/pre-A19 devices", so the accelerated prefill path added in 532ec8b and 222b2cb does not dispatch here. Against the M5 Max column that works out at 2.0-2.4x on prefill but only 1.19-1.34x on generation, and the prefill share attributable to silicon alone cannot be separated without DS4_METAL_DISABLE_METAL4 on an M5. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Follow-up: I said above that the silicon-versus-TensorOps split could not be separated without MethodAdded First finding: the probe passes on M4 Max. The patched build prints so on macOS 26 the tensor API and But enabling it loses
Aggregated over all 32 frontiers: prefill −4.2%, generation −0.9%, with prefill improving at only 10 of 32. That is exactly what the comment above Consequence for the M5 comparison in this PREnabling the path moves M4 backwards, so the M5/M4 prefill ratio widens rather than closes: 2.38× → 2.53× at ctx 2048 and 2.43× → 2.65× at 32768 (roughly unchanged at 64K, 2.09× → 2.05×). So the caveat in the PR description should be read as settled: the prefill gap is the M5's per-GPU-core neural accelerators, not the gating decision holding M4 back. The generation gap stays 1.19–1.34× either way, which fits — decode is bandwidth-bound and TensorOps does not touch it. Not proposing a change. The gate does the right thing, and this is only evidence for it. Reverted locally. Caveats: one run per frontier and no thermal control between the two sweeps on a laptop, so a few percent of the aggregate could be drift; the per-cell signs are mixed at the top of the range. I did not check whether TensorOps changes numerics on M4, only throughput. |
OPS-NeoRetro
left a comment
There was a problem hiding this comment.
@datanerdie, the file name of your benchmark submission is totally misleading. Please rename your submission file.
There was a problem hiding this comment.
Please rename this to m4_max_flash_0731.csv
Adds an M4 Max row measured with the documented command, so the M5 Max and GB10 columns have a current Apple-silicon point to sit next to.
Setup
ds4f-q2(DeepSeek-V4-Flash-IQ2XXS-w2Q2K-AProjQ8-SExpQ8-OutQ8-chat-v2-imatrix-0731.gguf, 80.76 GiB, fully resident),b030961, MacBook Pro M4 Max 128 GB, macOS 26, Metal.Why a new file rather than updating
m4_max.csvThe existing
speed-bench/m4_max.csvpredates the 0731 checkpoint and uses the older 6-column format, so it is not directly comparable to the refreshed rows — putting this in the same file would blur two different measurements. Happy to fold it in instead if you would rather have one file per chip.One suggestion while you are here: the CSV filenames record only the chip, not the quant, build or chassis, which makes rows from different passes easy to compare by accident. A short header comment or a companion note in
speed-bench/README.mdwould make provenance explicit.Reading this against the M5 Max column
This machine logs
Metal 4 tensor API disabled for pre-M5/pre-A19 devices, so the accelerated prefill path from 532ec8b and 222b2cb never dispatches here. The gap works out at 2.0–2.4× on prefill but only 1.19–1.34× on generation, which is what you would expect if the prefill difference is partly the TensorOps path rather than raw silicon. I cannot separate the two from this side — that would needDS4_METAL_DISABLE_METAL4on an M5.🤖 Generated with Claude Code