Clustering Nvidia DGX Spark and M3 Ultra Mac Studio for 4x Faster LLM Inference (blog.exolabs.net)

🤖 AI Summary
ainews247 got early access to two NVIDIA DGX Spark units and shows how combining them with Apple Mac Studio M3 Ultra nodes via EXO yields multi× faster LLM inference by matching each device to the phase it handles best. The DGX Spark (~100 TFLOPs FP16, 128 GB CPU–GPU coherent memory at 273 GB/s) excels at compute-heavy prefill, while the M3 Ultra (≈26 TFLOPs FP16, 512 GB unified memory at 819 GB/s) shines at memory-bound autoregressive decode. In a real run of Llama-3.1 8B with an 8,192-token prompt + 32-token generation, DGX Spark + M3 Ultra achieved a 2.8× end-to-end speedup versus M3 alone (2.32s vs 6.42s), combining a 3.8× faster prefill and a 3.4× faster generation step. The technical insight: prefill (building the per-layer KV cache) is compute-bound with quadratic cost in context length and very high arithmetic intensity (~hidden dim h), while decode is memory-bound (vector–matrix ops against the KV cache). EXO streams KV layer-by-layer so transfer overlaps with subsequent layer compute; hiding communication requires tsend < tcomp (tcomp = F/P, tsend = D/B). With a 100 TFLOP DGX and 10 GbE link, thresholds depend on attention architecture (K): e.g., with 8-bit KV streaming, s > ~5k tokens for K=16 (Llama-3 70B), s > ~10k for K=8, and s > ~40k for K=2. EXO automates discovery, profiling, and phase placement so heterogeneous clusters are scheduled automatically to maximize throughput.
Loading comments...
loading comments...