通过拆分注意力计算,提升大模型服务的资源利用率和吞吐量
Injecting Adrenaline into LLM Serving: Boosting Resource Utilization and Throughput via Attention Disaggregation
- 将解码阶段的注意力计算部分卸载到预填充实例,实现资源互补
- 预填充内存利用率提升2.28倍,解码计算利用率最高增1.67倍
- 适合高并发大模型服务场景,尤其对资源受限系统有显著优化
在大语言模型(LLM)服务系统中,每个请求包含计算密集型的预填充阶段和内存密集型的解码阶段。为避免两阶段性能干扰,现有系统通常采用预填充-解码分离部署,将两阶段分配在不同机器上。然而我们发现该方法导致显著的资源浪费:预填充实例因计算密集而内存利用率低,解码实例因内存密集而计算利用率低。为此,本文提出Adrenaline,一种注意力拆分与卸载机制,旨在提升LLM服务系统的资源利用率和性能。其核心思想是将解码阶段的部分注意力计算拆分并卸载至预填充实例。由于解码阶段的注意力计算具有内存瓶颈特性,可有效实现卸载,带来双重优势:1)提升预填充实例的内存容量和带宽利用率;2)增加解码阶段批处理规模,从而提升计算利用率。Adrenaline通过三项关键技术实现:低延迟解码同步、资源高效的预填充共置以及负载感知的卸载调度。实验表明,Adrenaline使预填充实例内存容量提升2.28倍,内存带宽利用率提高2.07倍,解码实例计算利用率最高提升1.67倍,整体推理吞吐量相较当前最优系统提升1.68倍。
原文摘要 · Abstract (English)
In large language model (LLM) serving systems, executing each request consists of two phases: the compute-intensive prefill phase and the memory-intensive decoding phase. To prevent performance interference between the two phases, current LLM serving systems typically adopt prefill-decoding disaggregation, where the two phases are split across separate machines. However, we observe this approach leads to significant resource underutilization. Specifically, prefill instances that are compute-intensive suffer from low memory utilization, while decoding instances that are memory-intensive experience low compute utilization. To address this problem, this paper proposes Adrenaline, an attention disaggregation and offloading mechanism designed to enhance resource utilization and performance in LLM serving systems. Adrenaline's key innovation lies in disaggregating part of the attention computation in the decoding phase and offloading them to prefill instances. The memory-bound nature of decoding-phase attention computation inherently enables an effective offloading strategy, yielding two complementary advantages: 1) improved memory capacity and bandwidth utilization in prefill instances, and 2) increased decoding batch sizes that enhance compute utilization in decoding instances, collectively boosting overall system performance. Adrenaline achieves these gains through three key techniques: low-latency decoding synchronization, resource-efficient prefill colocation, and load-aware offloading scheduling. Experimental results show that Adrenaline achieves 2.28x higher memory capacity and 2.07x better memory bandwidth utilization in prefill instances, up to 1.67x improvements in compute utilization for decoding instances, and 1.68x higher overall inference throughput compared to state-of-the-art systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。