提出边缘缓存优化方法,降低大模型推理延迟。
SlimCaching: Edge Caching of Mixture-of-Experts for Distributed Inference
- 基于贪心分解与动态规划,解决专家共激活带来的非可加性问题。
- 在存储受限下,使推理延迟显著低于现有基线方法。
- 适合部署大规模MoE模型的边缘计算场景,如智能终端推理。
Mixture-of-Experts(MoE)模型通过仅激活每输入相关的少数专家来提升大语言模型的可扩展性。然而,MoE模型中大量专家网络给边缘设备带来显著存储负担。为此,本文考虑专家分散于边缘网络中的分布式推理场景,基于常见的Top-K专家选择策略,构建在存储约束下最小化推理延迟的优化问题。当K=1时,问题转化为带背包约束的单调子模最大化问题,我们设计了具有(1 - 1/e)近似保证的贪心算法。对于一般情况K≥1,同一层内专家共激活导致非子模性,使贪心方法失效。为此,我们提出一种逐次贪心分解方法,将原问题分解为多个子问题,并用动态规划求解。此外,设计了一种基于最大卷积技术的加速算法,在多项式时间内获得具有理论保证的近似解。在多种MoE模型上的仿真结果表明,本方法显著降低了推理延迟。
原文摘要 · Abstract (English)
Mixture-of-Experts (MoE) models improve the scalability of large language models (LLMs) by activating only a small subset of relevant experts per input. However, the sheer number of expert networks in an MoE model introduces a significant storage/memory burden for an edge device. To address this challenge, we consider a scenario where experts are dispersed across an edge network for distributed inference. Based on the popular Top-$K$ expert selection strategy, we formulate a latency minimization problem by optimizing expert caching on edge servers under storage constraints. When $K=1$, the problem reduces to a monotone submodular maximization problem with knapsack constraints, for which we design a greedy-based algorithm with a $(1 - 1/e)$-approximation guarantee. For the general case where $K\geq1$, expert co-activation within the same MoE layer introduces non-submodularity, which renders greedy methods ineffective. To tackle this issue, we propose a successive greedy decomposition method to decompose the original problem into a series of subproblems, with each being solved by a dynamic programming approach. Furthermore, we design an accelerated algorithm based on the max-convolution technique to obtain the approximate solution with a provable guarantee in polynomial time. Simulation results on various MoE models demonstrate that our method significantly reduces inference latency compared to existing baselines.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。