Skip to main content
QUICK REVIEW

[论文解读] LLM-Adapters: An Adapter Family for Parameter-Efficient Fine-Tuning of Large Language Models

Zhiqiang Hu, Lei Wang|arXiv (Cornell University)|Apr 4, 2023
Topic ModelingComputer Science被引用 16
一句话总结

本文提出 LLM-Adapters 框架,将 PEFT adapters 集成到开源 LLMs,并对在数学和常识推理任务上对适配器类型、放置位置和超参数的实证研究,结果显示在特定设置下,带有适配器的小型模型可与大型模型相匹配或超越。

ABSTRACT

The success of large language models (LLMs), like GPT-4 and ChatGPT, has led to the development of numerous cost-effective and accessible alternatives that are created by finetuning open-access LLMs with task-specific data (e.g., ChatDoctor) or instruction data (e.g., Alpaca). Among the various fine-tuning methods, adapter-based parameter-efficient fine-tuning (PEFT) is undoubtedly one of the most attractive topics, as it only requires fine-tuning a few external parameters instead of the entire LLMs while achieving comparable or even better performance. To enable further research on PEFT methods of LLMs, this paper presents LLM-Adapters, an easy-to-use framework that integrates various adapters into LLMs and can execute these adapter-based PEFT methods of LLMs for different tasks. The framework includes state-of-the-art open-access LLMs such as LLaMA, BLOOM, and GPT-J, as well as widely used adapters such as Series adapters, Parallel adapter, Prompt-based learning and Reparametrization-based methods. Moreover, we conduct extensive empirical studies on the impact of adapter types, placement locations, and hyper-parameters to the best design for each adapter-based methods. We evaluate the effectiveness of the adapters on fourteen datasets from two different reasoning tasks, Arithmetic Reasoning and Commonsense Reasoning. The results demonstrate that using adapter-based PEFT in smaller-scale LLMs (7B) with few extra trainable parameters yields comparable, and in some cases superior, performance to powerful LLMs (175B) in zero-shot inference on both reasoning tasks.

研究动机与目标

  • 通过将多样化的适配器整合到统一框架中,推动并使 PEFT 在 LLMs 中可用。
  • 研究在不同任务和模型中,最优的适配器放置与配置。
  • 使用开源 LLM 对数学推理和常识推理数据集评估基于适配器的 PEFT。

提出的方法

  • 开发 LLM-Adapter 框架,将前缀微调 (Prefix-Tuning)、串联适配器 (Series Adapter)、LoRA、并行适配器 (Parallel Adapter) 集成到 LLM 中。
  • 进行放置实验以确定 Series、Parallel 和 LoRA 适配器的最佳位置。
  • 对超参数进行调优(Prefix-Tuning 的 vt;Series/Parallel 适配器的 bn;LoRA 的 r)以找到最佳设置。
  • 使用教师生成的推理过程和任务模板创建 Math10K 与 Commonsense170K 微调数据集。
  • 对 7B/13B 开源 LLM(LLaMA、BLOOMz、GPT-J)应用选定的 PEFT 方法进行微调,并在涵盖算术和常识推理的 14 个数据集上进行评估。
  • 将 PEFT 结果与基线(包括 GPT-3.5/175B、ChatGPT)进行对比。
Figure 1: A detailed illustration of the model architectures of three different adapters: (a) Prefix-Tuning, (b) LoRA, (c) Series Adapter, and (d) Parallel Adapter.
Figure 1: A detailed illustration of the model architectures of three different adapters: (a) Prefix-Tuning, (b) LoRA, (c) Series Adapter, and (d) Parallel Adapter.

实验结果

研究问题

  • RQ1不同 PEFT 方法的最优放置与配置是什么?
  • RQ2不同适配器在下游任务上的表现如何?
  • RQ3在分布内与分布外场景下,PEFT 方法的性能差异如何?

主要发现

  • 最优放置:Series Adapter 放在 MLP 层之后;Parallel Adapter 在 MLP 层内;LoRA 在 Attention 与 MLP 层之后。
  • 带有 PEFT 的较小 LLM 在较简单的数学任务上可优于大型模型(如 LLaMA-13B 配 LoRA 相对于 GPT-3.5 在 MultiArith、AddSub、SingleEq 的表现)。
  • LLaMA-13B 配 LoRA 在六个数学数据集上的平均表现为 65.4%,在这些任务上接近 GPT-3.5 的性能(约为 GPT-3.5 的 92.8%)。
  • 在常识推理方面,LLaMA-13B 配 Series/Parallel/LoRA 适配器的表现优于基线,Parallel 达到平均 81.5%,比 ChatGPT 高出约 4.5 个百分点。
  • 在 Commonsense170K 上,LLaMA-13B 的三种适配器均取得强劲结果,其中 Parallel Adapter 在三者中达到最高的平均值(81.5%)。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。