[论文解读] DeepSpeed-FastGen: High-throughput Text Generation for LLMs via MII and DeepSpeed-Inference
DeepSpeed-FastGen 使用 Dynamic SplitFuse 与 DeepSpeed-MII 和 DeepSpeed-Inference 实现更高吞吐量和更低延迟用于 LLM 文本生成,在多种 Llama-2 模型上超越 vLLM。
The deployment and scaling of large language models (LLMs) have become critical as they permeate various applications, demanding high-throughput and low-latency serving systems. Existing frameworks struggle to balance these requirements, especially for workloads with long prompts. This paper introduces DeepSpeed-FastGen, a system that employs Dynamic SplitFuse, a novel prompt and generation composition strategy, to deliver up to 2.3x higher effective throughput, 2x lower latency on average, and up to 3.7x lower (token-level) tail latency, compared to state-of-the-art systems like vLLM. We leverage a synergistic combination of DeepSpeed-MII and DeepSpeed-Inference to provide an efficient and easy-to-use serving system for LLMs. DeepSpeed-FastGen's advanced implementation supports a range of models and offers both non-persistent and persistent deployment options, catering to diverse user scenarios from interactive sessions to long-running applications. We present a detailed benchmarking methodology, analyze the performance through latency-throughput curves, and investigate scalability via load balancing. Our evaluations demonstrate substantial improvements in throughput and latency across various models and hardware configurations. We discuss our roadmap for future enhancements, including broader model support and new hardware backends. The DeepSpeed-FastGen code is readily available for community engagement and contribution.
研究动机与目标
- 激发对高吞吐、低延迟 LLM 服务的需求,针对长提示与交互工作负载。
- 介绍 Dynamic SplitFuse 作为提示生成组合策略,以提升连续批处理。
- 展示 DeepSpeed-MII 与 DeepSpeed-Inference 的集成,以提供易于使用的服务系统。
- 对不同模型和硬件进行基准测试,以量化吞吐、延迟与尾延迟的提升。
- 讨论部署选项(非持久 vs 持久)以及面向更广模型支持和硬件后端的路线图。
提出的方法
- 提出 Dynamic SplitFuse 将长提示分解为小块,在多次前向推理中调度。
- 利用连续批处理和非连续 KV 缓存以提升利用率并减少碎片化。
- 采用分块 KV 缓存以提高并发性和吞吐量。
- 将 DeepSpeed-MII 与 DeepSpeed-Inference 相结合,提供前端 API、批处理调度器和优化内核。
- 实现非持久和持久部署模式,支持可选的负载均衡以实现可扩展性。
- 通过吞吐-延迟曲线和在 SLA 约束下的有效吞吐量,对多模型和多 GPU 进行评估。

实验结果
研究问题
- RQ1Dynamic SplitFuse 是否能在长提示 LLM 工作负载下,与像 vLLM 这样的前沿系统相比,提升吞吐量和延迟?
- RQ2正向 token 数量如何随批大小变化影响延迟与吞吐量?
- RQ3负载均衡和多副本部署对总体可扩展性和 SLA 满足度有何影响?
- RQ4非持久 vs 持久部署模式如何影响可用性和在交互式与长时运行场景下的性能?
- RQ5观察到的尾延迟改善(P90/P95)以及使用 DeepSpeed-FastGen 的整体延迟稳定性如何?
主要发现
- DeepSpeed-FastGen 相比 vLLM,达到高达 2.3x 的有效吞吐量提升。
- 平均而言,延迟降低约 2x,令牌级尾延迟最高降低至 3.7x。
- 尾延迟的提升归因于并发的提示处理和生成,而非抢占。
- 跨多达 16 个副本的负载均衡实现近线性可扩展性(16 副本带来 16x 吞吐量)。
- 在 A100、H100 和 A6000 硬件上,Llama-2 70B、13B 和 7B 上均观察到性能提升。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。