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

通过交错并发请求加速基于卸载的MoE推理

Accelerating Offloading-Based MoE Inference by Interleaving Concurrent Requests

Seoul National University(首尔大学);Yale University(耶鲁大学)

Hongseung Yu, In Gim, Kyunghan Lee, Lin Zhong

AI总结:

研究针对MoE推理中预取的缺陷,提出Bevy系统,通过自平衡调度器交错并发请求,实现计算与获取重叠,大幅提升解码吞吐量。

摘要:

专家卸载技术使大型混合专家(MoE)语言模型能够在本地运行,但传统的批处理方式会在获取缺失专家时导致GPU停滞。一种常用的补救措施是预取,即预测未来需要的专家并利用空闲链路带宽获取它们,然而预测不准确会浪费带宽和GPU内存来获取不必要的专家。我们的关键发现是,当GPU内存中存在专家缓存时,预取可能会产生负面影响,因为随着缓存包含更多必要专家,专家预测的准确性会降低。我们的关键见解是,适当的请求调度优于预取。基于这一见解,我们提出了Bevy,一个基于超前推理的MoE推理系统,用于处理并发请求。其专家可用的请求可以超前运行到后续层,而其他请求则等待获取,从而揭示其后续需要的专家。Bevy随后可以在计算就绪请求的同时获取如此识别出的缺失专家,在不预测专家选择的情况下重叠计算和获取。然而,单独运行请求会重复读取GPU内存中的共享权重并增加计算时间。为了限制这一成本,Bevy的自平衡调度器在每一层对就绪请求进行批处理,并优先处理滞后请求,根据专家可用性的变化调整它们的分组。在两个本地平台上,Bevy的解码吞吐量是this http URL的3.46倍,是最快预取基线的1.55倍。

英文摘要:

Expert offloading enables large mixture-of-experts (MoE) language models to run locally, but conventional batching stalls the GPU while missing experts are fetched. A popular remedy, known as prefetching, is to predict what experts will be needed soon and fetch them using idle link bandwidth. Imprecise prediction, however, wastes bandwidth and GPU memory on fetching unnecessary experts. Our key finding is that prefetching can be harmful when there is an expert cache in GPU memory. This is because as the cache includes more necessary experts, expert prediction becomes less precise. Our key insight is that proper request scheduling beats prefetching. Building on this insight, we present Bevy, an MoE inference system based on runahead inference for concurrent requests. A request whose experts are available can run ahead to later layers while other requests wait for fetches, revealing the experts it needs next. Bevy can then fetch the missing experts so identified while computing ready requests, overlapping computation and fetching without predicting expert selections. Running requests separately, however, repeats reads of shared weights in GPU memory and increases compute time. To limit this cost, Bevy's self-balancing scheduler batches ready requests at each layer and prioritizes lagging requests, adapting their grouping as expert availability changes. Across two local platforms, Bevy delivers up to 3.46$\times$ the decode throughput of llama.cpp and up to 1.55$\times$ that of the fastest prefetching baseline.

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

↑