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

VLM Architecture

VLM 架构
🎯Core Definition
The standard VLM (Vision-Language Model) recipe is three parts — vision encoder + projector + LLM: the vision encoder (CLIP ViT) patchifies the image into visual features zvisz_{vis}, the projector (MLP/Q-Former) maps them into the LLM's text embedding space, and the LLM generates text autoregressively, trained by cross-entropy on assistant tokens: L=−∑tlog⁡p(yt∣y<t,v)\mathcal{L} = -\sum_t \log p(y_t \mid y_{<t}, \mathbf{v}). Fusion placement defines the family: LLaVA/Qwen-VL fuse at the LLM input (projected visual tokens prepended to the input sequence); BLIP-2 compresses via Q-Former cross-attention before injection; Flamingo inserts cross-attention layers inside the LLM (interleaved fusion).
💡Use Cases
visual question answering (VQA), image captioning, OCR/document understanding, chart reasoning, video understanding, and as the perception layer of multimodal agents; interviews ask about the differences between the three fusion placements and the rationale for each.
⚡Key Problems Solved
training a truly native multimodal transformer from scratch is prohibitively expensive in data and compute; the modular recipe reuses an LLM's language ability and CLIP's vision ability, requiring training only a lightweight projector (millions of parameters) to connect vision into language — three-stage training (alignment → interleaved pretraining → visual SFT) reduces the cost from training an LLM to fine-tuning one, while inheriting open-source strength in both modalities.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of VLM Architecture.
Use Cases
In production engineering, what are the primary use cases for VLM Architecture and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
The VLM three-part recipe: responsibilities of encoder / projector / LLM?
2
LLaVA (input-level fusion) vs Flamingo (layer-level cross-attention): differences?
3
Why project visual features into the text embedding space? How is the dimension mismatch handled?
4
Why is the VLM loss cross-entropy over text tokens only? Is there no loss on images?
5
Native multimodal (GPT-4o/Chameleon) vs modular VLM (LLaVA): architecture trade-offs?
Updated 2026-08-12
🎯
Verify Mastery: Practice Exam Questions for "VLM Architecture"
Take pitfall multiple-choice questions with derivation options; mistakes are automatically logged.
🚀 Start Card Practice ➔
← Previous CardCLIP ApplicationsNext Card →Vision Encoder

🔗 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-architecture
中文速览与面试要点

VLM 架构 (VLM Architecture)

定义: 视觉语言模型 (VLM) 的标准范式是「视觉编码器 + 投影器 + LLM」三段式: 视觉编码器 (CLIP ViT) 把图像切成 patch 编码成视觉特征 z_vis, 投影器 (MLP/Q-Former) 把它对齐到 LLM 的文本嵌入空间, LLM 自回归生成文本, 训练目标是对 Assistant 文本 token 的交叉熵 L = - _t p(y_t y_<t, v)。融合位置决定流派: LLaVA/Qwen-VL 在 LLM 输入层融合 (投影后视觉 token 拼进输入序列); BLIP-2 用 Q-Former 跨注意力先压缩再注入; Flamingo 把 cross-attention 层插进 LLM 各层 (interleaved fusion)。 使用场景: 视觉问答 (VQA)、图像描述、OCR/文档理解、图表推理、视频理解, 以及多模态 Agent 的感知层; 面试常考「三种融合方式的差异」与「为什么选这个架构」。 解决的问题: 从零训练原生多模态 Transformer 的数据与算力代价过高; 三段式复用现成 LLM 的语言能力 + CLIP 的视觉能力, 只需训练轻量投影器 (百万级参数) 就能把视觉接入语言——三阶段训练 (预对齐 → 图文交错预训练 → 视觉 SFT) 把成本从「训练一个 LLM」降到「微调一个 LLM」, 且视觉/语言能力各自继承开源模型积累。

核心要点

  • VLM 三段式架构 (编码器/投影器/LLM) 各自的职责是什么?
  • LLaVA (输入层融合) 与 Flamingo (层内 cross-attention) 的区别?
  • 为什么视觉特征要投影到文本嵌入空间?维度不匹配怎么处理?
  • VLM 训练目标为什么只算文本 token 的交叉熵?图像部分没有 loss 吗?
  • 原生多模态 (GPT-4o/Chameleon) 与模块化 VLM (LLaVA) 的架构取舍?