exo

2026-01-05

ai

山川满目泪沾衣,富贵荣华能几时。不见只今汾水上,唯有年年秋雁飞。——唐李峤

exo:把家里的设备“凑成一台 AI 超算”的那一刻

“Run your own AI cluster at home with everyday devices 📱💻🖥️⌚”
没看错,exo 的目标就是把你手边的设备(Mac、Linux 主机等)拼成一个“会跑大模型”的分布式集群。项目由 exo labs 维护,许可证是 Apache-2.0。


这玩意儿到底能做什么

官方 README 里说得很直白:exo 会把你的设备自动连接成一个 AI 集群,让你能跑“单机装不下”的模型,还带上了新潮的“Thunderbolt RDMA(日 0 支持)”来把设备间延迟拉到接近直连的水平。

特点(来自 README):

  • 自动发现设备:启动 exo 的设备会彼此发现,基本不需要手工配置
  • RDMA over Thunderbolt 5:官方称可让设备间延迟减少高达 99%
  • 拓扑感知的自动并行:根据设备的拓扑结构/资源/带宽/延迟自动决定“怎么把模型拆开”
  • 张量并行(Tensor Parallelism):支持模型分片(2 台最高约 1.8x、4 台最高约 3.2x 的加速)
  • MLX 支持:推理后端使用 MLX,分布式使用 MLX distributed

一句话:让“拼机跑大模型”这件事变得现实且优雅。


跑过什么?(Benchmarks 有图有真相)

README 列了几组基准场景(配图与来源链接都在):

  • Qwen3-235B(8-bit)在 4 × M3 Ultra Mac Studio 上,张量并行 + Thunderbolt RDMA
  • DeepSeek v3.1 671B(8-bit)在 4 × M3 Ultra Mac Studio 上,同上
  • Kimi K2 Thinking(原生 4-bit)在 4 × M3 Ultra Mac Studio 上,同上

来源示例:[Jeff Geerling: 15 TB VRAM on Mac Studio – RDMA over Thunderbolt 5]
这类“居家多机联动”的画风,已经开始“动真格”的了。


两种打开方式:从源码跑(macOS/Linux)和 macOS App

从源码跑(macOS)

准备:

  • Homebrew(包管理)
  • uv(Python 依赖管理)
  • macmon(Apple Silicon 硬件监控)
  • node(构建前端 dashboard)
  • Rust(构建 Rust 绑定,暂时需要 nightly)

安装与运行:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 安装 brew(如果还没)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# 安装 uv / macmon / node
brew install uv macmon node

# 安装 Rust + nightly toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup toolchain install nightly

# 克隆 exo
git clone https://github.com/exo-explore/exo

# 构建 dashboard
cd exo/dashboard && npm install && npm run build && cd ..

# 启动 exo
uv run exo

默认 dashboard 与 API 会启动在 http://localhost:52415/

从源码跑(Linux)

准备:

  • uv(Python 依赖)
  • node(≥ 18)
  • Rust(nightly)

示例(Debian/Ubuntu):

1
2
3
4
5
6
7
8
9
10
11
sudo apt update
sudo apt install nodejs npm
curl -LsSf https://astral.sh/uv/install.sh | sh

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup toolchain install nightly

# 克隆、构建、运行
git clone https://github.com/exo-explore/exo
cd exo/dashboard && npm install && npm run build && cd ..
uv run exo

默认 http://localhost:52415/
注意:目前 Linux 跑的是 CPU,GPU 支持在开发中(可以在仓库里反馈你的硬件平台需求)。

macOS App(静默后台跑)

  • macOS Tahoe 26.2 及以上版本
  • 下载:EXO-latest.dmg
  • 运行后会请求修改系统设置、安装新的网络配置(他们在完善体验)

Thunderbolt RDMA:macOS 的新能力要“开闸”

RDMA 是 macOS 26.2 新增能力,支持任一带 Thunderbolt 5 的 Mac(M4 Pro Mac Mini、M4 Max Mac Studio、M4 Max MacBook Pro、M3 Ultra Mac Studio)。

开启步骤(来自 README):

  1. 关机

  2. 长按电源键 10 秒直到进入启动菜单

  3. 选择“Options”进入 Recovery 模式

  4. 在 Recovery UI 里打开“Terminal”

  5. 输入:

    1
    rdma_ctl enable
  6. 回车,重启

之后,macOS 的 RDMA 就打开了,exo 会接管后续细节。
小贴士:Mac Studio 上,乙太网口旁边的 Thunderbolt 5 端口不能用。


用 API 玩(支持 OpenAI 风格的 chat completions)

你可以直接和 exo 的 API 交互。以下是 README 给出的“跑一个小模型、发聊天请求”的链路。

1)预览模型放置方案(placements):

1
curl "http://localhost:52415/instance/previews?model_id=llama-3.2-1b"

示例返回:

1
2
3
4
5
6
7
8
9
10
11
12
13
{
"previews": [
{
"model_id": "mlx-community/Llama-3.2-1B-Instruct-4bit",
"sharding": "Pipeline",
"instance_meta": "MlxRing",
"instance": { ... },
"memory_delta_by_node": { "local": 729808896 },
"error": null
}
// ...
]
}

2)创建实例(拷贝你想要的 placement 到 instance 字段):

1
2
3
4
5
curl -X POST http://localhost:52415/instance \
-H 'Content-Type: application/json' \
-d '{
"instance": { ... }
}'

返回:

1
2
3
4
{
"message": "Command received.",
"command_id": "e9d1a8ab-...."
}

3)发 chat completions(格式同 OpenAI,其它细节见 README):

1
2
3
4
5
6
7
8
9
curl -N -X POST http://localhost:52415/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "mlx-community/Llama-3.2-1B-Instruct-4bit",
"messages": [
{"role": "user", "content": "What is Llama 3.2 1B?"}
],
"stream": true
}'

4)删实例(完成后清理):

1
curl -X DELETE http://localhost:52415/instance/YOUR_INSTANCE_ID

其它常用:

1
2
3
4
5
# 列模型
curl http://localhost:52415/models

# 看实例 ID 与部署状态
curl http://localhost:52415/state

更多类型与端点:见 src/exo/master/api.py


监控与基准:自带“上电视”的可视化仪表板

仓库的 .github/benchmark-dashboard 是一个纯前端(浏览器)仪表板,直接读 S3 数据,适合挂墙/看板展示。

你可以这样打开:

1
open .github/benchmark-dashboard/index.html

或者起一个简易本地服务:

1
2
python3 -m http.server 8080
# 打开 http://localhost:8080/.github/benchmark-dashboard/

需要给只读的 AWS 凭据(S3:exo-benchmark-results),权限如下(摘自 README):

1
2
3
4
5
6
7
8
9
10
11
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": ["s3:GetObject","s3:ListBucket"],
"Resource": [
"arn:aws:s3:::exo-benchmark-results",
"arn:aws:s3:::exo-benchmark-results/*"
]
}]
}

特性包括:

  • 成功率、响应时间、吞吐(tokens/s)、成功/失败分布
  • 60 秒自动刷新、TV/Kiosk 模式、浏览器本地存储 credentials
  • Chart.js 渲染、无后端,纯浏览器直连 S3

GitHub Actions 的分阶段基准:把压力“安排得明明白白”

.github/configs 里是分阶段的压测配置(YAML),可以:

  • 控制 Prompt 长度、生成 token 数、请求间隔、迭代次数
  • 火力全开(fire-and-forget),以测试并发与成功率

快速 CLI 示例(来自 README):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 启动 EXO(指定 API 端口)
uv run exo --api-port 8000

# 简单基准(单阶段、1 次请求)
python3 .github/scripts/bench.py \
--api-port 8000 \
--config .github/configs/bench_simple.yaml \
--expected-nodes 1 \
--is-primary true \
--timeout-seconds 600

# 复杂分阶段基准(四阶段)
python3 .github/scripts/bench.py \
--api-port 8000 \
--config .github/configs/bench_config.yaml \
--expected-nodes 1 \
--is-primary true \
--timeout-seconds 600

输出包含总请求、成功数、失败数、成功率、总 tokens、均值等;也会打印 JSON Summary 方便存储。


使用小贴士(兼容现状 + 设备建议)

  • macOS 上使用 GPU;Linux 目前是 CPU,GPU 支持在做
  • 多设备拓扑 + 张量并行会带来显著加速(README 给了 2/4 设备的示意倍数)
  • Thunderbolt 5 RDMA 是“延迟拐点”的关键(macOS 26.2 新增,记得启用)
  • 家里有多台 Apple Silicon 的话,exo 更像是把“闲置算力”拼成了一个长时间可用的大模型推理池
  • 想要更细颗粒监控:dashboard + Actions 基准配置一起上

参与贡献

  • 贡献指南见仓库的 CONTRIBUTING.md
  • 问题/需求直接在 Issues 提交,或者去 Discord 聊

收尾:把“多设备”从折腾变成日常

exo 的有趣之处在于:它不只是“能跑”,而是把“怎么跑(自动并行 + 拓扑感知)”这件事做成了“开箱即可”的体验,再把 Thunderbolt 的 RDMA 能力拉进来,桌面端的“家用集群”突然就有了味道。

当然,Linux GPU 支持还在路上,RDMA 也需要 macOS 新版本和 TB5 硬件,但对于很多人来说,已经足够值得一试。
把你家的“设备群”叫醒,让它们一起跑个大模型吧。