r/MacStudio • • 15h ago Bravo

What 512 GB unified memory on the Mac Studio M5 Ultra actually unlocks for local AI (22 frontier setups tested, 350-409 GiB peak RAM)

123 Upvotes

If you are wondering what 512 GB of unified memory actually buys you in practice (beyond single-prompt tok/s), I ran 80 identical tasks (20 tool workflows, 20 sandboxed Python coding tasks, 20 EN/DE doc extractions, 20 blind-graded writing briefs) across 5 frontier model families (249-432 GB bundles) and 5 engines on a 512 GB Mac Studio M5 Ultra (macOS 26.4.1, seed 42, speculative decoding off).

Practical takeaways on 512 GB:

  • Real RAM usage: DeepSeek V4.1 Flash (oQ4e/Engram, 432 GB) peaked at 409.4 GiB footprint; Muse Spark Open 816B (oQ3e, 371.5 GB) peaked at 350.3 GiB - both ran comfortably inside the 448 GiB active model budget with room to spare.
  • Everyday all-rounder (R02 DeepSeek V4.1 Flash on oMLX High): 76/80 in 43.6 min, 49.5 tok/s decode, 1,119 tok/s prefill, 3.8s to first visible word, 20/20 vision, 5/5 strict JSON.
  • Max quality & writing (R06/R10/R08 Muse 816B): 77-78/80 (18-19/20 writing), though High effort takes 121-133 min (35-44 min on Low for 73-75/80).
  • Fast coding & docs (R22 GLM 5.3 Flash on llama.cpp High): 69/80 in 11.0 min (20/20 Code & Docs, 5.7 min on Low).
  • Compatibility reality: 15 of 37 setups failed to load (vLLM-Metal 0.33.0 went 0/7).

All 22 working recipes, all 15 failed setups, charts, and 1,760 per-task CSV rows (CC BY 4.0): https://github.com/l8w8/videos/tree/main/2026/001-m5-ultra-22-setup-comparison

12-minute chart walkthrough on YouTube: https://youtu.be/vF-LUF6kPsE


r/MacStudio • • 16h ago

M5U512 meet M3U256

Post image
44 Upvotes

It’s here! Transferring files as we speak. Exciting!


r/MacStudio • • 7h ago

Has the Mac Finally Levelled the Spark? — Deepseek v4.1 Flash Benchmarks for Machd (2× 256 GB Mac Studio M5 Ultra vs. 4-Node DGX Spark Ring)

Thumbnail
gallery
19 Upvotes

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/s68.3 tok/s88.4 tok/s (10.9 msTPOT)Mac beats 4× Spark (+1.5%) & crushes 3× (+29%)
Greedy c1 (T=0.0)89.1 tok/s70.4 tok/s81.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/s188.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/s170.7 / 167.6 tok/s191.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/s222.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 sMac 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/s7,270 → 6,922 tok/s3,651 → 1,475 tok/s4× 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!


r/MacStudio • • 3h ago

Two 256 GB Mac Studios just outpaced a 4-node NVIDIA DGX Spark cluster on DeepSeek-V4.1-Flash. Half the nodes. 100% lossless.

15 Upvotes

I just open-sourced Machd (dsv41-hyper), a C++20 / Metal-4 distributed inference engine built for running DeepSeek-V4.1-Flash losslessly on 2× 256 GB Apple Mac Studio M5 Ultra over Thunderbolt 5 RDMA (JACCL).


r/MacStudio • • 9h ago

Planning my first home AI lab around a base M5 Ultra 96GB. Any advices?

Post image
7 Upvotes

r/MacStudio • • 12h ago

I got SOLIDWORKS 2025 running on Apple Silicon without a Windows VM

Thumbnail gallery
5 Upvotes

r/MacStudio • • 1h ago

Purchase Advice

2 Upvotes

I am looking at the Mac studio m5 Max with 128 and 2TB but recently came across a MacBook pro refurb w same specs for $500 cheaper. Outside the obvious portability and the better cooling, is there any other reason to go w the studio for $500 more?


r/MacStudio • • 13h ago

I am torn between Mac studio M5 max and macbook m5 pro both 64gb ram same cost

1 Upvotes

As title suggest i am torn between these two. I am currently using macbook pro M1 pro. But my 16gb set up is no longer enough for any agentic work that i wish to do as well as AI/ algo trading.

I dont have the money for 128gb of ram but I am wondering how hard is the switch from a macbook to mac studio set up what would be the benefits over better cooling. Sometimes I do like to still work from bed, and not just at a desk, but I do not really take the macbook outside, i just move it from various rooms. If i keep my old macbook, is there away to bridge the gap of portability?

Any advice would be welcome?


r/MacStudio • • 22h ago

"Upgrading" my M5U, selling previous one

1 Upvotes

Hi all,

I got an M5U 30/64 96GB 1TB right when it came out end of September. Played around with it and like it a lot - to the point where I decided to replace it with a 30/64 256GB 2TB model.

I'd like to sell the 96GB one, just used it for roughly two months and it has AppleCare+ (3 yrs) on it. What do you think, what is a fair price for that machine?