论文阅读——llava

Visual Instruction Tuning

LLaVA

指令智能体分为两类:端到端的,通过LangChain[1]/LLM[35]协调各种模型的系统。

论文阅读——llava_第1张图片

数据集生成用GPT辅助生成的,具体不写了。

模型结构:

论文阅读——llava_第2张图片

input image Xv

LLM:Vicuna

visual encoder:pre-trained CLIP visual encoder ViT-L/14

W是为了和词向量一个维度(we apply a trainable projection matrix W to convert Zv into language embedding tokens Hv, which have the same dimensionality as the word embedding space in the language model)

这个线性映射很简单,也可以设计复杂一些,比如gated cross-attention in Flamingo [2] and Q-former in BLIP-2。

Training:

给一张图片有很多问答对:

这就使得多模态指令的统一格式。使用LLM的原始自回归训练目标,对LLM预测的tokens执行指令调整。

论文阅读——llava_第3张图片

两阶段训练:

Stage 1: Pre-training for Feature Alignment.

对于图像Xv,随机采样问题Xq,这是要求assistant简要描述图像的语言指令。GT答案Xa是原始标题。

保持视觉编码器和LLM权重冻结,并仅在可训练参数θ=W(投影矩阵)

Stage 2: Fine-tuning End-to-End.

保持视觉编码器权重冻结,并继续更新LLaVA中投影层和LLM的预训练权重

实验:

论文阅读——llava_第4张图片

论文阅读——llava_第5张图片

你可能感兴趣的:(论文,人工智能)