arXiv:2410.10759cs.DCcs.LG2024-10被引 27

通过协同推理优化大模型部署,提升服务器吞吐量

SplitLLM: Collaborative Inference of LLMs for Model Placement and Throughput Optimization

  • 设计服务端与客户端协同推理架构,动态分配计算任务
  • 减少约1/3服务器负载,相比贪心方法提升19%吞吐
  • 适合资源受限环境下多类型大模型请求的高效部署

近年来,大语言模型(LLMs)成为颠覆性创新,在自然语言理解、信息检索、翻译、聊天机器人等领域广泛应用。然而,由于参数量巨大以及Transformer架构中自注意力机制对序列长度呈二次复杂度,导致推理阶段计算与内存开销极高,尤其在长序列场景下吞吐受限。本文提出一种服务端与客户端协同推理架构,综合考虑双方的计算与通信成本,设计基于动态规划的算法,实现计算任务的最优分配,在不违反服务等级协议(SLA)的前提下提升服务器吞吐。实验表明,该方法可使服务器负载降低约1/3,相比贪心策略提升19%性能,有效改善异构请求环境下的系统吞吐。

原文摘要 · Abstract (English)

Large language models (LLMs) have been a disruptive innovation in recent years, and they play a crucial role in our daily lives due to their ability to understand and generate human-like text. Their capabilities include natural language understanding, information retrieval and search, translation, chatbots, virtual assistance, and many more. However, it is well known that LLMs are massive in terms of the number of parameters. Additionally, the self-attention mechanism in the underlying architecture of LLMs, Transformers, has quadratic complexity in terms of both computation and memory with respect to the input sequence length. For these reasons, LLM inference is resource-intensive, and thus, the throughput of LLM inference is limited, especially for the longer sequences. In this report, we design a collaborative inference architecture between a server and its clients to alleviate the throughput limit. In this design, we consider the available resources on both sides, i.e., the computation and communication costs. We develop a dynamic programming-based algorithm to optimally allocate computation between the server and the client device to increase the server throughput, while not violating the service level agreement (SLA). We show in the experiments that we are able to efficiently distribute the workload allowing for roughly 1/3 reduction in the server workload, while achieving 19 percent improvement over a greedy method. As a result, we are able to demonstrate that, in an environment with different types of LLM inference requests, the throughput of the server is improved.

大模型推理协同计算吞吐优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。