优化分布式大模型推理的资源分配,显著降低延迟。
Optimizing Resource Allocation for Geographically-Distributed Inference by Large Language Models

- 建立可预测性能的模型,指导模型块放置与请求路由决策。
- 提出混合整数线性规划求解方案,实现最优资源分配。
- 支持在线动态调度,适合跨地域部署的大模型系统。
大型语言模型在诸多AI任务中表现卓越,但推理成本高昂,需依赖高端GPU。为降低部署门槛,近期提出的PETALS系统将模型块分发至互联网上分布的低配GPU服务器,显著优于传统显存与慢速本地存储间参数交换的方式。然而,分布式系统的性能高度依赖资源分配策略,如何最优配置仍不明确。本文首次系统研究分布式LLM推理中的资源分配问题,聚焦模型块放置与请求路由两大决策。主要成果包括:实验验证的性能预测模型、将离线优化建模为混合整数线性规划并证明其NP难性,以及一个具有保证性能的多项式复杂度算法;进一步将该算法适配至在线场景,在负载有限条件下仍保持性能保证。通过实验与仿真验证,所提方案在多种地理分布服务器环境下,相较当前最优方法显著减少推理时间。此外,我们还开发了一个轻量级仅用CPU的模拟器,可预测GPU服务器上的分布式推理性能,助力资源受限的研究者开展大规模部署评估与未来研究。
原文摘要 · Abstract (English)
Large language models have demonstrated extraordinary performance in many AI tasks but are expensive to use, even after training, due to their requirement of high-end GPUs. Recently, a distributed system called PETALS was developed to lower the barrier for deploying LLMs by splitting the model blocks across multiple servers with low-end GPUs distributed over the Internet, which was much faster than swapping the model parameters between the GPU memory and other cheaper but slower local storage media. However, the performance of such a distributed system critically depends on the resource allocation, and how to do so optimally remains unknown. In this work, we present the first systematic study of the resource allocation problem in distributed LLM inference, with focus on two important decisions: block placement and request routing. Our main results include: experimentally validated performance models that can predict the inference performance under given block placement and request routing decisions, a formulation of the offline optimization of block placement and request routing as a mixed integer linear programming problem together with the NP-hardness proof and a polynomial-complexity algorithm with guaranteed performance, and an adaptation of the offline algorithm for the online setting with the same performance guarantee under bounded load. Through both experiments and experimentally-validated simulations, we have verified that the proposed solution can substantially reduce the inference time compared to the state-of-the-art solution in diverse settings with geographically-distributed servers. As a byproduct, we have also developed a light-weighted CPU-only simulator capable of predicting the performance of distributed LLM inference on GPU servers, which can evaluate large deployments and facilitate future research for researchers with limited GPU access.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。