通过跨层门控预测,实现边缘端MoE模型的高效推理。
Fate: Fast Edge Inference of Mixture-of-Experts Models via Cross-Layer Gate
- 利用相邻层门控输入预判专家激活,无需额外算力。
- 专家命中率达99%,预填充与解码速度提升超4倍。
- 适配资源受限设备,支持不同内存预算下的可扩展优化。
大型语言模型在各类任务中表现优异,其在边缘场景的应用备受关注。然而,稀疏激活的混合专家(MoE)模型虽适合边缘部署,却因高内存需求未受足够重视。现有基于卸载的方法在专家预测上存在困难,不准确的预测会导致推理延迟。为此,我们提出Fate,一种专为MoE模型设计的卸载系统,可在资源受限环境下实现高效推理。其核心思路是利用相邻层的门控输入进行专家预取,实现高精度预测且无额外GPU开销。同时,Fate采用浅层优先的专家缓存策略,使专家命中率提升至99%。此外,系统集成定制化量化策略以优化缓存与I/O效率。实验表明,相比Load on Demand和基于专家激活路径的方法,Fate在预填充阶段最高提速4.5倍和1.9倍,在解码阶段最高提速4.1倍和2.2倍,同时保持推理质量。性能提升在不同内存预算下均具可扩展性。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。