The success of large language models (LLMs), like GPT-3 and ChatGPT, has led to the development of numerous cost-effective and accessible alternatives that are created by fine-tuning 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, OPT, and GPT-J, as well as widely used adapters such as Series adapter, Parallel adapter, and LoRA. The framework is designed to be research-friendly, efficient, modular, and extendable, allowing the integration of new adapters and the evaluation of them with new and larger-scale LLMs. Furthermore, to evaluate the effectiveness of adapters in LLMs-Adapters, we conduct experiments on six math reasoning datasets. 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 that of powerful LLMs (175B) in zero-shot inference on simple math reasoning datasets. Overall, we provide a promising framework for fine-tuning large LLMs on downstream tasks. We believe the proposed LLMs-Adapters will advance adapter-based PEFT research, facilitate the deployment of research pipelines, and enable practical applications to real-world systems.
翻译:大型语言模型(如GPT-3和ChatGPT)的成功催生了众多经济高效且易于访问的替代方案,这些方案通过使用特定任务数据(如ChatDoctor)或指令数据(如Alpaca)对开放获取的大型语言模型进行微调而构建。在各种微调方法中,基于适配器的参数高效微调无疑是最受关注的课题之一,因为它仅需微调少量外部参数而非整个模型,却能实现相当甚至更优的性能。为促进大型语言模型参数高效微调方法的进一步研究,本文提出LLM-Adapters——一个易于使用的框架,可将多种适配器集成到大型语言模型中,并针对不同任务执行基于适配器的参数高效微调方法。该框架包含最先进的开放获取大型语言模型(如LLaMA、BLOOM、OPT和GPT-J)以及广泛使用的适配器(如序列适配器、并行适配器和LoRA)。框架设计注重研究友好性、高效性、模块化和可扩展性,支持集成新型适配器并评估其在更大规模新模型中的表现。此外,为验证适配器在LLM-Adapters中的有效性,我们在六个数学推理数据集上展开实验。结果表明,在较小规模(7B参数)的模型中使用基于适配器的参数高效微调,仅需少量额外可训练参数,即可在简单数学推理数据集的零样本推理中达到与强大模型(175B参数)相当甚至更优的性能。总体而言,我们为在下游任务上微调大型语言模型提供了一个有前景的框架。我们相信所提出的LLM-Adapters将推动基于适配器的参数高效微调研究,促进研究流水线的部署,并助力实际系统中的应用落地。