arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.10375cs.DCcs.LG
收藏

DAOP:面向高效混合专家(MoE)推理的数据感知卸载与预测预计算

DAOP: Data-Aware Offloading and Predictive Pre-Calculation for Efficient MoE Inference

School of Computing, National University of Singapore(计算学院,新加坡国立大学)

Yujie Zhang, Shivam Aggarwal, Tulika Mitra

AI总结:

本文针对MoE模型在内存受限设备部署中因GPU内存有限导致的频繁数据传输抵消速度优势的问题,提出DAOP推理引擎,通过动态分配专家、选择性预计算等优化,性能优于传统方法且保持精度。

摘要:

混合专家(MoE)模型虽在各类机器学习任务中表现出色,但在内存受限设备上面临严峻部署挑战。GPU推理速度快,但其内存相较于CPU有限,无法同时存储所有专家,需频繁从CPU内存进行代价高昂的数据传输,这往往抵消了GPU的速度优势。为解决该问题,本文提出DAOP,一种优化GPU-CPU并行执行的设备端MoE推理引擎。DAOP基于每序列激活模式动态在CPU与GPU间分配专家,并选择性在CPU上预计算预测专家以最小化传输延迟。该方法在各类专家缓存比例下实现高效资源利用,同时通过新颖的优雅降级机制保持模型精度。在各类数据集上的综合评估显示,DAOP的性能优于传统专家缓存与预取方法达8.20倍,优于卸载技术达1.35倍,且能维持精度。

英文摘要:

Mixture-of-Experts (MoE) models, though highly effective for various machine learning tasks, face significant deployment challenges on memory-constrained devices. While GPUs offer fast inference, their limited memory compared to CPUs means not all experts can be stored on the GPU simultaneously, necessitating frequent, costly data transfers from CPU memory, often negating GPU speed advantages. To address this, we present DAOP, an on-device MoE inference engine to optimize parallel GPU-CPU execution. DAOP dynamically allocates experts between CPU and GPU based on per-sequence activation patterns, and selectively pre-calculates predicted experts on CPUs to minimize transfer latency. This approach enables efficient resource utilization across various expert cache ratios while maintaining model accuracy through a novel graceful degradation mechanism. Comprehensive evaluations across various datasets show that DAOP outperforms traditional expert caching and prefetching methods by up to 8.20x and offloading techniques by 1.35x while maintaining accuracy.

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

↑