跳到正文
OpenBMB· @OpenBMB · X·· 3 小时前精选AI 评分73
AI 导读

OpenBMB 介绍 MiniCPM-V 4.7 端侧高效推理背后的 Lookahead Expert Scheduling(LES)技术。该模型总参数 35B、每 token 激活 3B,专家权重存于闪存。

推荐理由

原文拆解了 LES 如何让 35B MoE 模型在手机上跑到 20.51 tokens/s,方法细节可迁移到端侧推理优化。

正文 · 原文

📱 A 35B MoE model running on a phone at over 20 tokens/s.

Meet Lookahead Expert Scheduling (LES), the inference technology behind MiniCPM-V 4.7’s efficient on-device performance.

🧠 The challenge: 35B total parameters, 3B activated per token, and limited device memory. Keeping experts in flash storage makes the model fit, but loading their weights can leave computation waiting.

LES co-optimizes expert loading, compute scheduling, and weight access:

⚡ Expert prefetch and compute scheduling: Cross-layer routing prediction prefetches experts the next layer is likely to need. Experts selected by the actual router that are already loaded compute first, while the remaining required experts load in parallel. Prediction only guides prefetch and scheduling: every required expert is still loaded and used. No additional training is needed.

💾 Weight access optimization: Repack expert weights into contiguous storage to reduce scattered reads, and apply precise layer-wise mixed-precision quantization to reduce weight storage and transfer costs while preserving model capability.

We also adapted DSpark speculative sampling to work alongside LES in the on-device inference pipeline.

In our iPhone 18 Pro Max tests, the full system reaches 20.51 tokens/s, up from a 3.38 tokens/s on-demand loading baseline: 6.07× faster.
🔗 https://x.com/OpenBMB/status/2112529266537639962?s=20

The original model architecture and expert routing stay intact. Smarter scheduling makes larger models practical on-device.

👉 MiniCPM-V GitHub: http://github.com/OpenBMB/MiniCPM-V
🤗 Model info: http://huggingface.co/collections/openbmb/minicpm-v-47
💻 Technical Details: https://github.com/tc-mb/llama.cpp-omni/blob/master/docs/les/lookahead-expert-scheduling.md

#MiniCPM #OnDeviceAI #OpenSource

引用OpenBMB@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
在 X 查看被引用的帖子

来源:OpenBMB · x.com