[论文解读] Splitwise: Efficient generative LLM inference using phase splitting
Splitwise 提出将生成式大语言模型(LLM)推理划分为两个独立阶段——计算密集型的提示处理和内存密集型的标记生成——分别在专用机器上执行,以提升吞吐量、降低成本并降低功耗。通过利用高带宽互连优化状态传输,Splitwise 在与基线设计相同的成本和功耗预算下,实现了高达 2.35× 的吞吐量提升。
Recent innovations in generative large language models (LLMs) have made their applications and use-cases ubiquitous. This has led to large-scale deployments of these models, using complex, expensive, and power-hungry AI accelerators, most commonly GPUs. These developments make LLM inference efficiency an important challenge. Based on our extensive characterization, we find that there are two main phases during an LLM inference request: a compute-intensive prompt computation, and a memory-intensive token generation, each with distinct latency, throughput, memory, and power characteristics. Despite state-of-the-art batching and scheduling, the token generation phase underutilizes compute resources. Specifically, unlike compute-intensive prompt computation phases, token generation phases do not require the compute capability of the latest GPUs, and can be run with lower power and cost. With Splitwise, we propose splitting the two phases of a LLM inference request on to separate machines. This allows us to use hardware that is well-suited for each phase, and provision resources independently per phase. However, splitting an inference request across machines requires state transfer from the machine running prompt computation over to the machine generating tokens. We implement and optimize this state transfer using the fast back-plane interconnects available in today's GPU clusters. We use the Splitwise technique to design LLM inference clusters using the same or different types of machines for the prompt computation and token generation phases. Our clusters are optimized for three key objectives: throughput, cost, and power. In particular, we show that we can achieve 1.4x higher throughput at 20% lower cost than current designs. Alternatively, we can achieve 2.35x more throughput with the same cost and power budgets.
研究动机与目标
- 为解决将提示计算与标记生成同时部署于高端 GPU 所导致的计算资源利用率低下及高成本问题。
- 通过解耦计算与内存工作负载,探索 LLM 推理中各阶段的硬件专业化。
- 通过阶段专用的硬件配置与低延迟状态传输,优化系统吞吐量、成本与功耗效率。
- 证明阶段分离可实现优于当前统一 GPU 推理集群的每美元性能(Perf/$)与每瓦性能(Perf/W)。
- 通过真实生产环境的推理 trace,在多样化工作负载、模型类型与系统配置下验证该方法的有效性。
提出的方法
- Splitwise 将每个 LLM 推理请求划分为两个阶段:并行、计算密集型的提示计算阶段与串行、内存受限的标记生成阶段,分别在独立机器上运行。
- 通过 Infiniband 等高速互连,采用优化的、分块传输方式,将提示阶段的键值(KV)缓存高效传输至标记生成阶段,以最小化延迟。
- 系统采用混合资源池调度策略,根据各阶段需求与资源可用性,动态将请求分配至合适的硬件池。
- 复用现有的 GPU 集群互连技术(如 Infiniband、RoCE),并通过减小数据块大小与最小化关键路径延迟,优化数据传输性能。
- 设计支持异构硬件:使用高算力 GPU(如 H100)处理提示阶段,使用高内存带宽设备(如 A100、MI-250 或配备 HBM 的 CPU)处理标记阶段。
- 基于严格的服务等级目标(SLOs),使用真实世界 LLM 推理 trace,评估吞吐量、成本与功耗优化的集群配置。
实验结果
研究问题
- RQ1在 LLM 推理中分离提示计算与标记生成阶段,能否提升系统整体吞吐量、成本效率与功耗效率?
- RQ2如何在物理分离的机器之间实现低延迟、高带宽的 KV 缓存状态传输,同时不降低端到端延迟?
- RQ3在计算与内存特性差异显著的前提下,各阶段的最优硬件配置是什么?
- RQ4阶段分离在不同工作负载、模型规模与输入标记分布下,对性能有何影响?
- RQ5阶段分离在多大程度上可减少对昂贵 GPU 的过度配置,同时仍满足严格的推理 SLO?
主要发现
- 在相同硬件条件下,Splitwise 实现 1.4× 的吞吐量提升,且成本降低 20%。
- 在相同成本与功耗预算下,Splitwise 实现的吞吐量是当前推理集群的 2.35×。
- 通过在高速互连上使用小而高效的传输块优化 KV 缓存传输,系统保持了低端到端延迟。
- 采用 H100 处理提示阶段、A100 处理标记阶段的优化集群,在相同成本下实现 1.76× 的吞吐量提升,功耗降低 15%。
- 该方法在不同工作负载下表现稳健,并支持异构硬件,包括 CPU 与 AMD MI-250 GPU 用于标记生成阶段。
- 在高负载下,Splitwise 集群因混合批处理而趋近于基线行为,但仍优于基线在吞吐量/美元与吞吐量/瓦特指标上的表现。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。