LLaMA-Adapter: Efficient Fine-tuning of Language Models with Zero-init Attention

AI-generated keywords: LLaMA-Adapter Instruction-Following Zero-Init Attention Multi-Modal Input ScienceQA

AI-generated Key Points

The license of the paper does not allow us to build upon its content and the key points are generated using the paper metadata rather than the full article.

  • The LLaMA-Adapter is a novel adaptation method that fine-tunes the LLaMA language model into an instruction-following model.
  • It introduces only 1.2 million learnable parameters and takes less than an hour for fine-tuning on eight A100 GPUs, making it a lightweight approach.
  • The authors use 52K self-instruct demonstrations to train the model and adopt a set of learnable adaption prompts.
  • They propose a zero-init attention mechanism with zero gating, which adaptively injects new instructional cues into LLaMA while preserving its pre-trained knowledge effectively.
  • With efficient training, LLaMA-Adapter generates high-quality responses comparable to Alpaca with fully fine-tuned 7B parameters.
  • This approach can be easily extended to multi-modal input such as images for image-conditioned LLaMA, which achieves superior reasoning capacity on ScienceQA.
  • The authors have released their code at https://github.com/ZrrSkywalker/LLaMA-Adapter for public use.
  • Overall, this study presents an innovative and efficient method for adapting language models into instruction following models using minimal additional parameters and training time.
Also access our AI generated: Comprehensive summary, Lay summary, Blog-like article; or ask questions about this paper to our AI assistant.

Authors: Renrui Zhang, Jiaming Han, Aojun Zhou, Xiangfei Hu, Shilin Yan, Pan Lu, Hongsheng Li, Peng Gao, Yu Qiao

Work in Progress. Code is available at https://github.com/ZrrSkywalker/LLaMA-Adapter

Abstract: We present LLaMA-Adapter, a lightweight adaption method to efficiently fine-tune LLaMA into an instruction-following model. Using 52K self-instruct demonstrations, LLaMA-Adapter only introduces 1.2M learnable parameters upon the frozen LLaMA 7B model, and costs less than one hour for fine-tuning on 8 A100 GPUs. Specifically, we adopt a set of learnable adaption prompts, and prepend them to the input text tokens at higher transformer layers. Then, a zero-init attention mechanism with zero gating is proposed, which adaptively injects the new instructional cues into LLaMA, while effectively preserves its pre-trained knowledge. With efficient training, LLaMA-Adapter generates high-quality responses, comparable to Alpaca with fully fine-tuned 7B parameters. Furthermore, our approach can be simply extended to multi-modal input, e.g., images, for image-conditioned LLaMA, which achieves superior reasoning capacity on ScienceQA. We release our code at https://github.com/ZrrSkywalker/LLaMA-Adapter.

Submitted to arXiv on 28 Mar. 2023

Ask questions about this paper to our AI assistant

You can also chat with multiple papers at once here.

The license of the paper does not allow us to build upon its content and the AI assistant only knows about the paper metadata rather than the full article.

AI assistant instructions?

Results of the summarizing process for the arXiv paper: 2303.16199v1

This paper's license doesn't allow us to build upon its content and the summarizing process is here made with the paper's metadata rather than the article.

The LLaMA-Adapter is a novel adaptation method that efficiently fine-tunes the LLaMA language model into an instruction-following model. It introduces only 1.2 million learnable parameters upon the frozen LLaMA 7B model and takes less than an hour for fine-tuning on eight A100 GPUs, making it a lightweight approach. The authors use 52K self-instruct demonstrations to train the model and adopt a set of learnable adaption prompts, which they prepend to the input text tokens at higher transformer layers. They also propose a zero-init attention mechanism with zero gating, which adaptively injects new instructional cues into LLaMA while preserving its pre-trained knowledge effectively. With efficient training, LLaMA-Adapter generates high-quality responses comparable to Alpaca with fully fine-tuned 7B parameters. Furthermore, this approach can be easily extended to multi-modal input such as images for image-conditioned LLaMA, which achieves superior reasoning capacity on ScienceQA. The authors have released their code at https://github.com/ZrrSkywalker/LLaMA-Adapter for public use. Overall, this study presents an innovative and efficient method for adapting language models into instruction following models using minimal additional parameters and training time. This has significant implications for natural language processing tasks that require instruction following capabilities such as question answering systems or chatbots.
Created on 11 May. 2023

Assess the quality of the AI-generated content by voting

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

The previous summary was created more than a year ago and can be re-run (if necessary) by clicking on the Run button below.

The license of this specific paper does not allow us to build upon its content and the summarizing tools will be run using the paper metadata rather than the full article. However, it still does a good job, and you can also try our tools on papers with more open licenses.

Similar papers summarized with our AI tools

Navigate through even more similar papers through a

tree representation

Look for similar papers (in beta version)

By clicking on the button above, our algorithm will scan all papers in our database to find the closest based on the contents of the full papers and not just on metadata. Please note that it only works for papers that we have generated summaries for and you can rerun it from time to time to get a more accurate result while our database grows.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.