arXiv:2504.09345cs.DCcs.AI2025-04被引 6

MoE-Lens让稀疏模型在资源受限下逼近硬件极限,推理速度最高快25.5倍。

MoE-Lens: Towards the Hardware Limit of High-Throughput MoE LLM Serving Under Resource Constraints

  • 构建全局性能模型,融合硬件与执行机制,精准定位瓶颈
  • 实测平均提速4.6倍,最高速率达25.5倍,理论预测准确率94%
  • 适合部署在显存有限的边缘/云端推理场景

稀疏激活的专家混合(MoE)大模型可在不线性增加计算成本的前提下扩展规模。但在显存受限环境下,其庞大参数量导致无法容纳全部权重,通常采用CPU-GPU混合执行:GPU处理密集型GEMM运算,CPU处理轻量级注意力机制。此架构带来核心挑战:如何优化跨设备资源利用?现有工作基于范围有限的性能模型进行系统优化,未能捕捉硬件特性与执行机制间的复杂交互,因此既未识别也未达到硬件上限。本文提出MoE-Lens,一个面向资源受限环境的高吞吐MoE大模型推理系统,通过全面性能建模分析CPU内存、GPU算力及工作负载特征,明确理论性能上限,并精准预测可实现吞吐量。基于该模型,MoE-Lens实现了逼近硬件极限的推理系统。在多种MoE模型和数据集上评估,其平均性能优于当前最优方案4.6倍(最高达25.5倍),理论模型预测准确率达平均94%。

原文摘要 · Abstract (English)

Mixture of Experts (MoE) LLMs, characterized by their sparse activation patterns, offer a promising approach to scaling language models while avoiding proportionally increasing the inference cost. However, their large parameter sizes present deployment challenges in resource-constrained environments with limited GPU memory capacity, as GPU memory is often insufficient to accommodate the full set of model weights. Consequently, typical deployments rely on CPU-GPU hybrid execution: the GPU handles compute-intensive GEMM operations, while the CPU processes the relatively lightweight attention mechanism. This setup introduces a key challenge: how to effectively optimize resource utilization across CPU and GPU? Prior work has designed system optimizations based on performance models with limited scope. Specifically, such models do not capture the complex interactions between hardware properties and system execution mechanisms. Therefore, previous approaches neither identify nor achieve the hardware limit. This paper presents MoE-Lens, a high-throughput MoE LLM inference system designed through holistic performance modeling for resource-constrained environments. Our performance model thoroughly analyzes various fundamental system components, including CPU memory capacity, GPU compute power, and workload characteristics, to understand the theoretical performance upper bound of MoE inference. Furthermore, it captures the system execution mechanisms to identify the key hardware bottlenecks and accurately predict the achievable throughput. Informed by our performance model, MoE-Lens introduces an inference system approaching hardware limits. Evaluated on diverse MoE models and datasets, MoE-Lens outperforms the state-of-the-art solution by 4.6x on average (up to 25.5x), with our theoretical model predicting performance with an average 94% accuracy.

MoE模型推理优化资源受限性能建模

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