arXiv:2505.21930cs.LGcs.CL2025-05ACL被引 11

用分组适配器集成提升多数据集微调效率,准确率更高且更快。

Efficient Ensemble for Fine-tuning Language Models on Multiple Datasets

  • 将多个数据集分组,每组训练一个小型适配器,再加权组合成集成模型。
  • 在340亿参数模型上误差低于1%,计算速度比传统微调快105倍。
  • 相比QLoRA,平均准确率提升10%,适合需要多任务高效微调的研究者。

本文提出一种针对多数据集微调的语言模型集成方法。现有方法如量化低秩适配(QLoRA)在单数据集上高效,但在多任务场景下缺乏高效设计。本文采用多个小型适配器的集成替代每个任务一个适配器,通过将n个数据集划分为通常远小于n的m个组,为每组训练一个适配器,再加权组合形成集成。利用低秩适配对基模型行为的近似特性,以基模型梯度估算微调表现,误差低于1%(340亿参数模型),估计真实性能误差低于5%,同时计算速度比基线微调快105倍。在十项文本分类任务上对Llama和GPT模型微调,本方法平均测试准确率比QLoRA高10%,仅增加9%浮点运算量;在340亿参数的Llama模型上,集成QLoRA使测试准确率提升3%,仅增加8%浮点运算量。

原文摘要 · Abstract (English)

This paper develops an ensemble method for fine-tuning a language model to multiple datasets. Existing methods, such as quantized LoRA (QLoRA), are efficient when adapting to a single dataset. When training on multiple datasets of different tasks, a common setup in practice, it remains unclear how to design an efficient adaptation for fine-tuning language models. We propose to use an ensemble of multiple smaller adapters instead of a single adapter per task. We design an efficient algorithm that partitions $n$ datasets into $m$ groups, where $m$ is typically much smaller than $n$ in practice, and train one adapter for each group before taking a weighted combination to form the ensemble. The algorithm leverages a first-order approximation property of low-rank adaptation to quickly obtain the fine-tuning performances of dataset combinations since methods like LoRA stay close to the base model. Hence, we use the gradients of the base model to estimate its behavior during fine-tuning. Empirically, this approximation holds with less than $1\%$ error on models with up to $34$ billion parameters, leading to an estimation of true fine-tuning performances under $5\%$ error while speeding up computation compared to base fine-tuning by $105$ times. When applied to fine-tune Llama and GPT models on ten text classification tasks, our approach provides up to $10\%$ higher average test accuracy over QLoRA, with only $9\%$ more FLOPs. On a Llama model with $34$ billion parameters, an ensemble of QLoRA increases test accuracy by $3\%$ compared to QLoRA, with only $8\%$ more FLOPs.

微调集成学习适配器多任务

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。