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

MoE-Infinity:利用稀疏感知专家缓存实现个人机器上的高效 MoE 推理

MoE-Infinity: Efficient MoE Inference on Personal Machines with Sparsity-Aware Expert Cache

The University of Edinburgh(爱丁堡大学)

Leyang Xue, Yao Fu, Zhan Lu, Luo Mai, Mahesh Marina

AI总结:

针对个人机器显存有限且 MoE 推理 batch size 为 1 的场景,提出 MoE-Infinity,通过稀疏感知专家缓存追踪、分析专家激活并指导替换与预取,在 DeepSeek、Mixtral 上较 vLLM 等系统降低每 token 延迟 3.1–16.7 倍。

摘要:

本文提出 MoE-Infinity,这是一个为 GPU 显存容量有限的个人机器设计的高效 MoE 推理系统。MoE-Infinity 的核心思想是,在通常属于单用户环境的个人机器上,基于 MoE 的 LLM 通常以 batch size 为 1 运行。在这种设置下,MoE 模型表现出高度的激活稀疏性,即在 decode 阶段生成 token 时,少量专家会被频繁复用。利用这一思想,我们设计了稀疏感知专家缓存,它能够追踪推理过程中专家的稀疏激活,并谨慎选择代表稀疏模式的轨迹。通过分析这些选定的轨迹,MoE-Infinity 指导专家缓存的替换和预取;在处理不同 LLM 任务时,跨多种 MoE 模型(DeepSeek 和 Mixtral),相较于包括 vLLM、Ollama、DeepSpeed 和 BrainStorm 在内的众多最先进系统,实现了 3.1–16.7 倍的每 token 延迟改进。MoE-Infinity 的源代码已公开发布于 https://github.com/EfficientMoE/MoE-Infinity。

英文摘要:

This paper presents MoE-Infinity, an efficient MoE inference system designed for personal machines with limited GPU memory capacity. The key idea for MoE-Infinity is that on personal machines, which are often single-user environments, MoE-based LLMs typically operate with a batch size of one. In this setting, MoE models exhibit a high degree of activation sparsity, meaning a small number of experts are frequently reused in generating tokens during the decode phase. Leveraging this idea, we design a sparsity-aware expert cache, which can trace the sparse activation of experts during inference and carefully select the trace that represents the sparsity pattern. By analyzing these selected traces, MoE-Infinity guides the replacement and prefetching of the expert cache, providing 3.1-16.7x per-token latency improvements over numerous state-of-the-art systems, including vLLM, Ollama, DeepSpeed and BrainStorm across various MoE models (DeepSeek and Mixtral) when handling different LLM tasks. MoE-Infinity's source code is publicly available at https://github.com/EfficientMoE/MoE-Infinity

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

↑