arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.02515cs.LGcs.AI
收藏

mLoRA:在多GPU中通过高效流水线并行微调LoRA适配器

mLoRA: Fine-Tuning LoRA Adapters via Highly-Efficient Pipeline Parallelism in Multiple GPUs

Sichuan University(四川大学);Ant Group(蚂蚁集团);Zhejiang computation(浙江计算);The University of Texas at Arlington(德克萨斯大学阿灵顿分校);CNIC, Chinese Academy of Science(中国科学院计算机网络信息中心)

Zhengmao Ye, Dengchun Li, Zetao Hu, Tingfeng Lan, Jian Sha, Sicong Zhang, Lei Duan, Jie Zuo, Hui Lu, Yuanchun Zhou, Mingjie Tang

AI总结:

提出mLoRA系统,通过LoRA感知的流水线并行和高效算子,在多GPU上同时微调多个LoRA适配器,显著降低任务完成时间并支持更大模型,已在蚂蚁集团部署。

摘要:

基于Transformer的预训练大语言模型(LLM)已在多个领域展现出卓越性能,尤其是在新兴的“预训练-再微调”范式中。低秩适配(LoRA)作为一种参数高效的微调方法,常用于将基础LLM适配到多个下游任务。此外,LLM平台使开发者能够同时微调多个模型并开发各种领域特定应用。然而,现有的模型并行方案在跨GPU和机器训练多个LoRA任务时,存在通信开销高和GPU利用率低的问题。在本文中,我们提出了mLoRA,一个为跨GPU和机器训练多个LoRA而设计的并行高效微调系统。mLoRA引入了一种新颖的LoRA感知流水线并行方案,该方案能够高效地在GPU和机器间流水线化独立的LoRA适配器及其不同的微调阶段,并配合一个新的LoRA高效算子来增强流水线化LoRA训练期间的GPU利用率。我们的大量评估表明,与FSDP等最先进方法相比,mLoRA能显著减少平均微调任务完成时间,例如减少30%。更重要的是,mLoRA能够同时微调更大的模型,例如在四块NVIDIA RTX A6000 48GB GPU上同时微调两个Llama-2-13B模型,而FSDP因高内存需求无法实现这一点。因此,mLoRA不仅提高了微调效率,还使其在性价比高的GPU上更易实现。mLoRA已部署在蚂蚁集团的生产环境中。

英文摘要:

Transformer-based, pre-trained large language models (LLMs) have demonstrated outstanding performance across diverse domains, particularly in the emerging {\em pretrain-then-finetune} paradigm. Low-Rank Adaptation (LoRA), a parameter-efficient fine-tuning method, is commonly used to adapt a base LLM to multiple downstream tasks. Further, LLM platforms enable developers to fine-tune multiple models and develop various domain-specific applications simultaneously. However, existing model parallelism schemes suffer from high communication overhead and inefficient GPU utilization when training multiple LoRA tasks across GPUs and machines. In this paper, we present mLoRA, a parallelism-efficient fine-tuning system designed for training multiple LoRA across GPUs and machines. mLoRA introduces a novel LoRA-aware pipeline parallelism scheme that efficiently pipelines independent LoRA adapters and their distinct fine-tuning stages across GPUs and machines, along with a new LoRA-efficient operator to enhance GPU utilization during pipelined LoRA training. Our extensive evaluation shows that mLoRA can significantly reduce average fine-tuning task completion time, e.g., by 30\%, compared to state-of-the-art methods like FSDP. More importantly, mLoRA enables simultaneous fine-tuning of larger models, e.g., two Llama-2-13B models on four NVIDIA RTX A6000 48GB GPUs, which is not feasible for FSDP due to high memory requirements. Hence, mLoRA not only increases fine-tuning efficiency but also makes it more accessible on cost-effective GPUs. mLoRA has been deployed in AntGroup's production environment.

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

↑