
摘要
如何高效地将大规模语言模型(LLMs)转化为指令跟随者是近期一个热门的研究方向,而针对多模态推理的大规模语言模型训练则较少被探索。尽管最近的LLaMA-Adapter展示了利用大规模语言模型处理视觉输入的潜力,但它仍然无法很好地泛化到开放式的视觉指令,并且在性能上落后于GPT-4。本文中,我们介绍了LLaMA-Adapter V2,这是一种参数高效的视觉指令模型。具体而言,我们首先通过解锁更多可学习参数(例如归一化、偏置和缩放),增强了LLaMA-Adapter的功能,这些参数不仅分布在适配器中,还分布在整个LLaMA模型中。其次,我们提出了一种早期融合策略,仅将视觉标记输入到早期的大规模语言模型层中,从而更好地融入视觉知识。第三,我们引入了一种联合训练范式,通过优化不同的可学习参数组来同时训练图像-文本对和指令跟随数据。这一策略有效缓解了图像-文本对齐和指令跟随两个任务之间的干扰,并且仅使用小规模的图像-文本和指令数据集就能实现强大的多模态推理能力。在推理过程中,我们将额外的专家模型(如字幕生成/光学字符识别系统)集成到LLaMA-Adapter中,进一步增强其图像理解能力而不增加训练成本。与原始的LLaMA-Adapter相比,我们的LLaMA-Adapter V2仅通过引入1400万个参数就能够在开放式多模态指令上表现出色。新设计的框架还展现了更强的语言指令跟随能力和甚至在对话交互中的优越表现。我们的代码和模型可在https://github.com/ZrrSkywalker/LLaMA-Adapter 获取。
代码仓库
Mind23-2/MindCode-140
mindspore
opengvlab/llama-adapter
pytorch
GitHub 中提及
zrrskywalker/llama-adapter
官方
GitHub 中提及
基准测试
| 基准 | 方法 | 指标 |
|---|---|---|
| video-based-generative-performance | LLaMA Adapter | Consistency: 2.15 Contextual Understanding: 2.30 Correctness of Information: 2.03 Detail Orientation: 2.32 Temporal Understanding: 1.98 mean: 2.16 |
| video-based-generative-performance-1 | LLaMA Adapter | gpt-score: 2.03 |
| video-based-generative-performance-2 | LLaMA Adapter | gpt-score: 2.15 |
| video-based-generative-performance-3 | LLaMA Adapter | gpt-score: 2.30 |
| video-based-generative-performance-4 | LLaMA Adapter | gpt-score: 2.32 |
| video-based-generative-performance-5 | LLaMA Adapter | gpt-score: 1.98 |
| video-question-answering-on-activitynet-qa | LLaMA Adapter V2 | Accuracy: 34.2 Confidence score: 2.7 |
| visual-question-answering-on-mm-vet | LLaMA-Adapter v2-7B | GPT-4 score: 31.4±0.1 Params: 7B |
| visual-question-answering-vqa-on-core-mm | LLaMA-Adapter V2 | Abductive: 46.12 Analogical: 22.08 Deductive: 28.7 Overall score: 30.46 Params: 7B |
| zeroshot-video-question-answer-on-activitynet | LLaMA Adapter | Accuracy: 34.2 Confidence Score: 2.7 |
| zeroshot-video-question-answer-on-msrvtt-qa | LLaMA Adapter-7B | Accuracy: 43.8 Confidence Score: 2.7 |
| zeroshot-video-question-answer-on-msvd-qa | LLaMA Adapter-7B | Accuracy: 54.9 Confidence Score: 3.1 |