Apple 釋出 Muse Spark Open:在 Mac Studio 上利用 MLX 進行分散式推論
Apple ML Research: Muse Spark Open with MLX on Mac Studio
**Apple 於 MLX 研究平臺上發布 Muse Spark Open,近千億引數的前沿模型,並示範如何在 Mac Studio 上利用 MLX 進行分散式推論。
Apple 釋出 Muse Spark Open 近千億引數模型,並示範在 Mac Studio 上利用 MLX 進行分散式推論,讀者可評估其效能與部署方式。
譯文尚未完整,完整內容請切換至原文。
內容型別 特色亮點

MLX on Mac with Apple silicon lets AI researchers and developers experiment locally with the latest models and methods in a private environment. The open-source array framework leverages the unified memory architecture of Apple silicon, enabling anyone to run new inference and fine-tuning methods on their own hardware and explore other AI techniques. In a previous post, we highlighted the advantages of the M5 architecture and its GPU Neural Accelerators.
In this post, we show how to run the latest frontier-class model — Muse Spark Open, with nearly a trillion parameters — right from your desk, using the latest version of MLX, released today. On a cluster of four Mac Studios, Muse Spark Open generates over 36 tokens per second (see Figure 1), well above average human reading speed.
從單一臺 Mac Studio(最高 512GB 統一記憶體)開始,接著透過 RDMA over Thunderbolt 驅動跨多臺 Mac 擴充套件,以下我們分享現在可以在 Mac Studio 上執行的模型範圍概覽。
We benchmark several popular open-weight LLMs on Mac Studio, using the MLX LM package, as described in our prior post. We compare two generations of Mac Studio: the recently released M5 Ultra and the previous generation, M3 Ultra. The M5 generation features the GPU Neural Accelerator, which supports dedicated matrix multiplication operations, essential for many machine learning workloads.
We evaluate three frontier-class models (Table 1) spanning a wide range of sizes (in billions of parameters, B): the newly released Muse Spark Open (816 B), Mistral Medium 3.5 (128 B), and Qwen 3.8 (27 B). Muse Spark Open is a mixture of experts (MoE) model, which keeps only a fraction of its experts — and thus parameters — active, reducing compute at inference, and it is evaluated in NVFP4 precision. Mistral Medium 3.5 and Qwen 3.8 are dense architectures, where all parameters are active at inference, and they are evaluated in their native floating-point precision (FP8 and BF16, respectively).
| 模型 | 總引數 | 活躍引數 | 原生精度 | 評估精度 |
|---|---|---|---|---|
| Muse Spark Open | 816B | 42B | BF16 | NVFP4 |
| Mistral Medium 3.5 | 128B | 128B | FP8 | FP8 |
| Qwen 3.8 | 27B | 27B | BF16 | BF16 |
我們的評估測量三項指標,涵蓋不同上下文尺寸:首次 token 時間 (TTFT,秒)、生成吞吐量 (tokens/second) 以及峰值功耗 (瓦)。本文的所有效能數值均使用 mlx_lm.benchmark 取得。例如,使用 8,192 個 token 的上下文並生成 128 個 token 的 Qwen 3.8,指令列為:
mlx_lm.benchmark --model Qwen/Qwen3.8-27B -p 8192 -g 128 -b 1
在 Mac Studio 上,使用本機 LLM 的熱門用途是執行代理式體驗於私有環境,包括常需大量上下文的代理式編碼應用。因此,我們同時報告 8,192 與 65,536 的上下文尺寸效能。
Qwen 3.8 27B 與 Mistral Medium 3.5 128B 在單一 512GB 的 Mac Studio 上可順利執行,於大語境尺寸(65,536 token)設定下,佔用最高 68GB 與 158GB 的記憶體。在 圖 2 中,我們比較它們在單一 512GB Mac Studio 上的推論效能,兩者皆使用 M3 Ultra 與 M5 Ultra。
首個 token 的時間(TTFT)基本上受計算能力限制,而 M5 Ultra GPU 的神經加速器正是此處發揮作用:GPU 神經加速器對快速矩陣乘法的專用硬體支援直接帶來顯著的 TTFT 加速,與 M3 Ultra 相比可快 4.6 倍(見 圖 2)。這使得搭載 M5 Ultra 的 Mac Studio 成為處理極大語境任務的首選桌上型電腦。
生成速度(以 token/秒計)受記憶體頻寬限制。M5 Ultra 晶片提供 1.2 TB/s 的統一記憶體頻寬,較 M3 Ultra 的 819 GB/s 有提升。這再次直接轉化為生成速度(見 圖 3),搭載 M5 Ultra 的 Mac Studio 以 1.6 倍的 token/s 表現。
Mac Studio 在 LLM 推論方面也具備能效(見 圖 4):搭載 M3 Ultra 的 Mac Studio 峰值功耗約 200W,搭載 M5 Ultra 的 Mac Studio 約 300W,僅為普通烤麵包機功耗的一小部分。更重要的是,這樣適度的功耗使得 Mac Studio 能夠在任何家庭或辦公環境中部署 AI 工作。
雖然 Qwen 與 Mistral 模型均可在單一 512GB RAM 的 Mac Studio 上執行,但 Muse Spark Open 其原生精度(BF16)僅模型引數就需超過 1.6TB 記憶體。若以 4 位量化(NVFP4)格式,模型記憶體佔用可降至約 493GB。再加上推論過程中所需的中間計算記憶體,模型無法在單一機器上容納,必須在多臺 Mac Studio 之間並行化。
像 Muse Spark Open 這類極大型前沿模型無法放在單一機器上。然而,可以將模型的一半存於一臺 Mac Studio,另一半存於另一臺。接著可將推論流程分段在兩臺電腦上進行:第一臺 Mac Studio 執行模型前半段層,將輸出傳送至第二臺 Mac Studio,後者執行後半段層。此並行化方案稱為流水線並行化(見 圖 5),實作極為簡單,只需最小的程式碼修改。
MLX 支援不同的平行化方案,詳見 MLX distributed documentation。這些方案依賴快速的機器間通訊:macOS 26.2 引入了低延遲的 RDMA 驅動程式於 Thunderbolt 5 上,MLX(v0.30.1 及以後版本)在此驅動程式之上構建,並提供新的通訊集體(jaccl,發音「jackal」)以支援不同的平行化方案。在我們的設定中,兩臺 Mac Studio 透過兩條 Thunderbolt 纜線連線(以提升鏈路頻寬),提供 jaccl 所使用的 RDMA-over-Thunderbolt 連結。主機設定完成後,MLX 提供 mlx.launch,一個協助跨多個節點啟動工作之指令:
mlx.launch --hostfile hostfile.json --backend jaccl --env MLX_METAL_FAST_SYNCH=1 -- \
mlx_lm.benchmark --model mistralai/Mistral-Medium-3.5-128B -p 8192 -g 128 -b 1 --prefill-step-size 8192 --pipeline
在此指令中,--backend jaccl 指定 RDMA Thunderbolt 驅動程式後端。--env MLX_METAL_FAST_SYNCH=1 旗標啟用一項實驗性的 MLX 功能,用於快速 CPU‑GPU 同步,降低 CPU(啟動 Thunderbolt 通訊)與 GPU(執行計算)之間的通訊開銷。
一般而言,使用 pipeline parallelization 的解碼推論速度(見 Figure 7)與單臺機器相當,因為各層仍以順序方式評估。通訊開銷亦很低,因只需交換兩組層之間的中間輸出。
然而值得注意的是,對於非常大的上下文(我們基準測試中為 65,536 個 token),pipeline parallelization 在 prefill 階段比單節點更快——可達約 1.8 倍(見 Figure 6)。原因是 MLX 將大型上下文分割成較小的區塊(此處為 8,192 個 token,受 --prefill-step-size 8192 設定),並在機器間流水線 prefill:當第二臺機器計算區塊 k 的後層時,第一臺機器計算區塊 k+1 的前層,因而相鄰區塊時間上重疊。為了更佳的計算平行化,我們接下來轉向 tensor parallelization。
Tensor parallelization (see Figure 5) distributes the LLM’s width across several computers, in contrast to pipeline parallelization, which distributes the model across its depth. Each machine now holds a fraction of each of the layers of the model, such that per-layer computation is parallelized. When efficiently implemented, tensor parallelization improves inference speed. However, tensor parallelization is more complex to implement than pipeline parallelization: each layer must be parallelized, which increases code complexity. The scheme also involves many small communication operations: for each input token and for each layer, one must broadcast inputs and aggregate outputs. As a result, a very low-latency communication technology like Thunderbolt RDMA, supported by MLX jaccl, is critical for this approach to yield any speedup.
使用 MLX 的高階 mlx.launch 助手,切換到 tensor parallelization 非常簡單。Mac Studio 電腦以 Thunderbolt 網狀連線,每對機器以兩條 Thunderbolt 纜線點對點相連。假設主機已設定好,我們只需使用以下方式在多臺機器上啟動基準測試:
mlx.launch --hostfile hostfile.json --backend jaccl --env MLX_METAL_FAST_SYNCH=1 -- \
mlx_lm.benchmark --model meta-models/Muse-Spark-Open-816B-A42B-NVFP4 -p 8192 -g 128 -b 1
Figure 8 and Figure 9 show the speedups obtained with two or four Mac Studio computers with M5 Ultra, relative to a single-machine baseline (or, for Muse Spark Open, the pipeline parallelization baseline). Notably, dense architectures scale better across multiple computers.
在機器數量較少時,tensor parallelization 的通訊開銷可能會抵消其在極大上下文長度下的計算效益,儘管這僅適用於 prefill。這在 Muse Spark Open 上表現出來,因為對專家輸出的單獨正規化增加了一些 prefill 通訊,足以導致在極大上下文(65,536 tokens)下,兩臺機器的 tensor parallelization 落後於兩臺機器的 pipeline parallelization。然而,隨著機器增加,該方法會獲得回報,正如四臺 M5 Ultra 所示。Decode 不受影響:Muse Spark Open 在 tensor parallelization 下,即使在大上下文下也能維持顯著的 Decode 加速,與 Qwen 3.8、Mistral Medium 3.5 等稠密模型相當。
The two-cable mesh also pays off during prefill, where the extra link bandwidth is felt. For Muse Spark Open on four M5 Ultras at a 65,536-token context, two cables per link cut TTFT from about 50.5s (one cable) to 40.6s — the two-cable value reported in Table 2, the one-cable run being an additional experiment.
首次 token 時間(秒)
越低越好
| 模型 | M3 Ultra | M5 Ultra | 2 M5 Pipeline | 2 M5 Tensor | 4 M5 Tensor |
|---|---|---|---|---|---|
| Muse Spark Open | — | — | 8.4 | 8.2 | 4.8 |
| Mistral Medium 3.5 | 95.9 | 24.6 | 24.5 | 14.4 | 7.5 |
| Qwen 3.8 | 18.2 | 4.1 | 4.1 | 3.1 | 1.7 |
解碼速度(每秒代幣數)
越高越好
| 模型 | M3 Ultra | M5 Ultra | 2 M5 Pipeline | 2 M5 Tensor | 4 M5 Tensor |
|---|---|---|---|---|---|
| Muse Spark Open | — | — | 15.74 | 24.99 | 36.73 |
| Mistral Medium 3.5 | 4.95 | 7.70 | 7.70 | 13.69 | 23.37 |
| Qwen 3.8 | 12.46 | 19.69 | 19.44 | 33.27 | 50.89 |
近期,Mac 上的代理 AI 已獲得相當多的關注,代理編碼工具在開發者中廣泛採用。使用 MLX,將這些工具本地化執行就像啟動一個使用 mlx_lm.server 工具的伺服器一樣簡單。例如,在 8080 埠上執行 Muse Spark Open 的伺服器可以這樣啟動:
mlx.launch --hostfile hostfile.json --backend jaccl --env MLX_METAL_FAST_SYNCH=1 -- \
mlx_lm.server --model meta-models/Muse-Spark-Open-816B-A42B-NVFP4 --port 8080
與 mlx_lm.benchmark 相同,mlx_lm.server 助手可以加上 mlx.launch 字首,以在多臺 Mac Studio 之間平行計算。從那裡開始,您可以使用像 OpenCode 這樣的工具啟用代理 AI,並且可以輕鬆配置以使用本地 LLM 伺服器:
{
"$schema": "https://opencode.ai/config.json",
"model": "meta-models/Muse-Spark-Open-816B-A42B-NVFP4",
"provider": {
"mlx": {
"npm": "@ai-sdk/openai-compatible",
"name": "Local MLX",
"options": {
"baseURL": "http://127.0.0.1:8080/v1"
},
"models": {
"meta-models/Muse-Spark-Open-816B-A42B-NVFP4": {
"name": "Muse Spark Open 816B (MLX)"
}
}
}
}
}
許多其他本地代理 AI 體驗也可透過類似方式啟用。
過去一年,我們在 MLX 上進行了多項關鍵創新,以使在最新 Apple silicon 上本地執行最先進 LLM 更加簡單且高效。這些創新包括對 M5 系列晶片 GPU 中神經加速器的軟體支援、使用 Thunderbolt 上的 RDMA 在多臺 Mac 之間實現低延遲通訊,以及對最新熱門架構(如專家混合模型 MoE)的高效實作。每項創新各自都有幫助,但將它們與最新 Apple silicon(Mac Studio 搭載 M5 Ultra、M5 Ultra GPU 中的神經加速器、512GB 統一記憶體、Thunderbolt 5 上的 RDMA)結合,現在使我們能在本地執行像 Muse Spark Open 這樣超過 800B 引數的模型,啟動速度(首個代幣時間)可達前一代 Mac Studio 的 4.6 倍。
相關閱讀與更新。
Apple 正在於每年舉辦的 International Conference on Learning Representations (ICLR) 發表新研究,該會議將於 4 月 23 日至 27 日在巴西里約熱內盧親自舉行。 我們很自豪再次贊助該會議,該會議匯聚了專注於深度學習的科學與工業研究社群。以下是 Apple 在 ICLR 2026 的參與概覽。
搭載 Apple silicon 的 Mac 在 AI 開發者與研究人員中越來越受歡迎,他們希望使用自己的 Mac 試驗最新模型與技術。透過 MLX,使用者可以在 Mac 上高效探索與執行 LLM,並讓研究人員在私有環境中使用自家硬體實驗新推論或微調技術。MLX 適用於所有 Apple silicon 系統,並且在最新…