OpenBMB 介绍 MiniCPM-V 4.7 端侧高效推理背后的 Lookahead Expert Scheduling(LES)技术。该模型总参数 35B、每 token 激活 3B,专家权重存于闪存。
原文拆解了 LES 如何让 35B MoE 模型在手机上跑到 20.51 tokens/s,方法细节可迁移到端侧推理优化。
📱 一个 35B 的 MoE 模型在手机上运行,速度超过 20 tokens/s。
认识一下前瞻专家调度(LES),这是 MiniCPM-V 4.7 高效端侧性能背后的推理技术。
🧠 挑战:总参数 35B,每个 token 激活 3B,设备内存有限。将专家保留在闪存中能让模型装得下,但加载它们的权重会让计算等待。
LES 协同优化专家加载、计算调度和权重访问:
⚡ 专家预取与计算调度:跨层路由预测会预取下一层可能需要的专家。由实际路由器选中且已加载的专家优先计算,其余所需的专家并行加载。预测仅用于指导预取和调度:每个所需的专家仍会被加载和使用。无需额外训练。
💾 权重访问优化:将专家权重重新打包为连续存储以减少分散读取,并应用精确的逐层混合精度量化,在保持模型能力的同时降低权重存储和传输成本。
我们还将 DSpark 投机采样适配为在端侧推理流水线中与 LES 协同工作。
在我们的 iPhone 18 Pro Max 测试中,整个系统达到 20.51 tokens/s,相比按需加载基线的 3.38 tokens/s 提升了 6.07 倍。
🔗 https://x.com/OpenBMB/status/2112529266537639962?s=20
原始模型架构和专家路由保持完整。更智能的调度让更大的模型在端侧变得实用。
👉 MiniCPM-V GitHub:http://github.com/OpenBMB/MiniCPM-V
🤗 模型信息:http://huggingface.co/collections/openbmb/minicpm-v-47
💻 技术细节:https://github.com/tc-mb/llama.cpp-omni/blob/master/docs/les/lookahead-expert-scheduling.md
#MiniCPM #OnDeviceAI #OpenSource
35B 多模态 AI。在 iPhone 上本地运行。现在速度已超过 20 tokens/秒。🚀 MiniCPM-V 4.7 在 iPhone 18 Pro Max(12GB)上实现平均解码速度 20.51 tokens/秒——相比同一设备未经优化的 SSD 专家加载基线,提速 6.07 倍。 ⚡ 速度背后的技术:前瞻专家调度(LES)、优化的专家加载、细粒度量化,以及 DSpark 投机解码。 📱 观看下方全新的端侧演示。强大的多模态 AI,就在你的口袋里。 试试看 👇 🔗 GitHub:http://github.com/OpenBMB/MiniCPM-V 🤗 Hugging Face:http://huggingface.co/collections/openbmb/minicpm-v-47 LES:https://github.com/tc-mb/llama.cpp-omni/blob/master/docs/les/lookahead-expert-scheduling.md #MiniCPM #OpenBMB
原文
35B multimodal AI. Running locally on an iPhone. Now at over 20 tokens/sec. 🚀 MiniCPM-V 4.7 achieves 20.51 tokens/sec average decoding speed on iPhone 18 Pro Max (12GB) — a 6.07× speedup over the same device’s unoptimized SSD expert-loading baseline. ⚡ Behind the speed: Lookahead Expert Scheduling (LES), optimized expert loading, fine-grained quantization, and DSpark speculative decoding. 📱 Watch the new on-device demo below. Powerful multimodal AI, right in your pocket. Try it 👇 🔗 GitHub: http://github.com/OpenBMB/MiniCPM-V 🤗 Hugging Face: http://huggingface.co/collections/openbmb/minicpm-v-47 LES: https://github.com/tc-mb/llama.cpp-omni/blob/master/docs/les/lookahead-expert-scheduling.md #MiniCPM #OpenBMB
来源:OpenBMB · x.com