DeepSpeed-FastGen: High-throughput Text Generation for LLMs via MII and DeepSpeed-Inference

📄 arXiv: 2401.08671v1 📥 PDF

作者: Connor Holmes, Masahiro Tanaka, Michael Wyatt, Ammar Ahmad Awan, Jeff Rasley, Samyam Rajbhandari, Reza Yazdani Aminabadi, Heyang Qin, Arash Bakhtiari, Lev Kurilenko, Yuxiong He

分类: cs.PF, cs.LG

发布日期: 2024-01-09


💡 一句话要点

提出DeepSpeed-FastGen以解决大语言模型高吞吐量与低延迟问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大语言模型 高吞吐量 低延迟 动态SplitFuse DeepSpeed 推理优化 负载均衡 模型服务

📋 核心要点

  1. 现有框架在处理长提示时,难以同时满足高吞吐量与低延迟的需求,影响了大语言模型的应用效果。
  2. 本文提出DeepSpeed-FastGen,通过动态SplitFuse策略优化提示与生成组合,显著提升系统性能。
  3. 实验结果表明,DeepSpeed-FastGen在吞吐量和延迟方面均有显著改善,最高可实现2.3倍的吞吐量提升。

📝 摘要(中文)

随着大语言模型(LLMs)在各类应用中的广泛部署与扩展,对高吞吐量和低延迟的服务系统需求日益增加。现有框架在处理长提示时难以平衡这些需求。本文提出DeepSpeed-FastGen系统,采用动态SplitFuse策略,实现了最高2.3倍的有效吞吐量提升,平均延迟降低2倍,以及最高3.7倍的尾延迟降低。通过DeepSpeed-MII与DeepSpeed-Inference的协同组合,DeepSpeed-FastGen为LLMs提供了高效易用的服务系统,支持多种模型和不同的部署选项。我们详细介绍了基准测试方法,分析了延迟-吞吐量曲线,并探讨了负载均衡的可扩展性。评估结果显示在多种模型和硬件配置下均有显著的吞吐量和延迟改善。

🔬 方法详解

问题定义:本文旨在解决现有大语言模型服务系统在高吞吐量与低延迟之间的平衡问题,尤其是在处理长提示时的性能瓶颈。

核心思路:DeepSpeed-FastGen通过引入动态SplitFuse策略,优化提示与生成的组合方式,从而提高系统的整体吞吐量和降低延迟。该设计旨在通过更高效的资源利用来满足实际应用需求。

技术框架:系统架构包括DeepSpeed-MII和DeepSpeed-Inference模块,前者负责模型的高效管理,后者则专注于推理过程的优化。整体流程涵盖了模型加载、提示处理、生成输出等多个阶段。

关键创新:最重要的创新在于动态SplitFuse策略的引入,使得提示与生成过程能够更灵活地适应不同的输入情况,从而在吞吐量和延迟上实现显著提升。与现有方法相比,该策略提供了更高的适应性和效率。

关键设计:在具体实现中,DeepSpeed-FastGen采用了非持久和持久部署选项,支持多种模型配置,并通过精细的参数调优和负载均衡策略,确保在不同硬件环境下均能发挥最佳性能。具体的损失函数和网络结构细节在论文中有详细描述。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,DeepSpeed-FastGen在吞吐量上实现了最高2.3倍的提升,平均延迟降低了2倍,尾延迟降低幅度达到3.7倍。这些结果相较于当前最先进的系统vLLM,展现了显著的性能优势,证明了该方法的有效性。

🎯 应用场景

DeepSpeed-FastGen的研究成果可广泛应用于需要实时响应的大语言模型服务场景,如在线客服、智能助手和内容生成等。其高效的吞吐量和低延迟特性将提升用户体验,并推动大语言模型在商业和科研中的应用。未来,该系统的扩展性和对新硬件的支持将进一步拓宽其应用领域。

📄 摘要(原文)

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.