← Back to Multimodal Mind Map
👁️ MultimodalID: vlm-three-stage

VLM 3-Stage Pipeline

VLM 三阶段训练
🎯Core Definition
The VLM 3-stage pipeline (LLaVA/Qwen2-VL paradigm) proceeds through alignment → interleaved pretraining → visual instruction SFT, with per-stage freezing:
📌Overview
| Stage | Vision encoder | Projector | LLM | Data | Purpose | |:--|:--|:--|:--|:--|:--| | Stage 1 alignment | frozen | train | frozen | image-text pairs (e.g. CC3M ~558K) | map vision features into text embedding space | | Stage 2 interleaved pretrain | frozen | train | unfrozen (full) | interleaved docs + high-quality pairs | world knowledge, multi-image & long context | | Stage 3 visual SFT | frozen | train | unfrozen (full or LoRA) | visual instruction data (VQA/dialogue) | instruction alignment & dialogue |
📌Overview
The projector (two-layer MLP in LLaVA; Q-Former in BLIP-2/Qwen-VL) maps vision features into LLM embeddings: hv=MLPϕ(ViTψ∗(x))h_v = \text{MLP}_\phi(\text{ViT}_{\psi^*}(x)) with ψ∗\psi^* denoting frozen encoder weights; every stage's objective is masked CE on assistant text tokens (see the masked-cross-entropy card). Why the vision encoder stays frozen throughout: CLIP/SigLIP features are high-quality and stable — unfreezing drifts the feature space, demands massive data to re-learn, and removes the encoder's whole backward pass from VRAM and compute.
💡Use Cases
high-frequency interview topic (pipeline, what is frozen per stage, and why); deciding where to apply LoRA under a training budget (usually Stage 3); understanding recipe differences of open models (LLaVA-1.5 two-stage vs Qwen2-VL three-stage).
⚡Key Problems Solved
end-to-end full-parameter training from scratch needs enormous data and tends to destroy vision features; the three stages decouple feature alignment (converges with small data), knowledge injection (heavy compute in pretraining) and instruction alignment (small but critical data) — Stage 1 aligns dimensions/semantics with only ~558K pairs while freezing both towers (projector params are orders of magnitude smaller than the LLM), Stage 2 builds reasoning in joint context, Stage 3 aligns format and preferences — much more efficient and stable than one-shot full training.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of VLM 3-Stage Pipeline.
Use Cases
In production engineering, what are the primary use cases for VLM 3-Stage Pipeline and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Draw the 3-stage VLM pipeline table: what is frozen/trained and which data per stage?
2
Why is the vision encoder frozen throughout? Consequences of unfreezing it?
3
Purpose of Stage-1 projector-only training? Projector input/output dimensions?
4
Stage-3 full fine-tuning vs LoRA: when to use each and the criteria?
5
How does the 3-stage recipe map onto LLaVA's 2-stage and Qwen2-VL's 3-stage?
Updated 2026-08-12
🎯
Verify Mastery: Practice Exam Questions for "VLM 3-Stage Pipeline"
Take pitfall multiple-choice questions with derivation options; mistakes are automatically logged.
🚀 Start Card Practice ➔
← Previous CardNative Any-to-Any MultimodalNext Card →Masked Cross-Entropy Loss

🔗 More Multimodal Knowledge Cards

引用出处: TalentMe 450+ 工业级 AI 架构考点知识库 (Tech Vault) · 遵循 CC-BY-4.0 知识共享协议
URL: https://talentme.airsota.com/resources/tech/roadmap/mindmap/Multimodal/card/vlm-three-stage
中文速览与面试要点

VLM 三阶段训练 (VLM 3-Stage Pipeline)

定义: VLM 三阶段训练 (LLaVA/Qwen2-VL 范式) 按 预对齐 → 图文交错预训练 → 视觉指令 SFT 推进, 各阶段冻结策略如下: | 阶段 | 视觉编码器 | 投影器 | LLM | 数据 | 目的 | |:--|:--|:--|:--|:--|:--| | Stage 1 预对齐 | 冻结 | 训练 | 冻结 | 图文对 (如 CC3M ~558K) | 视觉特征 → 文本 embedding 空间 | | Stage 2 图文交错预训练 | 冻结 | 训练 | 解冻 (全参) | 图文交错文档 + 高质量图文对 | 世界知识 / 多图与长上下文 | | Stage 3 视觉指令 SFT | 冻结 | 训练 | 解冻 (全量或 LoRA) | 视觉指令数据 (VQA/对话) | 指令对齐与对话能力 | 投影器 (LLaVA 用两层 MLP, BLIP-2/Qwen-VL 用 Q-Former) 把视觉特征映射进 LLM embedding: h_v = MLP_ ( ViT_ ^*(x)), ^* 表示编码器参数冻结 (不更新); 每阶段目标都是对 assistant 文本 token 的 Masked CE (见 masked-cross-entropy 卡)。 视觉编码器全程冻结的原因: CLIP/SigLIP 预训练特征质量高且稳定, 解冻会漂移特征空间、需要海量数据重新学, 且冻结 ViT 省掉整个编码器反向传播的显存与算力。 使用场景: 面试高频考“三阶段流程/每阶段冻结什么、为什么”; 训练预算受限时决定在哪一阶段用 LoRA (通常 Stage 3), 或判断开源模型 (LLaVA-1.5 两阶段 vs Qwen2-VL 三阶段) 的配方差异。 解决的问题: 端到端全参从头训 VLM 数据需求大、容易破坏视觉特征; 三阶段把 特征对齐 (小数据可收敛)、知识注入 (大算力放预训练)、指令对齐 (数据少但关键) 解耦——Stage 1 冻结双塔只用 ~558K 图文对即完成维度/语义对齐 (投影器参数量两个数量级小于 LLM), Stage 2 在联合上下文里获得推理, Stage 3 用指令数据对齐格式与偏好, 训练效率与稳定性显著优于一次性全量训练。

核心要点

  • 画出 VLM 三阶段训练流程表: 每阶段冻结什么、训练什么、用什么数据?
  • 为什么视觉编码器全程冻结?解冻会有什么后果?
  • Stage 1 只训投影器的目的?投影器的输入输出维度?
  • Stage 3 何时用全参微调、何时用 LoRA?选择依据?
  • 三阶段配方与 LLaVA 两阶段 / Qwen2-VL 三阶段的对应关系?