Skip to main content
QUICK REVIEW

[Paper Review] LLM-PQ: Serving LLM on Heterogeneous Clusters with Phase-Aware Partition and Adaptive Quantization

Juntao Zhao, Borui Wan|arXiv (Cornell University)|Mar 2, 2024
Advanced Data Storage TechnologiesComputer Science3 citations
TL;DR

LLM-PQ is a system that enables efficient large language model (LLM) serving on heterogeneous GPU clusters by jointly optimizing phase-aware model partitioning, adaptive mixed-precision quantization, and micro-batch scheduling. It achieves up to 2.88× higher inference throughput than state-of-the-art methods by intelligently balancing model quality, memory usage, and latency across diverse GPU types.

ABSTRACT

Recent breakthroughs in Large-scale language models (LLMs) have demonstrated impressive performance on various tasks. The immense sizes of LLMs have led to very high resource demand and cost for running the models. Though the models are largely served using uniform high-caliber GPUs nowadays, utilizing a heterogeneous cluster with a mix of available high- and low-capacity GPUs can potentially substantially reduce the serving cost. There is a lack of designs to support efficient LLM serving using a heterogeneous cluster, while the current solutions focus on model partition and uniform compression among homogeneous devices. This paper proposes LLM-PQ, a system that advocates adaptive model quantization and phase-aware partition to improve LLM serving efficiency on heterogeneous GPU clusters. We carefully decide on mixed-precision model quantization together with phase-aware model partition and micro-batch sizing in distributed LLM serving with an efficient algorithm, to greatly enhance inference throughput while fulfilling user-specified model quality targets. Extensive experiments on production inference workloads in 11 different clusters demonstrate that LLM-PQ achieves up to 2.88x (2.26x on average) throughput improvement in inference, showing great advantages over state-of-the-art works.

Motivation & Objective

  • Address the inefficiency of existing LLM serving systems on heterogeneous GPU clusters, where uniform partitioning and quantization lead to underutilization or OOM errors.
  • Overcome the limitations of homogeneous cluster designs in handling the distinct computational patterns of LLM inference phases: prompt processing (prefill) and autoregressive generation (decode).
  • Improve resource utilization and reduce serving costs by co-optimizing model partitioning, mixed-precision quantization, and micro-batch sizing for heterogeneous hardware.
  • Enable efficient offline workload processing in real-world clusters by modeling memory and latency trade-offs with a mixed-precision, phase-aware optimization framework.

Proposed method

  • Propose a phase-aware model partitioning strategy that accounts for the differing computational demands of prefill and decode phases in decoder-only LLMs.
  • Introduce adaptive mixed-precision quantization, where different layers are assigned bitwidths based on GPU memory capacity, avoiding memory waste on high-capacity GPUs and preventing OOM on low-capacity ones.
  • Formulate an integer linear programming (ILP) optimization model that jointly selects layer partitioning, micro-batch size, and quantization bitwidth to minimize latency while meeting user-specified model quality targets.
  • Design a heuristic-based solver to efficiently scale the ILP solution to large models and clusters, reducing solving time from hours to under a minute in large configurations.
  • Incorporate accurate cost models for memory footprint and execution latency that account for pre- and post-processing overheads, especially critical on low-memory GPUs.
  • Support integration with existing quantization schemes like AWQ, SpQR, and QLoRA, enabling LLM-PQ to leverage advances in weight-only quantization.

Experimental results

Research questions

  • RQ1How can model partitioning be adapted to the distinct computational characteristics of prefill and decode phases in decoder-only LLMs on heterogeneous clusters?
  • RQ2To what extent can adaptive mixed-precision quantization improve memory efficiency and model quality without sacrificing throughput?
  • RQ3What is the optimal trade-off between inference latency, model quality, and memory usage when co-optimizing partitioning, quantization, and micro-batch sizing?
  • RQ4Can a scalable heuristic solver effectively approximate the optimal configuration for large-scale LLMs across diverse heterogeneous GPU clusters?
  • RQ5How does LLM-PQ’s co-design of partitioning, quantization, and batching compare to pure adaptive quantization or fixed-precision baselines in real-world workloads?

Key findings

  • LLM-PQ achieves up to 2.88× higher inference throughput and 2.26× on average across 11 real-world clusters compared to state-of-the-art methods.
  • The heuristic solver reduces solving time to 31 seconds for a 66B parameter model (OPT-66B) across a cluster of two P100, V100, and A100 GPUs, enabling practical deployment.
  • Adaptive mixed-precision quantization significantly outperforms uniform quantization, as shown by LLM-PQ’s consistent superiority over adabits (pure adaptive quantization) in all evaluated configurations.
  • Larger user-specified quality scalars (θ) lead to higher model accuracy and lower throughput, confirming the trade-off between quality and latency is effectively modeled and balanced.
  • The system’s performance is robust across diverse cluster setups, including clusters with mixed GPU types such as A100, V100, and T4, demonstrating strong adaptability.
  • Phase-aware partitioning is critical: focusing only on the first phase (prefill) leads to suboptimal performance due to the vastly different execution patterns in decode phase.

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.