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

HexGen-2:异构环境下大语言模型的解耦式生成推理

HexGen-2: Disaggregated Generative Inference of LLMs in Heterogeneous Environment

Youhe Jiang, Ran Yan, Binhang Yuan

AI总结:

针对异构GPU部署LLM解耦推理范式的开放问题,本文提出HexGen-2分布式系统,通过调度算法优化资源分配与通信效率,在异构环境下实现高效经济的LLM服务,提升吞吐量并降低延迟与成本。

摘要:

解耦预填充和解码阶段是大语言模型(LLM)生成推理的一种有效新范式,可消除预填充-解码干扰并优化资源分配。然而,如何在一组异构GPU上部署解耦推理范式仍是一个开放问题,这可能是在同构高性能GPU上部署的经济替代方案。为此,我们引入HexGen-2,这是一个遵循解耦范式在异构GPU上高效且经济地服务LLM的分布式系统。HexGen-2基于HexGen构建,其核心组件是一个调度算法,该算法将异构GPU和网络连接上的解耦LLM推理计算和通信分配形式化为约束优化问题。我们利用图划分和最大流算法共同优化资源分配、不同推理阶段的并行策略以及阶段间键值(KV)缓存通信的效率。我们对HexGen-2进行了广泛实验,即在各种现实场景中对OPT(30B)和Llama-2(70B)模型进行测试,结果显示HexGen-2在相同价格预算下,服务吞吐量最高提升2.0倍,平均提升1.3倍,平均推理延迟降低1.5倍,且在价格预算降低30%时仍能达到相当的推理性能。

英文摘要:

Disaggregating the prefill and decoding phases represents an effective new paradigm for generative inference of large language models (LLM), which eliminates prefill-decoding interference and optimizes resource allocation. However, it is still an open problem about how to deploy the disaggregated inference paradigm across a group of heterogeneous GPUs, which can be an economical alternative to deployment over homogeneous high-performance GPUs. Towards this end, we introduce HexGen-2, a distributed system for efficient and economical LLM serving on heterogeneous GPUs following the disaggregated paradigm. Built on top of HexGen, the core component of HexGen-2 is a scheduling algorithm that formalizes the allocation of disaggregated LLM inference computations and communications over heterogeneous GPUs and network connections as a constraint optimization problem. We leverage the graph partitioning and max-flow algorithms to co-optimize resource allocation, parallel strategies for distinct inference phases, and the efficiency of inter-phase key-value (KV) cache communications. We conduct extensive experiments to evaluate HexGen-2, i.e., on OPT (30B) and Llama-2 (70B) models in various real-world settings, the results reveal that HexGen-2 delivers up to a 2.0 times and on average a 1.3 times improvement in serving throughput, reduces the average inference latency by 1.5 times compared with state-of-the-art systems given the same price budget, and achieves comparable inference performance with a 30% lower price budget.

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

↑