arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.00066cs.DCcs.AIcs.CLcs.LG
收藏

先压缩再服务:以极低开销服务数千个 LoRA 适配器

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

MIT CSAIL(麻省理工学院计算机科学与人工智能实验室);MIT-IBM Watson AI Lab(麻省理工学院-IBM沃森人工智能实验室)

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

AI总结:

针对服务数千个 LoRA 适配器时的 GPU 内存瓶颈,提出联合压缩方法将 LoRA 压缩为共享基与特定缩放矩阵,并扩展至聚类以支持大规模集合,实验证明在保持性能的同时显著提升了服务吞吐量。

摘要:

使用低秩自适应(LoRAs)对大型语言模型(LLMs)进行微调已成为常见做法,通常会产生大量仅 LoRA 更新不同的相同 LLM 副本。这种范式为系统带来了挑战,因为系统需要对每个涉及不同 LoRA 的查询提供实时响应。先前的工作优化了此类系统的设计,但仍需不断加载和卸载 LoRA,因为将数千个 LoRA 存储在 GPU 内存中是不可行的。为缓解此问题,我们研究了在服务 LoRA 时压缩的有效性。我们提出了一种将 LoRA 联合压缩为共享基,并配以 LoRA 特定缩放矩阵的方法。我们将算法扩展为学习适合联合压缩的 LoRA 簇,使其能优雅地扩展至大型 LoRA 集合。我们在多达 1000 个 LoRA 上的实验表明,压缩后的 LoRA 保持了性能,并在拥有超过一千个 LoRA 的实际服务场景中提供了显著的吞吐量提升,维持了服务单个 LoRA 时 80% 的吞吐量。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑