arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2410.18038cs.LGcs.DC
收藏

POD-Attention:解锁完整的 Prefill-Decode 重叠以实现更快的 LLM 推理

POD-Attention: Unlocking Full Prefill-Decode Overlap for Faster LLM Inference

University of Washington(华盛顿大学);Microsoft Research(微软研究院)

Aditya K Kamath, Ramya Prabhu, Jayashree Mohan, Simon Peter, Ramachandran Ramjee, Ashish Panwar

AI总结:

本文提出首个面向混合批次的 GPU 注意力内核 POD-Attention,通过让 prefill 与 decode 在同一多处理器并发执行来提升资源利用率,最高加速 59%。

摘要:

LLM 推理中的每个请求都经历两个阶段:计算受限的 prefill 和内存带宽受限的 decode。为提高 GPU 利用率,近期系统采用混合批处理,将不同请求的 prefill 和 decode 阶段组合到同一批次中。该方法优化了线性运算,但在注意力计算方面仍然效率低下,因为现有注意力内核分别针对 prefill 和 decode 阶段独立地专门化执行。本文提出 POD-Attention——首个高效计算混合批次注意力的 GPU 内核。POD-Attention 旨在通过谨慎分配 GPU 资源,使 prefill 和 decode 操作在同一多处理器上并发执行,从而最大化计算和内存带宽利用率。POD-Attention 将注意力计算速度最高提升 59%(平均 28%),与使用独立优化的 prefill 和 decode 注意力内核相比,可实现更高吞吐量和更低延迟的 LLM 推理。

英文摘要:

Each request in LLM inference goes through two phases: compute-bound prefill and memory-bandwidth-bound decode. To improve GPU utilization, recent systems use hybrid batching that combines the prefill and decode phases of different requests into the same batch. This approach optimizes linear operations but remains inefficient for attention computation because existing attention kernels specialize execution independently for the prefill and decode phases. In this paper, we present POD-Attention - the first GPU kernel that efficiently computes attention for hybrid batches. POD-Attention aims to maximize the utilization of both compute and memory bandwidth by carefully allocating the GPU's resources such that prefill and decode operations happen concurrently on the same multiprocessor. POD-Attention speeds up attention computation by up to $59\%$ (mean $28\%$), enabling higher throughput and lower latency LLM inference compared to the use of independently optimized prefill and decode attention kernels.

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

↑