arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2502.12224cs.AIcs.LG
收藏

Fate:通过跨层门控实现混合专家模型的快速边缘推理

Fate: Fast Edge Inference of Mixture-of-Experts Models via Cross-Layer Gate

Sun Yat-sen University(中山大学);Hong Kong University of Science and Technology(香港科技大学);Huawei Technologies Co. Ltd(华为技术有限公司);Peng Cheng Laboratory(鹏城实验室)

Zhiyuan Fang, Zicong Hong, Yuegui Huang, Yufeng Lyu, Wuhui Chen, Yue Yu, Fan Yu, Zibin Zheng

AI总结:

本文提出面向边缘场景的 MoE 模型卸载系统 Fate,利用相邻层门控输入进行专家预取,并结合浅层优先缓存与量化策略,在保持推理质量的同时实现最高 4.5 倍预填充和 4.1 倍解码加速。

摘要:

大型语言模型(LLMs)已在各种任务中展现出卓越的性能,其在边缘场景中的应用也引起了广泛关注。然而,非常适合边缘场景的稀疏激活混合专家(MoE)模型由于其高内存需求而受到的关注相对较少。基于卸载的方法已被提出来应对这一挑战,但它们在专家预测方面面临困难。不准确的专家预测可能导致推理延迟延长。为了推动 MoE 模型在边缘场景中的应用,我们提出了 Fate,这是一个专为 MoE 模型设计的卸载系统,旨在资源受限环境中实现高效推理。Fate 背后的关键洞察是,相邻层的门控输入可以被有效用于专家预取,从而在不增加额外 GPU 开销的情况下实现高预测精度。此外,Fate 采用了一种偏向浅层(shallow-favoring)的专家缓存策略,将专家命中率提高到 99%。同时,Fate 集成了针对缓存优化和 IO 效率量身定制的量化策略。实验结果表明,与按需加载(Load on Demand)和基于专家激活路径(Expert Activation Path-based)的方法相比,Fate 在预填充(prefill)速度上分别实现了最高 4.5 倍和 1.9 倍的加速,在解码(decoding)速度上分别实现了最高 4.1 倍和 2.2 倍的加速,同时保持了推理质量。此外,Fate 的性能提升在不同内存预算下具有可扩展性。

英文摘要:

Large Language Models (LLMs) have demonstrated impressive performance across various tasks, and their application in edge scenarios has attracted significant attention. However, sparse-activated Mixture-of-Experts (MoE) models, which are well suited for edge scenarios, have received relatively little attention due to their high memory demands. Offload-based methods have been proposed to address this challenge, but they face difficulties with expert prediction. Inaccurate expert predictions can result in prolonged inference delays. To promote the application of MoE models in edge scenarios, we propose Fate, an offloading system designed for MoE models to enable efficient inference in resource-constrained environments. The key insight behind Fate is that gate inputs from adjacent layers can be effectively used for expert prefetching, achieving high prediction accuracy without additional GPU overhead. Furthermore, Fate employs a shallow-favoring expert caching strategy that increases the expert hit rate to 99\%. Additionally, Fate integrates tailored quantization strategies for cache optimization and IO efficiency. Experimental results show that, compared to Load on Demand and Expert Activation Path-based method, Fate achieves up to 4.5x and 1.9x speedups in prefill speed and up to 4.1x and 2.2x speedups in decoding speed, respectively, while maintaining inference quality. Moreover, Fate's performance improvements are scalable across different memory budgets.

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

↑