Skip to main content
QUICK REVIEW

[Paper Review] Fast Distributed Inference Serving for Large Language Models

Bingyang Wu, Yinmin Zhong|arXiv (Cornell University)|May 10, 2023
Topic ModelingComputer Science21 citations
TL;DR

FastServe introduces preemptive, token-level scheduling with a skip-join Multi-Level Feedback Queue to reduce JCT for LLM inference, plus proactive GPU memory management and distributed execution support. It outperforms Orca in average and tail JCT by up to 5.1x and 6.4x respectively.

ABSTRACT

Large language models (LLMs) power a new generation of interactive AI applications exemplified by ChatGPT. The interactive nature of these applications demands low latency for LLM inference. Existing LLM serving systems use run-to-completion processing for inference jobs, which suffers from head-of-line blocking and long latency. We present FastServe, a distributed inference serving system for LLMs. FastServe exploits the autoregressive pattern of LLM inference to enable preemption at the granularity of each output token. FastServe uses preemptive scheduling to minimize latency with a novel skip-join Multi-Level Feedback Queue scheduler. Based on the new semi-information-agnostic setting of LLM inference, the scheduler leverages the input length information to assign an appropriate initial queue for each arrival job to join. The higher priority queues than the joined queue are skipped to reduce demotions. We design an efficient GPU memory management mechanism that proactively offloads and uploads intermediate state between GPU memory and host memory for LLM inference. We build a system prototype of FastServe and experimental results show that compared to the state-of-the-art solution vLLM, FastServe improves the throughput by up to 31.4x and 17.9x under the same average and tail latency requirements, respectively.

Motivation & Objective

  • Motivate low job completion time (JCT) for interactive LLM applications like ChatGPT.
  • Address head-of-line blocking in run-to-completion LLM serving systems.
  • Design a preemptive, token-level scheduler tailored to LLM autoregressive generation.
  • Develop efficient GPU memory management for KV caches to handle memory constraints.
  • Support distributed LLM serving across multiple GPUs using tensor and pipeline parallelism.

Proposed method

  • Propose skip-join Multi-Level Feedback Queue (MLFQ) scheduler that assigns initial priority based on the first-iteration time and enables iteration-level preemption at the token level.
  • Extend MLFQ with skip-join to reduce demotions by leveraging semi information-agnostic knowledge (input length determines first-iteration time).
  • Implement proactive key-value (KV) cache management that offloads inactive KV tensors to host memory and preloads needed tensors to GPU memory, with scheduling-guided offloading/uploads.
  • Utilize asynchronous memory operations and pipelining to overlap computation with KV data transfers.
  • Support distributed LLM serving via tensor parallelism and pipeline parallelism, with a distributed KV cache manager across GPUs.
  • Prototype FastServe on NVIDIA FasterTransformer and evaluate against Orca using GPT-3 175B scale on 16 A100 GPUs.

Experimental results

Research questions

  • RQ1How can LLM inference be scheduled to minimize JCT given the autoregressive, token-by-token generation process?
  • RQ2Can a skip-join MLFQ scheduler effectively approximate SRPT in a semi information-agnostic setting where input length is known but total output length is not?
  • RQ3What KV-cache management strategies optimally balance GPU memory usage and preemption overhead in LLM inference?
  • RQ4How can FastServe scale to multi-GPU distributed LLM inference using tensor and pipeline parallelism without incurring prohibitive memory or bandwidth costs?

Key findings

  • FastServe achieves up to 5.1x lower average JCT compared to Orca in experiments.
  • FastServe achieves up to 6.4x lower tail (percentile) JCT compared to Orca in experiments.
  • The skip-join MLFQ scheduler more accurately approximates SRPT than naive MLFQ by leveraging first-iteration time as a predictor.
  • Proactive KV-cache swapping reduces memory pressure and enables scheduling of more concurrent jobs without catastrophic memory overflow.
  • Distributed execution with tensor and pipeline parallelism enables scaling to very large models like GPT-3 175B across multiple GPUs.
  • Experimental results demonstrate improved end-to-end performance on GPT-3 175B workloads across 16 NVIDIA A100 GPUs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.