Loquetier: A Virtualized Multi-LoRA Framework for Unified LLM Fine-tuning and Serving
Yuchen Zhang, Hanyue Du, Chun Cao, Jingwei Xu
TL;DR
Loquetier presents a unified, virtualized framework for jointly fine-tuning and serving LoRA-based LLMs within a single runtime. It introduces a Virtualized Module to isolate adapter modifications and a Segmented Multi-LoRA Multiplication (SMLM) kernel to batched, multi-adapter computation across forward and backward passes. The approach enables concurrent handling of multiple LoRA adapters with dynamic loading, migration, and efficient resource usage, achieving substantial throughput and SLO improvements over baselines in inference, fine-tuning, and unified tasks. This work has practical implications for deploying scalable, multi-task PEFT workflows in production settings, with publicly available code to facilitate reproducibility and adoption.
Abstract
Low-Rank Adaptation (LoRA) has become a widely adopted parameter-efficient fine-tuning (PEFT) technique for adapting large language models (LLMs) to downstream tasks. While prior work has explored strategies for integrating LLM training and serving, there still remains a gap in unifying fine-tuning and inference for LoRA-based models. We present Loquetier, a virtualized multi-LoRA framework that seamlessly integrates LoRA fine-tuning and serving within a single runtime. Loquetier introduces two key components: (1) a Virtualized Module that isolates PEFT-based modifications and supports multiple adapters on a shared base model, and (2) an optimized computation flow with a kernel design that merges fine-tuning and inference paths in forward propagation, enabling efficient batching and minimizing kernel invocation overhead. Extensive experiments across three task settings show that Loquetier consistently outperforms existing baselines in both performance and flexibility, achieving up to $3.0\times$ the throughput of the state-of-the-art co-serving system on inference-only tasks and $46.4\times$ higher SLO attainment than PEFT on unified fine-tuning and inference tasks. The implementation of Loquetier is publicly available at https://github.com/NJUDeepEngine/Loquetier.
