SiblingAttention:通过张量-向量专业化实现高效的预填-解码注意力并行
SiblingAttention: Efficient Prefill-Decode Attention Parallelism via Tensor-Vector Specialization
AI总结:
本文提出 SiblingAttention 注意力内核,通过张量-向量专业化实现SM内预填-解码并行,缓解计算单元争用,在Hopper GPU上较POD-Attention获最高2.07倍加速,集成vLLM后提升吞吐量、降低首token延迟
摘要:
为提升GPU利用率,现代大语言模型(LLM)服务系统采用混合批处理与分块预填技术,共同处理预填与解码请求。这类批处理虽能自然实现模型 token 层中预填与解码 token 的联合处理,但注意力机制需专用技术才能利用预填-解码并行性。POD-Attention 支持在同一GPU流式多处理器(SM)内并发执行预填-解码注意力,但预填与解码注意力对张量单元(Tensor Cores)的争用会导致串行化,同时使向量单元(CUDA Cores)未被充分利用。本文提出 SiblingAttention,一种通过张量-向量专业化实现有效SM内预填-解码并行性的注意力内核。SiblingAttention 将每个持久CTA内的 warp 组专业化,使其分别执行预填或解码注意力,将其主要计算分别映射到张量与向量单元,从而缓解计算单元争用。在此基础上,引入片上存储优化,减少单个 warp 组的内存占用,并非对称分配寄存器与共享内存资源,确保预填-解码注意力在硬件约束下共存。此外,开发自适应工作块调度,允许预填 warp 组切换角色并原子获取剩余解码工作块,缓解解码密集场景下的工作负载不平衡。在Hopper GPU上的评估显示,在多种混合批处理配置下,SiblingAttention 相较于 POD-Attention 在预填-解码注意力上实现最高2.07倍的平均加速,并行效率接近最优;当集成到vLLM中时,相较于POD-Attention,SiblingAttention进一步将端到端服务吞吐量提升最高15.4%,并将P95首token延迟(TTFT)降低最高27.7%。
英文摘要:
To improve GPU utilization, modern large language model (LLM) serving systems leverage hybrid batching and chunked prefill techniques to process prefill and decode requests together. While such batching naturally enables joint processing of prefill and decode tokens in the model's token-wise layers, attention requires dedicated techniques to exploit prefill-decode parallelism. POD-Attention enables concurrent prefill-decode attention execution within the same GPU streaming multiprocessor (SM), but contention between prefill and decode attention for tensor units (Tensor Cores) causes serialization while leaving vector units (CUDA Cores) underutilized. In this paper, we propose SiblingAttention, an attention kernel that enables effective intra-SM prefill-decode parallelism via tensor-vector specialization. SiblingAttention specializes warpgroups within each persistent CTA to execute either prefill or decode attention, mapping their major computations to the tensor and vector units, respectively, thus mitigating compute unit contention. Building on this, we introduce on-chip storage optimizations that reduce the memory footprints of individual warpgroups and asymmetrically allocate the register and shared memory resources, ensuring prefill-decode attention co-residency under hardware constraints. Furthermore, we develop adaptive work-tile scheduling that allows prefill warpgroups to switch roles and atomically acquire remaining decode work tiles, alleviating workload imbalance under decode-heavy scenarios. Evaluations on Hopper GPUs show that SiblingAttention achieves up to 2.07x mean speedup in prefill-decode attention over POD-Attention across diverse hybrid batch configurations, with near-optimal parallelism efficiency. When integrated into vLLM, SiblingAttention further improves end-to-end serving throughput by up to 15.4% and reduces P95 TTFT by up to 27.7% over POD-Attention.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。