M5 Max + MLX 本地栈

IndyDevDan 39 分钟基准:M4 Max vs M5 Max × 4 模型 × 3 benchmark

视频:My M5 Max, Gemma 4, MLX LOCAL Stack 频道:IndyDevDan 时长:39:03(2343s) 字幕:EN 自动 → 中文提炼 日期:2026-06-16

核心论点

M5 Max + MLX 模型 = 真正能用的本地 LLM。Dan 用 4 个模型在 M4 Max vs M5 Max 上跑 3 套 benchmark,得出 4 个核心 takeaway:MLX 碾压 GGUF(2x decode)M5 比 M4 快 15-50%8K-16K context 是分水岭Agentic 任务本地可跑但限 8K context

MLX 加速
vs GGUF (decode)
M5 提升
15-50%
vs M4 Max
Context 极限
8K-16K
本地 SLM 实际可用
Qwen MLX
118 tok/s
decode on M5
Gemma MLX RAM
16 GB
极小 footprint
32K Wall
280s / 400s
M5 vs M4 (40% 改善)

测试矩阵:4 模型 × 2 设备

模型格式大小MoE出品方
Qwen 3.5GGUF (NVFP4)35B params3-4B activeAlibaba
Qwen 3.5MLX35B (A4B)3-4B activeApple silicon
Gemma 4GGUF~26BdenseGoogle
Gemma 4MLX community26BdenseApple silicon

设备

🖥️ M4 Max (满配)

128GB RAM · baseline

🚀 M5 Max (满配)

128GB RAM · 新 super core · 35W vs 40W (M4)

3 套 Benchmark

Bench 1: 简单 prompt
Bench 2: Context Scaling (200→32K)
Bench 3: Pi Coding Agent

Benchmark 1: 简单 Prompt(prefill / decode / wall / RAM)

5 个简单问题(hash table / 两句话 / rate limiter 等)

指标模型 / 格式数字 (M5)vs M4
DecodeQwen GGUF 60 tok/sbaseline
DecodeQwen MLX 118 tok/s ~2×同比例快
PrefillGemma GGUF 550 tok/s赢 MLX
RAM peakGemma MLX 16 GB极小
整体加速M5 vs M4 15-50%

🔑 关键发现

Benchmark 2: Context Scaling(Graph Walks)

5 prompt 长度:200 / 500 / 1K / 8K / 16K / 32K tokens · 任务:BFS 遍历图找节点

Context 长度本地模型表现M4 vs M5结论
< 8K 快 + 正确 M5 略快 本地模型无敌
8K - 16K ~30s 等待 差距明显 勉强可接受
32K M4=400s / M5=280s M5 改善 40% Gemma 答错
64K+ 跳过(太慢) 不可用

✅ 8K 以下能干真活

  • 短总结、解析、分类、翻译
  • 小段代码生成
  • 单步 agent 任务
  • code completion

❌ 16K+ 回归 cloud

  • 长对话 agent
  • 多轮 reasoning
  • 大型 code review
  • 长文档分析
"Performance is great. The bottleneck is context window length. At 16K, you wait 30s. That's unusable. Just like LLMs who say they have 1M context — it's really 500-800K. Claude 4.6 is the only true 1M so far."

Benchmark 3: Pi Coding Agent(Agentic 实操)

6 任务:hello world → fib → 14-26 tool calls 的大包生成

任务 #M4 (秒)M5 (秒)说明
197hello world
21010fibonacci
32014
44025
56050
6160100-180大包生成
⚠️ M4 任务 6 放弃:1 tool call 后卡死,给出"非合法结果"

实测结果

✅ 本地能干

  • 简单 micro-agent 任务
  • 解析 / 总结 / 小编码
  • 写文件 + 执行 + 验证
  • 工具调用 ≤ 10 次的 agent

❌ 仍需 cloud

  • 多轮长对话 agent
  • 复杂 reasoning chain
  • > 26 tool calls 任务
  • > 16K context agent

4 个核心 Takeaway(必读)

① MLX 永远赢

"If you're on Mac, always find an MLX model. There's really no debate."

例外:Gemma 4 GGUF 的 prefill speed 比 MLX 更快(小 prompt 时)。

② M5 vs M4 = 15-50% +20% avg

平均 ~20% tokens/s,prefill 几乎 double(大 prompt 优势)

M5 风扇更安静:35W vs 40W(M4)

"The M5 doesn't need the performance core — super core 单独搞定"

③ Context Window = 真正瓶颈 8K-16K 极限

8K 以下无敌 · 8K-16K 勉强 · 16K+ 回归 cloud

Cloud 模型虚标 context:标 1M 实际 500-800K;Claude 4.6 是唯一真 1M

④ Agentic 工作流本地可行,但有限 8K 内

6 任务实测,8K context 内本地能干真活

适用:micro-agent / 解析 / 总结 / 小编码

不适用:长对话 / 长 reasoning / 复杂多步

适用 / 不适用 场景

✅ 本地模型擅长❌ 仍需 cloud
短总结(< 8K) 长文档分析(> 16K)
代码补全 / 小段生成 大型 code review
单步 micro-agent 多轮 reasoning chain
文件写入 + 执行 + 验证 > 26 tool calls 的 agent
隐私敏感数据(不出设备) SOTA 推理质量(Opus 4 / Sonnet 4)
offline / 飞机 / 离线开发 多模态(image + audio 高质量)
高 QPS 低成本服务(cheap 模型) 产品级准确性要求

任务分层策略(Dan 的建议)

🐭 Small / Cheap

本地 SLM 8K context

解析、总结、分类、文件操作

🐴 Workhorse

Cloud Sonnet 4 / 等价

中等复杂度 agent / 编码

🦁 SOTA

Cloud Opus 4 / 等价

复杂 reasoning / 关键决策

实用建议(Dan 实战结论)

  1. 买 M5 Max 直接满配(128GB RAM)— "no purpose in lower tier unless base"
  2. MLX 优先于 GGUF(2x speed up)
  3. Plug in device — 跑模型耗电极快
  4. 35-50B parameter 是甜点 — 准确率 + 速度平衡
  5. 控制 agent harness — 2026 年大主题(Pi coding agent 的 customization)
  6. 任务分层 — small / workhorse / SOTA 模型分桶用
  7. Micro-agent 思维 — 复杂任务拆给本地小模型分步做
"If you don't need a large model, don't use one. This especially matters for product engineering when you have hundreds, thousands, and hopefully hundreds of thousands of users hitting your service."

Dan 的 2026 预测

🔮 年底能跑 Sonnet / Opus 4.0 等级

"By the end of the year we should be able to run a Sonnet or Opus 4.0 level model on your device."

"Model providers want you and I super, super hooked on their Kool-Aid. The future is agentic — control your harness to control your results."

完整时间线(83 段字幕)

从 0:33 到 38:58 的关键节点

0:33
Hook:M5 vs M4,MLX 路线
"Claude APIs down — I wish I could use private, cheap, fast, performant local models"
2:39
Cold start 预热
first run = loading models into memory
3:33
5 metrics 介绍
prefill / decode / wall / RAM / accuracy
4:54
Live bench UI 介绍
multi-device streaming benchmark
6:54
🔑 MLX 碾压 GGUF(第一次)
M5 Max 比 M4 Max 越来越明显
7:30
M5 Qwen MLX: 118 tok/s decode
GGUF 60 → MLX 118,几乎 2x
9:03
Gemma 4 MLX 16GB RAM 即可
极小 footprint,intelligence per parameter
11:13
Tokens per second 100+ 的 MLX 变体
"fully usable" 阈值是 30 tok/s
12:14
🎯 M5 vs M4 = 15-50% 总结
5 clearly faster on average
14:14
进入 context scaling benchmark
graph walks 200→32K
15:38
M5 117 tok/s 在 graph walk 8K
breadth-first search across graphs
17:11
32K 是 SLM 真正 context 极限
35B params and below
19:08
M5 35W vs M4 40W
M4 doing a lot more work
20:48
16K context 30 秒等待 = 不可用
"it's unusable, frankly just unusable"
25:50
🎯 Context window = 真正瓶颈
falloff starts at 8K-16K
27:10
进入 Pi coding agent benchmark
6 tasks from hello to package gen
28:50
任务 1-2: hello world / fib
both correct
30:09
⚠️ M4 任务 6 放弃
1 tool call 后卡死,"非合法结果"
34:16
Local models 可跑 agentic 任务 结论
complexity is simpler end for now
37:00
Model provider 锁定策略批评
"hooked on their Kool-Aid"
37:53
🔮 2026 年底能跑 Sonnet/Opus 4.0 预测
等待 M5 Ultra / M6 Mac Mini
38:58
Closing
"Stay focused and keep building"