ACL 2024long7 citations

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

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

Abstract

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.

BibTeX
@inproceedings{kong-etal-2024-swapmoe,
    title = "{S}wap{M}o{E}: Serving Off-the-shelf {M}o{E}-based Large Language Models with Tunable Memory Budget",
    author = "Kong, Rui  and
      Li, Yuanchun  and
      Feng, Qingtian  and
      Wang, Weijun  and
      Ye, Xiaozhou  and
      Ouyang, Ye  and
      Kong, Linghe  and
      Liu, Yunxin",
    editor = "Ku, Lun-Wei  and
      Martins, Andre  and
      Srikumar, Vivek",
    booktitle = "Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
    month = aug,
    year = "2024",
    address = "Bangkok, Thailand",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2024.acl-long.363/",
    doi = "10.18653/v1/2024.acl-long.363",
    pages = "6710--6720"
}
SwapMoE: Serving Off-the-shelf MoE-based Large Language Models with Tunable Memory Budget · ACL 2024