面壁智能 MiniCPM-V 4.7 在 iPhone 上推理速度从 3.38 提升至 20.51 tokens/s
Love this breakdown! 🔥 From 3.38 to 20.51 tokens/s on an iPhone — a great example of how inference optimizations can unlock powerful on-device AI.
面壁智能 OpenBMB 转发了一份对 MiniCPM-V 4.7 35B-A3B 在 iPhone 18 Pro Max(12GB RAM)上推理优化的拆解,解码速度从 3.38 tokens/s 提升到 20.51 tokens/s,约为未优化基线的 6.07 倍。优化路径依次为专家预取 6.57、调度与加载优化 11.34、混合精度量化 17.16,再叠加 DSpark 投机解码达到 20.51 tokens/s;该模型总参数 35B、激活约 3B,支持图像、多图与视频理解,大部分权重留在闪存中按需加载。原帖注明这些仍是 OpenBMB 自己的测量数据。
查看原帖这款较新的 35B 多模态模型在 iPhone 上的速度从 3.38 tps 提升到了 20.51 tps。 MiniCPM-V 4.7 35B-A3B 通过改进模型在存储与内存之间的搬运方式,使其在 iPhone 上的解码速度得到提升。 约束条件 🧠 总参数 35B / 激活约 3B 📱 iPhone 18 Pro Max — 12GB RAM 👁️ 图像 + 多图 + 视频理解 这 35B 权重中的大部分并不常驻内存。 专家可以留在手机的闪存中,在真正需要时再加载。 通常这样做很慢 🐌 SSD 专家加载 → 3.38 t/s 于是 OpenBMB 构建了前瞻专家调度(LES) 它预测下一层可能需要的专家,并在当前层仍在计算时就开始加载它们。 随后他们叠加了多项优化: 💾 基线 SSD 加载 → 3.38 tps 👀 专家前瞻 → 6.57 ⚙️ 优化调度/加载 → 11.34 🗜️ 混合精度量化 → 17.16 🚀 + DSpark 投机解码 → 20.51 tps 相比同一手机上未优化的基线,这是 6.07 倍的加速。 ⚠️ 而且这些仍是 OpenBMB 自己的测量数据。 链接见 ALT
查看原文
This new-ish 35B multimodal model went from 3.38 → 20.51 tps on an iPhone. MiniCPM-V 4.7 35B-A3B was updated to decode faster on the iPhone by improving how it moves the model between storage and memory. Constraints 🧠 35B total / ~3B active 📱 iPhone 18 Pro Max — 12GB RAM 👁️ image + multi-image + video understanding Most of those 35B weights don't sit in RAM. The experts can stay in the phone's flash storage and get loaded when they're actually needed. Normally that's slow 🐌 SSD expert loading → 3.38 t/s So OpenBMB built Lookahead Expert Scheduling (LES) It predicts which experts the next layer will probably need and starts loading them while the current layer is still computing. Then they stacked the optimizations: 💾 baseline SSD loading → 3.38 tps 👀 expert lookahead → 6.57 ⚙️ optimized scheduling/loading → 11.34 🗜️ mixed-precision quantization → 17.16 🚀 + DSpark speculative decoding → 20.51 tps That's a 6.07× speedup over the same-phone unoptimized baseline. ⚠️ And these are still OpenBMB's own measurements. Link in ALT
正文 · AI 翻译
喜欢这个拆解!🔥 在 iPhone 上从 3.38 提升到 20.51 tokens/s——这是推理优化如何释放强大端侧 AI 能力的绝佳例子。
感谢突出 MiniCPM-V 4.7 背后的工程工作!🚀💙