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

使用 EPD 解耦高效服务大型多模态模型

Efficiently Serving Large Multimodal Models Using EPD Disaggregation

Huawei Technologies Canada, BC, Canada(华为加拿大技术有限公司);Simon Fraser University, BC, Canada(西蒙弗雷泽大学);Huawei Cloud, China(华为云)

Gursimran Singh, Xinglu Wang, Yifan Hu, Timothy Yu, Linzi Xing, Wei Jiang, Zhefeng Wang, Xiaolong Bai, Yi Li, Ying Xiong, Yong Zhang, Zhenan Fan

AI总结:

提出 EPD 解耦框架,将大型多模odal模型的编码、预填充和解码阶段分离到专用资源,通过缓存多媒体 token、并行化编码负载等优化,显著提升内存效率、批处理大小及 SLO 达成率。

摘要:

大型多模态模型(LMMs)通过处理图像、音频和视频等多样化输入扩展了大型语言模型(LLMs),但代价是增加了多模态编码阶段,从而增加了计算和内存开销。这一步骤对关键服务级别目标(SLOs)产生了负面影响,例如首个 token 生成时间(TTFT)和每个输出 token 生成时间(TPOT)。我们引入了编码-预填充-解码(EPD)解耦,这是一个新颖的框架,将编码、预填充和解码阶段分离到专用资源上。与当前将编码和预填充捆绑在一起的系统不同,我们的方法将这些步骤解耦,开启了新的机遇和优化。这些包括一种缓存多媒体 token 以实现高效传输的机制、一种在请求内并行化编码负载的新颖方法、一个用于解耦服务的最优资源分配模块,以及一种处理不断变化的工作负载特征的新颖角色切换方法。对流行 LMMs 的实验评估显示,在内存效率(峰值内存利用率降低高达 15 倍)、批处理大小(增大高达 22 倍)、每请求处理图像数增多 10 倍以及 KV 缓存增大 2.2 倍方面取得了显著提升。此外,与未解耦的系统相比,它在 SLO 达成率(提升高达 90-100%)和 TTFT(降低高达 71%)方面也带来了显著改善。代码可在 https://github.com/vbdi/epdserve 获取。

英文摘要:

Large Multimodal Models (LMMs) extend Large Language Models (LLMs) by handling diverse inputs such as images, audio, and video, but at the cost of adding a multimodal encoding stage that increases both computational and memory overhead. This step negatively affects key Service Level Objectives (SLOs), such as time to first token (TTFT) and time per output token (TPOT). We introduce Encode-Prefill-Decode (EPD) Disaggregation, a novel framework that separates the encoding, prefill, and decode stages onto dedicated resources. Unlike current systems, which bundle encoding and prefill together, our approach decouples these steps, unlocking new opportunities and optimizations. These include a mechanism to cache multimedia tokens for efficient transfer, a novel way to parallelize the encoding load within a request, a module for optimal resource allocation for disaggregated serving, and a novel role-switching method to handle changing workload characteristics. Experimental evaluations with popular LMMs show substantial gains in memory efficiency (up to 15x lower peak memory utilization), batch sizes (up to 22x larger), 10x more images per request, and 2.2x larger KV caches. Furthermore, it leads to significant improvements in SLO attainment (up to 90-100% improvement) and TTFT (up to 71% reduction), compared to systems that do not disaggregate. The code is available at https://github.com/vbdi/epdserve.

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

↑