arXiv:2509.08342cs.LGcs.AI2025-09被引 8

通过分段缓存专家模型,显著降低大语言模型推理的显存占用和延迟。

Accelerating Mixture-of-Expert Inference with Adaptive Expert Split Mechanism

  • 将每个专家垂直拆分为上下两段,只缓存热门专家的上半部分以提升缓存效率。
  • 动态预测并预加载下一层次激活的专家,减少数据加载时间,实现计算与传输重叠。
  • 自适应调节显存分配和拆分比例,适配不同模型和硬件条件下的高效推理。

混合专家(MoE)已成为现代大语言模型的有前景架构,但海量参数带来巨大的显存(VRAM)需求,限制了其广泛应用。将专家参数卸载到CPU内存可有效缓解显存压力。现有方法通常仅在显存中缓存少量专家,并在推理时动态从内存加载,导致缓存命中率低、加载延迟高,严重拖慢推理速度。本文提出MoEpic,一种高效的MoE推理系统,引入新型专家分段机制:每个专家被垂直划分为上下两部分,系统仅缓存热专家的上半部分,从而在有限显存预算下容纳更多专家,提升缓存命中率。推理过程中,系统预测并预加载下一层次激活的专家;由于已缓存的上半部分无需重新加载,显著缩短了数据传输时间,支持高效的数据传输与计算重叠。然而,MoEpic性能高度依赖缓存配置(如每层显存预算和专家拆分比)。为此,我们设计基于定点迭代的分治算法,实现自适应缓存配置。在多个主流MoE大语言模型上的实验表明,MoEpic可节省约一半的GPU成本,同时将推理延迟降低37.51%至65.73%。

原文摘要 · Abstract (English)

Mixture-of-Experts (MoE) has emerged as a promising architecture for modern large language models (LLMs). However, massive parameters impose heavy GPU memory (i.e., VRAM) demands, hindering the widespread adoption of MoE LLMs. Offloading the expert parameters to CPU RAM offers an effective way to alleviate the VRAM requirements for MoE inference. Existing approaches typically cache a small subset of experts in VRAM and dynamically prefetch experts from RAM during inference, leading to significant degradation in inference speed due to the poor cache hit rate and substantial expert loading latency. In this work, we propose MoEpic, an efficient MoE inference system with a novel expert split mechanism. Specifically, each expert is vertically divided into two segments: top and bottom. MoEpic caches the top segment of hot experts, so that more experts will be stored under the limited VRAM budget, thereby improving the cache hit rate. During each layer's inference, MoEpic predicts and prefetches the activated experts for the next layer. Since the top segments of cached experts are exempt from fetching, the loading time is reduced, which allows efficient transfer-computation overlap. Nevertheless, the performance of MoEpic critically depends on the cache configuration (i.e., each layer's VRAM budget and expert split ratio). To this end, we propose a divide-and-conquer algorithm based on fixed-point iteration for adaptive cache configuration. Extensive experiments on popular MoE LLMs demonstrate that MoEpic can save about half of the GPU cost, while lowering the inference latency by about 37.51%-65.73% compared to the baselines.

MoE推理加速显存优化大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。