Skip to main content
QUICK REVIEW

[Paper Review] Fairness in Serving Large Language Models

Ying Sheng, Shiyi Cao|arXiv (Cornell University)|Dec 31, 2023
Distributed and Parallel Computing SystemsComputer Science4 citations
TL;DR

This paper proposes Virtual Token Counter (VTC), a novel fair scheduling algorithm for large language model (LLM) serving that ensures fairness at the token level by tracking cumulative service per client. VTC achieves a 2× tight upper bound on service difference between clients under work-conserving conditions, outperforming FCFS and RPM-based methods in fairness and resource utilization across diverse request lengths and system loads.

ABSTRACT

High-demand LLM inference services (e.g., ChatGPT and BARD) support a wide range of requests from short chat conversations to long document reading. To ensure that all client requests are processed fairly, most major LLM inference services have request rate limits, to ensure that no client can dominate the request queue. However, this rudimentary notion of fairness also results in under-utilization of the resources and poor client experience when there is spare capacity. While there is a rich literature on fair scheduling, serving LLMs presents new challenges due to their unpredictable request lengths and their unique batching characteristics on parallel accelerators. This paper introduces the definition of LLM serving fairness based on a cost function that accounts for the number of input and output tokens processed. To achieve fairness in serving, we propose a novel scheduling algorithm, the Virtual Token Counter (VTC), a fair scheduler based on the continuous batching mechanism. We prove a 2x tight upper bound on the service difference between two backlogged clients, adhering to the requirement of work-conserving. Through extensive experiments, we demonstrate the superior performance of VTC in ensuring fairness, especially in contrast to other baseline methods, which exhibit shortcomings under various conditions. The reproducible code is available at https://github.com/Ying1123/VTC-artifact

Motivation & Objective

  • To address fairness challenges in LLM serving where request lengths are unpredictable and resource usage varies by input/output token count.
  • To overcome limitations of traditional rate limiting (e.g., RPM) that cause underutilization and poor client experience during idle capacity.
  • To design a scheduling algorithm that ensures fair service distribution across clients while maintaining high GPU utilization in the presence of variable request lengths and batching dynamics.
  • To formalize fairness in LLM serving using a configurable cost function based on input and output token processing.
  • To develop a scheduler that is agnostic to server capacity fluctuations and integrates seamlessly with continuous batching and modern LLM inference optimizations.

Proposed method

  • Proposes a cost function that assigns different weights to input and output tokens based on their processing cost, enabling fine-grained fairness at the token level.
  • Introduces the Virtual Token Counter (VTC) algorithm, which maintains a per-client counter tracking cumulative service in tokens, updated continuously at the token level.
  • Uses a priority queue to schedule the client with the lowest accumulated service (smallest counter), ensuring work-conserving behavior and fairness.
  • Employs a dynamic counter update mechanism that accounts for unknown output lengths by estimating future service based on current progress, avoiding over-compensation.
  • Integrates natively with continuous batching and PagedAttention, enabling efficient GPU utilization without sacrificing fairness guarantees.
  • Theoretical analysis proves a 2× tight upper bound on the service difference between any two backlogged clients, ensuring strong fairness under work-conserving constraints.

Experimental results

Research questions

  • RQ1How can fairness be meaningfully defined in LLM serving given the variability in request length and processing cost between input and output tokens?
  • RQ2What scheduling mechanism can ensure fairness while maintaining high resource utilization in the presence of unpredictable output lengths and dynamic GPU capacity?
  • RQ3Can a fair scheduler be designed that is both work-conserving and robust to fluctuations in server capacity and request heterogeneity?
  • RQ4How does the proposed VTC scheduler compare to FCFS and RPM-based scheduling in terms of fairness and resource utilization across diverse workloads?
  • RQ5What is the theoretical bound on service difference between clients under VTC, and how does it compare to the optimal fairness bound?

Key findings

  • VTC achieves a 2× tight upper bound on the service difference between any two backlogged clients, proving strong fairness guarantees under work-conserving conditions.
  • Extensive experiments show VTC significantly outperforms FCFS and RPM-based scheduling in fairness, especially under high load and variable request lengths.
  • The service difference variance increases with larger memory pools and longer request lengths, validating the theoretical analysis and highlighting the impact of unknown output lengths.
  • Using only input tokens for counter updates leads to over-compensation for short requests, which VTC mitigates by incorporating estimated output token costs.
  • VTC maintains fairness even when GPU processing rates fluctuate due to memory constraints, demonstrating robustness to dynamic system behavior.
  • The algorithm integrates seamlessly with existing LLM serving optimizations like continuous batching and PagedAttention, enabling practical deployment without architectural overhaul.

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.