Skip to main content
QUICK REVIEW

[论文解读] Inference without Interference: Disaggregate LLM Inference for Mixed Downstream Workloads

Cunchen Hu, Heyang Huang|arXiv (Cornell University)|Jan 20, 2024
Ferroelectric and Negative Capacitance DevicesEngineering被引用 5
一句话总结

TetriInfer 将 prefill 与 decode 阶段区分开来,并使用 chunking、两级调度,以及长度预测来减少混合 LLM 推理工作负载中的干扰,在 TTFT、JCT 和效率方面取得显著提升,同时指出极端工作负载的局限性。

ABSTRACT

Transformer-based large language model (LLM) inference serving is now the backbone of many cloud services. LLM inference consists of a prefill phase and a decode phase. However, existing LLM deployment practices often overlook the distinct characteristics of these phases, leading to significant interference. To mitigate interference, our insight is to carefully schedule and group inference requests based on their characteristics. We realize this idea in TetriInfer through three pillars. First, it partitions prompts into fixed-size chunks so that the accelerator always runs close to its computationsaturated limit. Second, it disaggregates prefill and decode instances so each can run independently. Finally, it uses a smart two-level scheduling algorithm augmented with predicted resource usage to avoid decode scheduling hotspots. Results show that TetriInfer improves time-to-first-token (TTFT), job completion time (JCT), and inference efficiency in turns of performance per dollar by a large margin, e.g., it uses 38% less resources all the while lowering average TTFT and average JCT by 97% and 47%, respectively.

研究动机与目标

  • 在 prefill 和 decode 阶段之间,激发并量化混合 LLM 推理请求的干扰。
  • 开发一个云规模的推理服务系统,通过阶段解耦和工作负载感知调度来最小化干扰。
  • 展示一个实际实现(TetriInfer),在常见工作负载上优于 vanilla vLLM,并分析其局限性。

提出的方法

  • 将 prompts 划分为固定大小的块,以在 prefill 期间保持加速器的计算饱和。
  • 将 prefill 与 decode 阶段解耦,使它们在独立实例上运行,并在它们之间传输 KV 缓存。
  • 实现一个两级调度系统,结合长度预测来引导解码工作负载,避免热点。
  • 使用一个基于小型 LLM 的长度预测器来估计生成的 token 数量,并指导解码调度。
  • 采用分块 prefill 和一个调度器,根据预测的资源使用情况来平衡解码实例。
  • 通过引入工作集感知的解码调度策略来扩展 vLLM,以减少内存抖动。
Figure 1: Length Distribution. Prompt Tokens for Prefill and Generated Tokens during Decode. Data sources: conversation [ 35 ] , summarization [ 17 ] , writing [ 18 ] .
Figure 1: Length Distribution. Prompt Tokens for Prefill and Generated Tokens during Decode. Data sources: conversation [ 35 ] , summarization [ 17 ] , writing [ 18 ] .

实验结果

研究问题

  • RQ1在当前部署实践下,混合 LLM 的 prefill 与解码请求在一起运行时表现如何?
  • RQ2在云规模部署中,分布式 LLM 推理服务系统如何最小化 prefill 与 decode 之间的干扰,以及解码请求之间的干扰?

主要发现

  • TetriInfer 在混合工作负载下明显降低干扰并提高效率,相较于原生 vLLM。
  • 对于轻量预填和重解码工作负载,TetriInfer 将 perf/$ 提升了2.4倍。
  • 对于常见混合工作负载,TetriInfer 将平均 TTFT 提升 85%,将平均 JCT 提升 50%。
  • TetriInfer 并非针对重预填和重解码工作负载的理想选择,在这些场景中增益有限且开销难以抵消。
Figure 2: Prefill and Decode’s Characteristics. Decode’s GPU utilization fluctuates because the task is faster than our monitoring granularity.
Figure 2: Prefill and Decode’s Characteristics. Decode’s GPU utilization fluctuates because the task is faster than our monitoring granularity.

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。