arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2308.15030cs.AI
收藏

SwapMoE:以可调内存预算服务现成的基于MoE的大型语言模型

SwapMoE: Serving Off-the-shelf MoE-based Large Language Models with Tunable Memory Budget

Shanghai Jiao Tong University(上海交通大学);Institute for AI Industry Research (AIR), Tsinghua University(清华大学人工智能产业研究院);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室);National University of Singapore(新加坡国立大学);AsiaInfo Technologies (China), Inc.(亚信科技(中国)有限公司)

Rui Kong, Yuanchun Li, Qingtian Feng, Weijun Wang, Xiaozhou Ye, Ye Ouyang, Linghe Kong, Yunxin Liu

AI总结:

SwapMoE通过动态保留虚拟专家并维护映射,在可调内存预算下高效服务MoE模型,显著降低内存和延迟,同时保持精度。

摘要:

混合专家(MoE)是一种流行的技术,通过条件激活的并行专家来提高大型语言模型(LLMs)的能力。然而,由于参数规模庞大,在内存受限的设备上服务MoE模型具有挑战性。典型解决方案如内存交换或专家剪枝可能导致显著更高的延迟或严重的精度损失。在本文中,我们介绍了SwapMoE,一个用于以可调内存预算高效服务基于MoE的大型语言模型的框架。SwapMoE的主要思想是在主内存中保留一小部分动态的重要专家,即虚拟专家,用于推理,同时无缝维护虚拟专家与实际专家之间的映射。实验表明,SwapMoE可以在保持合理精度的同时减少内存占用。例如,在使用Switch Transformer的文本摘要任务中,SwapMoE可以将内存消耗从14.2 GiB减少到4.7 GiB,同时延迟降低50%,Rouge-2分数仅轻微下降0.041。

英文摘要:

Mixture of experts (MoE) is a popular technique to improve capacity of Large Language Models (LLMs) with conditionally-activated parallel experts. However, serving MoE models on memory-constrained devices is challenging due to the large parameter size. Typical solutions such as memory swapping or expert pruning may lead to significantly higher latency or severe accuracy loss. In this paper, we introduce SwapMoE, a framework for efficient serving of MoE-based large language models with tunable memory budgets. The main idea of SwapMoE is to keep a small dynamic set of important experts, namely Virtual Experts, in the main memory for inference, while seamlessly maintaining how the Virtual Experts map to the actual experts. Experiments have shown that SwapMoE can reduce the memory footprint while maintaining reasonable accuracy. For example, on text summarization tasks with Switch Transformer, SwapMoE can reduce the memory consumption from 14.2 GiB to 4.7 GiB, together with 50\% latency reduction and a slight Rouge-2 score drop of 0.041.

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

↑