arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2412.00099cs.LGcs.AIcs.AR
收藏

缓存条件专家混合模型用于高效移动设备推理

Mixture of Cache-Conditional Experts for Efficient Mobile Device Inference

Contextual AI;Qualcomm AI Research

Andrii Skliar, Ties van Rozendaal, Romain Lepert, Todor Boinovski, Mart van Baalen, Markus Nagel, Paul Whatmough, Babak Ehteshami Bejnordi

AI总结:

针对内存受限移动设备上MoE部署的挑战,提出缓存感知路由策略利用专家重用提升缓存局部性,在语言建模、MMLU和GSM8K基准上实现2倍加速,且无需训练。

摘要:

混合专家(MoE)大语言模型近期因其能够通过为每个输入选择性激活专门的子网络或“专家”来增强性能而受到关注。然而,在内存受限设备上部署MoE仍然具有挑战性,尤其是在批大小为1的逐令牌顺序生成场景下,这与涉及长序列或大批量的典型高吞吐量设置不同。在这项工作中,我们针对内存受限设备(其中只有部分专家权重适合放入DRAM)优化了MoE。我们引入了一种新颖的缓存感知路由策略,该策略在令牌生成期间利用专家重用来提高缓存局部性。我们在语言建模、MMLU和GSM8K基准上评估了我们的方法,并展示了在移动设备上的设备端结果,实现了2倍的加速,提供了一种灵活、无需训练的解决方案,以扩展MoE在现实世界应用中的适用性。

英文摘要:

Mixture of Experts (MoE) LLMs have recently gained attention for their ability to enhance performance by selectively engaging specialized subnetworks or "experts" for each input. However, deploying MoEs on memory-constrained devices remains challenging, particularly when generating tokens sequentially with a batch size of one, as opposed to typical high-throughput settings involving long sequences or large batches. In this work, we optimize MoE on memory-constrained devices where only a subset of expert weights fit in DRAM. We introduce a novel cache-aware routing strategy that leverages expert reuse during token generation to improve cache locality. We evaluate our approach on language modeling, MMLU, and GSM8K benchmarks and present on-device results demonstrating 2$\times$ speedups on mobile devices, offering a flexible, training-free solution to extend MoE's applicability across real-world applications.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑