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

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

28 Mar 2023arXiv:2303.16199archive 2025-07-28

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

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 word tokens at higher transformer layers. Then, a zero-initialized attention mechanism with zero gating is proposed, which adaptively injects the new instructional cues into LLaMA, while effectively preserves its pre-trained knowledge. With our efficient training, LLaMA-Adapter can generate high-quality responses, comparable to Alpaca with fully fine-tuned 7B parameters. Besides language commands, our approach can be simply extended to multi-modal instructions for learning image-conditioned LLaMA model, which achieves superior reasoning performance on ScienceQA and COCO Caption benchmarks. Furthermore, we also evaluate the zero-initialized attention mechanism for fine-tuning other pre-trained models (ViT, RoBERTa) on traditional vision and language tasks, demonstrating the superior generalization capacity of our approach. Code is released at https://github.com/OpenGVLab/LLaMA-Adapter.

PaperPDFCode

In Syntology View this paper on Syntology, its page in Syntology's graph. That page lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

opengvlab/llama-adapter officialmentioned in papermentioned on GitHubpytorchGPL-3.0Syntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to ImageBind-LLM: Multi-modality Instruction Tuning (arXiv:2309.03905; that paper's own run record: 0 ran · 1 unverified); nothing checks that they implement this paper's method. report
zrrskywalker/llama-adapter officialmentioned in papermentioned on GitHubSyntology: not harvested report
Lightning-AI/lit-llama mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to LoRA: Low-Rank Adaptation of Large Language Models (arXiv:2106.09685; that paper's own run record: 51 ran (of which 19 constructed an object rather than computing a result; 43 with no instrument failure: 1 honoured, 0 violated, 42 with no contract checked; 8 where Syntology's instrument failed) · 33 unverified) and LLaMA: Open and Efficient Foundation Language Models (arXiv:2302.13971; that paper's own run record: 37 ran (of which 9 constructed an object rather than computing a result; 25 with no instrument failure: 3 honoured, 0 violated, 22 with no contract checked; 12 where Syntology's instrument failed) · 21 unverified); nothing checks that they implement this paper's method. report
alpha-vllm/llama2-accessory mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to SPHINX-X: Scaling Data and Parameters for a Family of Multi-modal Large Language Models (arXiv:2402.05935; that paper's own run record: 3 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 1 violated, 0 with no contract checked; 2 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
zihanzhaosjtu/librisqa mentioned on GitHubSyntology: not harvested report
ziyuguo99/point-bind_point-llm mentioned on GitHubpytorchMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Point-Bind & Point-LLM: Aligning Point Cloud with Multi-modality for 3D Understanding,... (arXiv:2309.00615; that paper's own run record: 15 ran (of which 0 constructed an object rather than computing a result; 9 with no instrument failure: 3 honoured, 1 violated, 5 with no contract checked; 6 where Syntology's instrument failed) · 5 unverified); nothing checks that they implement this paper's method. report
zrrskywalker/point-bind mentioned on GitHubpytorchMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Point-Bind & Point-LLM: Aligning Point Cloud with Multi-modality for 3D Understanding,... (arXiv:2309.00615; that paper's own run record: 15 ran (of which 0 constructed an object rather than computing a result; 9 with no instrument failure: 3 honoured, 1 violated, 5 with no contract checked; 6 where Syntology's instrument failed) · 5 unverified); nothing checks that they implement this paper's method. report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Instruction FollowingLanguage ModellingMultimodal Deep LearningMusic Question AnsweringVisual Question Answering (VQA)

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Music Question Answering MusicQA LLaMA Adapter BERT Score 0.895 #2 of 3 Archive leaderboard report
Music Question Answering MusicQA LLaMA Adapter BLEU 0.273 #2 of 3 Archive leaderboard report
Music Question Answering MusicQA LLaMA Adapter METEOR 0.334 #2 of 3 Archive leaderboard report
Music Question Answering MusicQA LLaMA Adapter ROUGE 0.413 #2 of 3 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections