gLLM:基于 Token Throttling 的分布式 LLM 服务全局均衡流水线并行系统
gLLM: Global Balanced Pipeline Parallelism System for Distributed LLM Serving with Token Throttling
AI总结:
提出gLLM全局均衡流水线并行系统,通过Token Throttling机制独立调节预填充和解码token数量,结合异步执行架构,有效缓解流水线气泡,实现11%至398%的最大吞吐量提升并保持低延迟。
摘要:
流水线并行已成为跨分布式节点部署大型语言模型(LLM)的主要方法,因为与张量并行相比,它的通信开销更低。尽管在请求服务中展现出高吞吐量,但流水线并行通常会受到流水线气泡导致的性能限制,这些气泡主要由批次间计算延迟不均衡引起。像 Sarathi-Serve 这样的现有方法试图通过使用固定 token 预算对分块预填充和解码 token 进行混合调度来解决此问题。然而,由于预填充 token 不足或解码 token 分布不均,此类方法可能会出现显著波动,最终导致计算失衡。为了克服这些低效问题,我们提出了 gLLM,这是一个全局均衡的流水线并行系统,结合了 Token Throttling 来有效缓解流水线气泡。我们的 Token Throttling 机制是一种细粒度调度策略,独立调节预填充和解码 token 的数量,从而利用推理系统的全局信息实现均衡计算。具体而言,对于解码 token,gLLM 在处理批次中保持近乎一致的 token 数量。对于预填充 token,它根据待处理 token 总数和键值缓存(KV cache)的内存利用率动态调整批次大小。此外,gLLM 运行时采用专门针对流水线并行特性优化的异步执行和消息传递架构。使用代表性 LLM 的实验评估表明,gLLM 取得了显著的性能提升,与最先进的流水线或张量并行系统相比,最大吞吐量提高了 11% 到 398%,同时保持了较低的延迟。
英文摘要:
Pipeline parallelism has emerged as a predominant approach for deploying large language models (LLMs) across distributed nodes, owing to its lower communication overhead compared to tensor parallelism. While demonstrating high throughput in request serving, pipeline parallelism often suffers from performance limitations caused by pipeline bubbles, which are primarily resulted from imbalanced computation delays across batches. Existing methods like Sarathi-Serve attempt to address this through hybrid scheduling of chunked prefill and decode tokens using a fixed token budget. However, such methods may experience significant fluctuations due to either insufficient prefill tokens or uneven distribution of decode tokens, ultimately leading to computational imbalance. To overcome these inefficiencies, we present gLLM, a globally balanced pipeline parallelism system incorporating Token Throttling to effectively mitigate the pipeline bubbles. Our Token Throttling mechanism is a fine-grained scheduling policy that independently regulates the quantities of prefill and decode tokens, thus enabling balanced computation by leveraging global information from the inference system. Specifically, for decode tokens, gLLM maintains near-consistent token count across processing batches. For prefill tokens, it dynamically adjusts batch sizes based on both total pending tokens and the memory utilization rates of key-value cache (KV cache). Furthermore, gLLM runtime adopts an asynchronous execution and message passing architecture specifically optimized for pipeline parallelism characteristics. Experimental evaluations with representative LLMs show that gLLM achieves significant performance improvements, delivering 11% to 398% higher maximum throughput compared to state-of-the-art pipeline or tensor parallelism systems, while simultaneously maintaining lower latency.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。