Compress then Serve: Serving Thousands of LoRA Adapters with Little Overhead

Rickard Brüel-Gabrielsson, Jiacheng Zhu, Onkar Bhardwaj, Leshem Choshen, Kristjan Greenewald, Mikhail Yurochkin, Justin Solomon

TL;DR

Serving thousands of specialized LoRA adapters simultaneously is a major bottleneck for LLM providers due to GPU memory limits and the overhead of swapping adapters. This paper introduces a "joint compression" method that groups adapters into clusters and represents them using a shared basis, enabling a 1.6x throughput increase and allowing a single server to handle over 1,000 adapters with 80% of the efficiency of serving just one.

What Problem Does This Paper Address?

Low-Rank Adaptation (LoRA) has become the standard for fine-tuning Large Language Models (LLMs) for specific tasks. However, scaling this to thousands of users—each with their own custom adapter—creates a massive serving challenge.

Current state-of-the-art systems like vLLM and S-LoRA optimize memory management, but they still face a fundamental physical limit: GPU memory is too small to hold thousands of adapters at once. When the number of active adapters exceeds memory capacity, the system must constantly load and offload weights from the CPU, which tanks throughput. The authors aim to bridge this gap by compressing the adapters themselves so that a much larger collection can reside in memory simultaneously.

Methods

The core innovation is Joint Diagonalization (JD). Instead of compressing each LoRA adapter individually (which is limited), the authors propose finding a shared mathematical "basis" that can represent an entire collection of adapters.

  • Joint Compression: They factorize a set of LoRA products ($B_i A_i$) into the form $U \Sigma_i V^\top$, where $U$ and $V$ are shared across all adapters in a group, and only the small $\Sigma_i$ matrix is unique to each adapter.
  • JD-Full vs. JD-Diag: They explore two variants: JD-Full, where $\Sigma_i$ is a small square matrix, and JD-Diag, where $\Sigma_i$ is strictly diagonal for maximum parameter savings.
  • Clustering: To handle diverse sets of adapters, they developed a clustering algorithm. Instead of one global basis, the system groups similar LoRAs into $k$ clusters, each with its own optimized $U$ and $V$. This allows the method to scale gracefully as the number of adapters grows.
  • System Integration: The researchers integrated these compressed formats into the vLLM serving engine, utilizing custom CUDA kernels (specifically the Punica kernel) to maintain high-speed matrix multiplications during inference.

Datasets

The authors evaluated their approach using:

  • Super-NaturalInstructions: A large-scale benchmark of NLP tasks.
  • Mistral-7B-Instruct-v0.2: Used as the base foundation model.
  • 1,000 Custom LoRAs: The authors trained 1,000 high-quality adapters (rank 16) on 1,000 distinct natural instruction tasks to create a realistic, large-scale serving scenario.

Key Insights and Ideas

  • Shared Subspaces: LoRA adapters trained on the same base model often share significant structural information. Joint compression exploits this redundancy far better than individual compression (like SVD) can.
  • The "Generalization" Surprise: Interestingly, the authors found that moderate compression error doesn't always hurt performance. In some cases, the reconstruction error acts as a form of regularization, leading to compressed models that slightly outperform the original uncompressed versions.
  • Reconstruction Error as a Proxy: The paper demonstrates that Frobenius norm reconstruction error is a reliable proxy for downstream model performance (like ROUGE-L scores), allowing for efficient hyperparameter tuning without expensive LLM evaluations.
Figure 3: Reconstruction error vs. performance.

Key Results

  • Massive Throughput Gains: In scenarios serving 1,024 unique LoRAs, joint compression achieved a 1.6x throughput increase over vLLM’s standard multi-LoRA implementation.
  • Near-Native Performance: The system maintained 80% of the throughput of a single-adapter setup, even while managing over a thousand different adapters.
  • Accuracy Preservation: By choosing appropriate cluster counts and ranks, the authors preserved 99%+ of the original LoRA performance (measured by ROUGE-L) across their 1,000-task benchmark.
Figure 1: Throughput gains when serving 1000s of com- pressed LoRAs with vLLM.

Limitations and Future Work

  • Privacy: A potential concern in multi-tenant environments is "information leakage" between adapters sharing a basis. While the authors' preliminary tests showed no performance gains on Task B when using an adapter for Task A (suggesting independence), they acknowledge that more rigorous privacy audits are needed.
  • Quantization: The current work focuses on rank-based compression. Combining this with weight quantization (e.g., 4-bit or 8-bit) could yield even more dramatic memory savings.
  • Dynamic Updates: The compression is currently a preprocessing step. Developing ways to incrementally add new LoRAs to an existing compressed basis without re-running the entire algorithm is a promising future direction.

Summary updated

Abstract

Fine-tuning large language models (LLMs) with low-rank adaptations (LoRAs) has become common practice, often yielding numerous copies of the same LLM differing only in their LoRA updates. This paradigm presents challenges for systems that serve real-time responses to queries that each involve a different LoRA. Prior works optimize the design of such systems but still require continuous loading and offloading of LoRAs, as it is infeasible to store thousands of LoRAs in GPU memory. To mitigate this issue, we investigate the efficacy of compression when serving LoRAs. We propose a method for the joint compression of LoRAs into a shared basis paired with LoRA-specific scaling matrices. We extend our algorithm to learn clusters of LoRAs that are amenable to joint compression, allowing it to scale gracefully to large LoRA collections. Our experiments with up to 1000 LoRAs demonstrate that compressed LoRAs preserve performance while offering major throughput gains in realistic serving scenarios with over a thousand LoRAs, maintaining 80% of the throughput of serving a single LoRA.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
vLLM LoRA servingJoint diagonalization compression (25 clusters, rank 16 JD-Full)Throughput1.6×peft · rank=16 · method=JD-Full · clusters=25 · unique-loras=1024
Source quote
L43: When serving up to 64 unique LoRAs, we use JD without clustering and for 128 or more, we pick the number of clusters to match the performance of compressed and original LoRAs. In each case, the GPU memory footprint of the compressed and original LoRAs is matched for a fair comparison to vLLM's multi-LoRA inference engine. When serving over 1000 LoRAs, compression increases throughput 1.6\!× and maintains 80% of the throughput of serving the base LLM (or a single LoRA merged into the LLM). \S\ref{sec:experiments} presents detailed results.
vLLM LoRA servingJoint diagonalization compression (25 clusters, rank 16 JD-Full)Throughput80%peft · rank=16 · method=JD-Full · clusters=25 · unique-loras=over 1000
Source quote
L43: When serving up to 64 unique LoRAs, we use JD without clustering and for 128 or more, we pick the number of clusters to match the performance of compressed and original LoRAs. In each case, the GPU memory footprint of the compressed and original LoRAs is matched for a fair comparison to vLLM's multi-LoRA inference engine. When serving over 1000 LoRAs, compression increases throughput 1.6\!× and maintains 80% of the throughput of serving the base LLM (or a single LoRA merged into the LLM). \S\ref{sec:experiments} presents detailed results.
BibTeX
@inproceedings{bruelgabrielsson2025compress,
  author = {Rickard Brüel-Gabrielsson and Jiacheng Zhu and Onkar Bhardwaj and Leshem Choshen and Kristjan Greenewald and Mikhail Yurochkin and Justin Solomon},
  title = {{Compress then Serve: Serving Thousands of LoRA Adapters with Little Overhead}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=3XMA8RDJu2},
}
Figure