arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.00206cs.LGcs.AIcs.DC
收藏

LoRAFusion: 面向大语言模型的高效LoRA微调方法

LoRAFusion: Efficient LoRA Fine-Tuning for LLMs

University of Toronto, Vector Institute, NVIDIA(多伦多大学、向量研究所、NVIDIA)

Zhanda Zhu, Qidong Su, Yaoyao Ding, Kevin Song, Shang Wang, Gennady Pekhimenko

AI总结:

针对现有LoRA微调系统存在的冗余访存开销高、多适配器并行调度效率低的问题,提出LoRAFusion系统,通过算子融合和自适应多任务批调度,实现了显著的端到端性能提升,且融合算子可即插即用。

摘要:

低秩适配(Low-Rank Adaptation, LoRA)已成为大语言模型(Large Language Models, LLMs)主流的参数高效微调(Parameter-Efficient Fine-Tuning, PEFT)方法,它在显著降低GPU显存占用的同时,能在下游任务上保持具备竞争力的微调模型质量。尽管有这些优势,我们发现现有LoRA微调系统存在两个关键低效问题:第一,由于大激活张量上存在冗余内存访问,会产生大量运行时开销;第二,这类系统未能利用在同一组GPU上、共享同一基座模型的多个独立LoRA适配器并行微调的机会,导致错失减少流水线气泡、优化通信重叠、提升GPU负载均衡等性能增益。\n为解决这些问题,我们提出了LoRAFusion——一种面向LLMs的高效LoRA微调系统。在算子层面,我们提出了一种图拆分方法,可融合访存受限型操作,该设计消除了不必要的内存访问,同时保留了计算受限型通用矩阵乘法(GEMM)的性能,且不会引入重计算或同步开销。在调度层面,LoRAFusion提出了一种适用于多任务微调的自适应批处理算法:它首先将LoRA适配器分组,有意错开不同任务的批处理执行时机,随后在每组内求解装箱问题,以生成均衡的、感知依赖关系的微批次。实验结果显示,与Megatron-LM相比,LoRAFusion的端到端加速比最高达1.96倍(平均1.47倍);与当前最先进的多LoRA微调系统mLoRA相比,性能提升最高达1.46倍(平均1.29倍)。我们的融合算子性能提升最高达1.39倍(平均1.27倍),可直接作为即插即用组件替换现有LoRA系统中的对应模块。我们已在https://github.com/CentML/lorafusion 开源LoRAFusion。

英文摘要:

Low-Rank Adaptation (LoRA) has become the leading Parameter-Efficient Fine-Tuning (PEFT) method for Large Language Models (LLMs), as it significantly reduces GPU memory usage while maintaining competitive fine-tuned model quality on downstream tasks. Despite these benefits, we identify two key inefficiencies in existing LoRA fine-tuning systems. First, they incur substantial runtime overhead due to redundant memory accesses on large activation tensors. Second, they miss the opportunity to concurrently fine-tune multiple independent LoRA adapters that share the same base model on the same set of GPUs. This leads to missed performance gains such as reduced pipeline bubbles, better communication overlap, and improved GPU load balance. To address these issues, we introduce LoRAFusion, an efficient LoRA fine-tuning system for LLMs. At the kernel level, we propose a graph-splitting method that fuses memory-bound operations. This design eliminates unnecessary memory accesses and preserves the performance of compute-bound GEMMs without incurring the cost of recomputation or synchronization. At the scheduling level, LoRAFusion introduces an adaptive batching algorithm for multi-job fine-tuning. It first splits LoRA adapters into groups to intentionally stagger batch execution across jobs, and then solves a bin-packing problem within each group to generate balanced, dependency-aware microbatches. LoRAFusion achieves up to $1.96\times$ ($1.47\times$ on average) end-to-end speedup compared to Megatron-LM, and up to $1.46\times$ ($1.29\times$ on average) improvement over mLoRA, the state-of-the-art multi-LoRA fine-tuning system. Our fused kernel achieves up to $1.39\times$ ($1.27\times$ on average) kernel performance improvement and can directly serve as a plug-and-play replacement in existing LoRA systems. We open-source LoRAFusion at https://github.com/CentML/lorafusion.

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

↑