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.
翻译:大型语言模型(如GPT-4和ChatGPT)的成功推动了众多经济实惠且易于获取的替代方案的开发,这些方案通过对开放获取的大型语言模型进行任务特定数据(如ChatDoctor)或指令数据(如Alpaca)的微调而创建。在各种微调方法中,基于适配器的参数高效微调无疑是最受关注的话题之一,因为它仅需微调少量外部参数而非整个模型,即可达到甚至超越全参数微调的性能。为促进大型语言模型参数高效微调方法的进一步研究,本文提出了LLM-Adapters——一个易于使用的框架,该框架将多种适配器集成到大型语言模型中,并针对不同任务执行这些基于适配器的参数高效微调方法。该框架包含LLaMA、BLOOM和GPT-J等最先进的开放获取大型语言模型,以及广泛使用的适配器,如系列适配器、并行适配器、基于提示的学习方法和基于重参数化的方法。此外,我们通过大量实证研究,探讨了适配器类型、放置位置和超参数对每种基于适配器方法最优设计的影响。我们在涉及算术推理和常识推理两种不同推理任务的十四个数据集上评估了适配器的有效性。结果表明,在小型语言模型(7B)上使用基于适配器的参数高效微调,仅需少量额外可训练参数,即可在两个推理任务的零样本推理中达到与强大语言模型(175B)相当甚至更优的性能。