Over the past few weeks I've been building a new custom Apple Silicon inference engine called Machd.
One question keeps coming up in local AI circles: for roughly the same total hardware budget and the exact same 512 GB of total unified memory, how does a 2× 256 GB Apple Mac Studio M5 Ultra setup (connected over Thunderbolt 5 RDMA) stack up against a switchless 4-node NVIDIA DGX Spark ring (4× 128 GB)?
To find out fairly — with zero cherry-picking — we took Christopher Owen's gold-standard spark-ds41f-1120production deployment on the 4-node DGX Spark ring (tp4-ring), cloned his exact Sonar benchmark client (d430736) and exact 256 prompts, and ran the same suite head-to-head on Machd running DeepSeek-V4.1-Flash (100% lossless full accuracy, zero re-quantization).
(Note on test hardware: benchmarks were run on our 512 GB Mac Studio M5 Ultra hosts with memory strictly capped to a 256 GB hardware envelope — mx.set_wired_limit(224 GiB)*, Engram weights offloaded to NVMe SSD, and* F_NOCACHE=1 to bypass macOS's OS page cache completely so spare host RAM cannot be used. Peak memory hit only 161.3 GiB / 256 GiB per Mac even while processing a full 1,000,000-token prompt.)
The Headline Comparison: Exact Sonar Replication (spark-ds41f-1120 vs. Machd)
Both clusters run the exact same DeepSeek-V4.1-Flash-1017 lossless weights, both operate inside a 512 GB total cluster RAM budget, and both offload the 189 GB Engram N-gram table to local NVMe SSD.
Exact Sonar Benchmark (256 Prompts, 256t Output) | 4× DGX Spark Ring (spark-ds41f-1120) | 3× DGX Spark Triangle (1120) | **2× 256 GB Mac Studio M5 Ultra (**Machd Preliminary) | Takeaway |
|---|
Sampled c1 (T=1.0, top_p=1.0) | 87.1 tok/s | 68.3 tok/s | 88.4 tok/s (10.9 msTPOT) | Mac beats 4× Spark (+1.5%) & crushes 3× (+29%) |
Greedy c1 (T=0.0) | 89.1 tok/s | 70.4 tok/s | 81.0 tok/s (12.0 msTPOT) | Within 9% of 4× Spark; +15% over 3× Spark |
Poisson Open-Loop (0.7 req/s, SLO 2s/100ms) | 180.3 tok/s (0.24s TTFT) | 119.5 tok/s | 188.5 tok/s (0.17sTTFT, 100% SLO) | Mac beats 4× Spark (+4.6%, -28% TTFT) & +58% over 3× |
Closed-Loop c8 (Greedy / Sampled) | 213.6 / 210.0 tok/s | 170.7 / 167.6 tok/s | 191.5 / 191.6 tok/s* | Within 9–10% of 4× Spark without batched spec yet! |
Closed-Loop c16 (Greedy / Sampled) | 280.4 / 276.6 tok/s | — / 167.2 tok/s | 222.2 / 210.7 tok/s* (0.34s TTFT) | Spark uses batched DSpark (~2.42 tok/step); Machd hits lower TTFT |
**Active Decode Stall Under 131K Prefill (**stall-3 / stall-11 worst gap) | 1.75 s / 1.85 s | — | 0.27 s / 0.26 s | Mac 6.4×–7.0× smoother for active users (Spark wins new-probe bypass: 0.73s / 1.14s*)* |
Cold Source-Text Prefill (32K → 1M) | 9,615 → 9,397 tok/s | 7,270 → 6,922 tok/s | 3,651 → 1,475 tok/s | 4× Blackwell Tensor Cores win cold prefill decisively (2.6×–6.4×) |
*Note on c8*/c16:* spark-ds41f-1120 already runs batched speculative decoding (~2.42 tokens accepted per step across concurrent users). These preliminary Machd numbers only run speculation at c1 — c8 and c16 are running plain 1-token/step batched decode! Even without batched speculation, 2 Macs are already within ~9–10% of 4 Sparks at c8 and beat 4 Sparks on live 0.7 req/s Poisson serving.
How a 477 GB Model Fits Comfortably on 2× 256 GB Macs — Without Hurting Decode Latency
DeepSeek-V4.1-Flash weighs 477.56 GB in full lossless precision — and 189 GB of that is its giant Engram N-gram lookup table (queried at just two layers: Layer 1 and Layer 14).
Machd's dedicated 2× 256 GB SSD-Engram launcher leaves the 183.1 GB Engram weight tables on each Mac's internal NVMe SSD, keeping only the core sharded weights (144.4 GiB), tiny pinned scales (5.7 GiB), and a strictly bounded 4.27 GiB Clock cache in RAM (with F_NOCACHE=1 bypassing macOS file caching completely):
- True 256 GB Headroom (Even at 1M Context!): Process memory sits at
155.5 GiB, peaking at 161.3 GiB / 256 GiB per Mac even while running a full 1,000,000-token prompt — leaving ~95 GB of headroom on every 256 GB Mac Studio! - Fast Cold Boot: Loads in just
13.8 – 14.0 seconds! Ultra-Low Decode Latency: Because Engram lookups depend only on the input token IDs, Machd knows which rows it needs before Layer 0 even starts and prefetches them on parallel 4 KiB-aligned NVMe pread threads in strict Layer-1 → Layer-14 priority while the Metal GPU executes Layer 0 and Layers 1–13.
- Raw
M=1 Decode: 66.68 tok/s **(**14.96 ms p50) with the 4.27 GiB Clock cache — and 66.79 tok/s **(**14.96 ms p50) even with 0 GiB cache (100% physical NVMe reads on every single token, 151.5 GiB RSS)! - Speculative Workloads (2× 256 GB): Prose
90.5 tok/s, Coding 99.5 tok/s, Deep Reasoning <think>``147.3 tok/s. - Real-World Cache Efficiency: Across 85.2 million real-text Engram lookups in the full 9-benchmark Sonar suite, the 4.27 GiB Clock cache hit 60.2% of lookups (
51.2M hits vs 33.9M direct NVMe reads) with 64/64 bit-exact lossless token parity verified!
Unique to Machd: Phase-Aware 6-Rail Thunderbolt 5 RDMA
If you plug 6 Thunderbolt 5 cables between two Mac Studios, you might assume striping every transfer across all 6 cables is always fastest. On small decode payloads, the opposite is true!
During single-user decode (M=1), the two Macs only exchange ~10 KB per all-reduce. Splitting 10 KB across 6 separate RDMA queues means paying 6× queue doorbell/completion overhead and waiting for the slowest cable on every layer. Meanwhile, at large batches (M=16) or prompt prefill, you do want all 6 cables blasting in parallel.
Machd's custom Phase-Aware FastRDMA automatically shifts gears per collective based on payload size:
- **≤ 16 KB (**
M=1 Decode) → 1 fastest rail: Hits 66.68 tok/s (14.96 ms p50) vs. 64.10 tok/s (15.58 ms) when forcing all 6 rails — a free +2.58 tok/s (+4.0%) gain just from not over-striping tiny packets! - **16–128 KB (**
M=4..12 Verify & Medium Batch) → 4 rails: Beats both forced 6-rail and stock MLX JACCL. - **> 128 KB (**
M=16 & Prefill) → All 6 rails: Hits 42.17 ms per step at M=16, cutting -1.32 ms off stock 6-rail MLX JACCL (43.49 ms).
Bottom Line: Has the Mac Finally Levelled the Spark?
- If your workload is heavy cold long-context prefill (e.g., digesting fresh 131K–1M documents non-stop): 4× DGX Sparks still win hands-down (
9.4K–10.1K tok/s vs 1.5K–3.7K tok/s on 2 Macs) thanks to 4× Blackwell Tensor Cores. (See fig4_prefill_and_workloads.png*)* - If your workload is interactive chat, coding agents, reasoning, and real-world multi-user serving (
Poisson / c1–c16): Yes — 2× 256 GB Mac Studio M5 Ultras running Machd have genuinely levelled the 4-node DGX Spark ring (beating it on sampled c1 and 0.7 req/s Poisson serving, running 6.4×–7.0× smoother during heavy prefills, and comfortably beating a 3-node Spark triangle across the board) — and we haven't even turned on batched speculation yet!
Machd is still in active polish and will be released soon. Huge credit to Christopher Owen for building spark-ds41f and open-sourcing Sonar so the community can run truly apples-to-apples benchmarks! Happy to answer any questions!