arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.01814cs.LGcs.DC
收藏

基于模型-注意力解聚的高效异构大语言模型解码

Efficient Heterogeneous Large Language Model Decoding with Model-Attention Disaggregation

Tsinghua University(清华大学);ByteDance(字节跳动)

Shaoyuan Chen, Wencong Xiao, Yutong Lin, Mingxing Zhang, Yingdi Shan, Jinlei Jiang, Kang Chen, Yongwei Wu

AI总结:

本文提出模型-注意力解聚方法,将内存密集的注意力算子部署到廉价内存优化设备上,并开发了Lamina推理系统,在相似成本下实现比现有方案高16.1%~90.1%的吞吐量。

摘要:

基于Transformer的大语言模型(LLMs)在生成任务中展现出卓越性能,但由于对昂贵且面向计算优化的加速器利用效率低下,给实际服务部署带来了显著挑战。尽管已有解聚式服务架构被提出用于拆分LLM推理的不同阶段,解码阶段的效率仍然较低。其原因在于基于Transformer的LLM中不同算子对资源的需求各不相同。具体而言,注意力算子是内存密集型算子,其内存访问模式与现代加速器的优势相冲突,尤其是在长上下文请求场景下。为提高LLM解码效率,我们引入了模型-注意力解聚方法。该方法利用一组廉价且面向内存优化的设备来处理注意力算子,同时仍使用高端加速器运行模型的其他部分。这种异构配置确保每个组件都针对其特定工作负载进行定制,从而最大化整体性能和成本效率。我们的全面分析与实验证实了将注意力计算拆分到多个设备上的可行性。同时,异构设备之间所需的通信带宽被证明在现有主流网络技术下是可控的。为进一步验证我们的理论,我们开发并部署了Lamina,一个在分布式异构集群中融合了模型-注意力解聚的LLM推理系统。实验结果表明,在相似成本下,Lamina能够比现有解决方案提供高出16.1%至90.1%的估计吞吐量。

英文摘要:

Transformer-based large language models (LLMs) exhibit impressive performance in generative tasks but also introduce significant challenges in real-world serving due to inefficient use of the expensive, computation-optimized accelerators. Although disaggregated serving architectures have been proposed to split different phases of LLM inference, the efficiency of decoding phase is still low. This is caused by the varying resource demands of different operators in the transformer-based LLMs. Specifically, the attention operator is memory-intensive, exhibiting a memory access pattern that clashes with the strengths of modern accelerators, especially for long context requests. To enhance the efficiency of LLM decoding, we introduce model-attention disaggregation. This approach leverages a collection of cheap, memory-optimized devices for the attention operator while still utilizing high-end accelerators for other parts of the model. This heterogeneous setup ensures that each component is tailored to its specific workload, maximizing overall performance and cost efficiency. Our comprehensive analysis and experiments confirm the viability of splitting the attention computation over multiple devices. Also, the communication bandwidth required between heterogeneous devices proves to be manageable with prevalent networking technologies. To further validate our theory, we develop and deploy Lamina, an LLM inference system that incorporates model-attention disaggregation in a distributed heterogeneous cluster. Experimental results indicate that Lamina can provide 16.1 ~ 90.1% higher estimated throughput than existing solutions with similar costs.

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

↑