Skip to content
Gopi Krishna Tummala
Back

When AI Sees and Speaks — The Rise of Vision-Language Models

Updated

When AI Sees and Speaks: The Rise of Vision-Language Models

“What I cannot create, I do not understand.” — Richard Feynman

Welcome to the chapter where we build—step by step—the intuition behind machines that can look at an image, follow a conversation, and answer with surprising nuance. Vision-language models (VLMs) are the hybrid children of vision systems and language models. They are the glue that lets GPT-style reasoning ride on top of our richly visual world.

This post keeps the storytelling tone of the vLLM magic series, but lays things out like a modern textbook: conceptual hooks, annotated diagrams-in-words, simple math when it matters, and curiosity prompts along the way. Most importantly, each milestone highlights the one technical hurdle it solved—the “why” behind the breakthrough—so the full arc feels inevitable.


1. The Big Idea: Seeing Meets Speaking

Imagine you DM an AI a picture of your desk and ask, “What’s wrong here?” In a blink it replies, “The lamp blocks the monitor.” That reply is not memorized trivia. It is grounded in the pixels it just saw.

Traditional AI systems lived siloed lives:

  • Vision models (resnets, CNNs) could classify cats vs. dogs, but they had nothing interesting to say about them.
  • Language models (GPT, LLaMA) could spin poetry, but only from text prompts.

A vision-language model collapses that boundary. It takes in pixels and prose together, maps them into a shared latent space (a shared embedding space), and reasons across both. When it “talks,” it is pulling evidence from what it “sees.”


2. From CNNs to Transformers: How AI Learned to See Context

CNNs (Convolutional Neural Networks) trained on ImageNet in 2012 kick-started modern computer vision. They look at images through sliding windows, capturing low-level patterns (edges, textures, shapes). This architecture is terrific for object classification, but it leans hard on spatial locality—features near each other interact, while distant relationships remain faint. That’s why it struggles with relational context—a cat wearing sunglasses while riding a skateboard.

Transformers changed the game for language in 2017 by introducing attention: a way to connect distant tokens dynamically, prioritizing semantic non-locality. The insight that followed was almost inevitable:

If attention lets language models track relationships across words, could it do the same for pixels?

Yes. Split an image into patches, treat each patch like a visual word (a patch token), prepend a special [CLS] token for a global summary, and feed everything to the same self-attention machinery. This is the Vision Transformer (ViT) (Dosovitskiy et al., 2020). ViTs opened the door to unified architectures where attention could flow freely between visual and textual cues.


3. Multimodality: When Two Worlds Collide

“Multimodal” simply means “many types of input.” Humans integrate sight, sound, touch, and language seamlessly. AI, until recently, did not.

Vision-language models are trained on paired data: images with captions, diagrams with labels, screenshots with transcripts, even memes with alt text. Each modality is embedded into vectors that live in the same geometric space. Inside that shared space, “fluffy,” “jumping,” and “corgi” converge—even if one arrived via pixels and another via words.

Think of this shared latent space as the VLM’s multimodal mind. Once learned, the model can project either modality back out:

  • Given an image embedding, generate a grounded sentence.
  • Given a textual query, retrieve matching images.
  • Given both, answer a question that binds them (“Is the person on the left wearing a watch?”).

4. CLIP — The Translator Between Sight and Words

CLIP (Contrastive Language–Image Pretraining), introduced by OpenAI in 2021, is the pivotal bridge. The hurdle it cleared: learning a shared embedding space without labeled categories. CLIP is not a caption generator; it is a matching engine that performs zero-shot learning for new concepts it never saw named during training.

How CLIP Works

  1. Dual towers: one ViT (or ResNet) for images, one Transformer for text.
  2. Symmetric contrastive objective: given a batch of image–caption pairs, push matching embeddings together and push mismatches apart. Both towers receive gradients via a shared InfoNCE loss—image predictions supervise text embeddings and vice versa (Radford et al., 2021). Intuitively: maximize sim(I, T_match) and minimize sim(I, T_mismatch).
  3. Scale: trained on roughly 400 million image–text pairs scraped from the public internet.

Why It Matters

The result is a shared latent space where novel concepts emerge without explicit labels. Show CLIP a photo of sushi and the prompt “pizza.” The embeddings disagree strongly. Show it “salmon nigiri,” and the alignment snaps into place. This is zero-shot generalization: new categories, no fine-tuning required. The trade-off is that CLIP excels at alignment but cannot generate language—it set the stage for models like BLIP that tackle generation.

Diagram (mental image)

[DIAGRAM: Two vertical towers (vision/text) output arrows into a shared 2D blob. Positive pairs connect with green lines; negatives get red arrows pushing them apart.]


5. ALBEF — Align Before You Fuse

ALBEF (Li et al., 2021) refined CLIP’s idea with a two-stage mantra: Align the modalities first, then Fuse them for deeper reasoning. The hurdle it cleared: preventing early fusion from collapsing before the embeddings were well aligned.

  • Alignment stage: same contrastive loss as CLIP, referred to as Image-Text Contrastive (ITC).
  • Fusion stage: a multimodal transformer performs cross-attention over the aligned embeddings.
  • Training signal trio: ITC, Image-Text Matching (ITM) for coarse alignment, and Masked Language Modeling (MLM) for fine-grained grounding.
  • Momentum Distillation (MoD): a momentum-updated teacher network guides the student via soft targets, improving generalization and sample efficiency.

The payoff? Momentum Distillation lets ALBEF learn robust representations with fewer labeled samples, and the staged training inspired a family of models that treat alignment and fusion as distinct learning problems rather than one monolithic block.


6. BLIP — The Storyteller

BLIP (Bootstrapped Language–Image Pretraining), released by Salesforce in 2022, steps beyond understanding into generation. The hurdle it cleared: coupling strong alignment with fluent captioning so the model could speak about what it sees.

Architecture

  1. Vision encoder: typically a ViT.
  2. Text encoder/decoder: BERT-like or GPT-like transformer.
  3. Cross-attention bridge: lets the language stack “peek” at visual tokens.

Training Curriculum

  1. Contrastive pretraining: learn broad alignment.
  2. Captioning: fine-tune the decoder to describe images.
  3. Bootstrapping: use the model’s own confident captions to expand the training set (self-training).

Capabilities

  • Produce detailed captions: “Two children flying a red kite on a windy beach.”
  • Answer grounded questions: “What color is the kite?” → “Red.”
  • Retrieve images by natural language queries.

BLIP is the first widely adopted model to marry retrieval-style pretraining with language generation under one roof.

BLIP-2’s Q-Former Bridge. BLIP-2 (Li et al., 2023) faced a new hurdle: how to connect a large frozen vision encoder to a frozen LLM without training either. Its answer was the Querying Transformer (Q-Former)—a lightweight set of learnable query vectors that extract a small, fixed number of salient visual features. This bottleneck keeps the LLM from being overwhelmed by hundreds of redundant visual tokens while preserving the richest information.


7. Flamingo — The Conversationalist

DeepMind’s Flamingo (Alayrac et al., 2022) is where conversation enters the scene. It can ingest interleaved sequences of images and text, then continue the dialogue grounded in those visuals. Flamingo’s hurdle: teach a frozen LLM to “see” without destroying its linguistic fluency.

Key Ingredients

  • A frozen large language model (e.g., Chinchilla) retains fluent text generation.
  • A Perceiver Resampler compresses high-dimensional visual features into a manageable set of tokens.
  • Gated cross-attention layers insert visual context at multiple points, without unfreezing the base LLM. Each gate is a learned scalar that decides how much visual evidence to admit, so irrelevant images do not corrupt the language model’s prior knowledge.

Training Sources

An eclectic mix: curated image–caption pairs, video transcripts, document layouts, and instructional data. Flamingo excels at few-shot learning—you can show it a couple of example Q&A pairs with images, then it generalizes to new ones.


8. MiniGPT-4 and LLaVA — Open-Source Multimodal Fusion

Researchers quickly asked: can we replicate GPT-4V-like behavior with open components? The hurdle here: prove that a lightweight alignment layer is enough to let a language model reason over vision embeddings.

  • MiniGPT-4 (Zhu et al., 2023): couples a frozen CLIP ViT with Vicuna (an instruction-tuned LLaMA) through a simple linear projection layer. Stage one aligns embeddings via regression; stage two instruction-tunes on curated multimodal dialogues (e.g., ShareGPT4V, LAION VQA).
  • LLaVA (Liu et al., 2023): similar recipe but with a small multimodal adapter and high-quality synthetic instruction data generated by GPT-4.

These projects demonstrated that robust visual dialogue emerges even when only a thin alignment layer is trained. The LLM retains linguistic knowledge; the adapter merely translates the visual embeddings into its “ear.”


9. Kosmos, GPT-4V, and Gemini — Toward General Multimodal Intelligence

The frontier models extend beyond static images:

  • Kosmos-1 (Microsoft, 2023): performs grounded language generation on text, images, and audio. It introduced multimodal chain-of-thought reasoning benchmarks.
  • GPT-4V (OpenAI, 2023): powers ChatGPT’s image understanding. It can interpret charts, read handwriting, or critique UI screenshots. Internally it maps visual tokens into the LLM context window and relies on standard attention to mix them—an advanced but still largely late-fusion design.
  • Gemini (Google DeepMind, 2024): a family (Nano, Pro, Ultra) designed for native multimodality. Rather than bolting vision onto a language core, Gemini trains a unified transformer to ingest text, images, audio, and video from the start. This unified-weight architecture is the Holy Grail: one model that treats every modality as first-class.

Though architectural specifics are proprietary, public descriptions and papers indicate shared design principles: unified tokenization pipelines, cross-modal attention, and large-scale instruction fine-tuning across modalities.


10. A Unified Mental Model

Here is a simplified pipeline that captures the common pattern. At its core is the same push–pull contrastive idea introduced by CLIP: maximize sim(I, T_match) while minimizing sim(I, T_mismatch).

This pressure carves a shared latent space before any fusion happens.

Once aligned, the pipeline unfolds as follows:

  1. Encode vision: Image II → patches → hidden tokens V={v1,,vm}V = \{v_1, \dots, v_m\}.
  2. Encode text: Prompt TT → tokens → hidden tokens L={1,,n}L = \{\ell_1, \dots, \ell_n\}.
  3. Project or resample: Map VV into the language model’s embedding space via a learned adapter fθf_\theta. In practice, perceiver resamplers and Q-Formers compress hundreds of raw visual tokens into a fixed set V={v1,,vk}V' = \{v'_1, \dots, v'_k\} with kmk \ll m.
  4. Fuse: Concatenate or interleave fθ(V)f_\theta(V') with LL, feed into transformer layers with self- and cross-attention.
  5. Decode: Generate next token probabilities conditioned on both modalities: p(xtx<t,fθ(V)).p(x_{t} \mid x_{<t}, f_\theta(V)).

Simple proportional reasoning grounds the engineering constraints:

  • Context length pressure: Adding mm visual tokens reduces available room for text in fixed-size contexts. Efficient resampling keeps kk small (Flamingo’s resampler, BLIP-2’s Q-Former, Gemini’s multimodal tokens).
  • Attention constraint: Each attention layer’s compute and memory cost scales as O((m+n)2)\mathcal{O}((m+n)^2). A full-resolution image might produce m1000m \approx 1000 patch tokens; compressing to k32k \approx 32 multimodal tokens is the difference between tractable chat latency and GPU meltdown.

11. Practical Applications

  • Assistive tech: Describe surroundings for visually impaired users in real time (Be My Eyes × GPT-4V).
  • Creative tooling: Generate alt text, storyboard descriptions, meme explanations.
  • Enterprise analytics: Interpret dashboards, annotate slides, triage documents with embedded charts.
  • Robotics & agents: Understand visual feedback from cameras, plan actions using natural language instructions.
  • Science & medicine: Read radiology scans with structured reports; analyze microscopy images with textual hypotheses (ongoing research—requires careful validation).

12. Open Questions and Current Limits

  1. Reliability: VLMs still hallucinate, especially on fine-grained details (counting objects, reading blurry text). Evaluations like TextCaps, VizWiz, and MMMU expose failure modes.
  2. Data quality: Many training captions are noisy or biased. Synthetic data generation (e.g., BLIP2 self-training, LLaVA-1.5) helps, but bias mitigation remains an open problem.
  3. Temporal reasoning: Single images are not enough; video understanding introduces motion and causality. Models like Flamingo and Gemini take steps, but long-horizon reasoning is nascent.
  4. Privacy & copyright: Scraped web data raises licensing questions, especially for commercial deployments.

13. Summary Table

ModelYearArchitectureTraining SignalSignature Capability
CLIP (Radford et al.)2021Dual-encoder (ViT + Transformer)Symmetric contrastive / ITM loss on 400M web pairsZero-shot recognition
ALBEF (Li et al.)2021Align-then-fuse transformer + MoD teacherITC + ITM + MLM with Momentum DistillationEfficient multimodal fusion
BLIP / BLIP-2 (Li et al.)2022–23ViT + text decoder (+ Q-Former bridge in BLIP-2)Bootstrapped captioning, instruction tuningGrounded captioning & QA
Flamingo (Alayrac et al.)2022Frozen LLM + Perceiver Resampler + gated cross-attnFew-shot multimodal LMVisual conversation
MiniGPT-4 / LLaVA2023CLIP encoder + LLaMA + linear adapterAlignment regression + multimodal instructionsOpen multimodal chat
Kosmos-1 (Huang et al.)2023Unified multimodal transformerMultisource pretraining + groundingMultimodal chain-of-thought
GPT-4V2023Proprietary late-fusion multimodal transformerHuman + synthetic feedbackGeneral visual reasoning
Gemini2024Unified multimodal family (text+image+audio+video)Massive multimodal instruction tuningNative multimodal intelligence

14. Looking Ahead: Beyond Pixels and Paragraphs

We are now edging toward world models—systems that integrate perception, language, and action. Future VLMs will not only describe a scene but predict what happens next, simulate alternative futures, or manipulate content safely (e.g., editing a diagram while preserving semantics).

Research directions to watch:

  • Multimodal alignment with less data: using synthetic generation, distillation, and active learning.
  • Causal reasoning: combining physical priors with neural attention.
  • Efficient deployment: quantizing multimodal adapters, speculative decoding for mixed tokens, streaming vision inputs.
  • Trustworthiness: watermarking generated captions, auditing visual hallucinations, grounding with explicit retrieval.

15. Suggested Exercises and Curiosity Hooks

  • Reverse engineer CLIP: take a public dataset (COCO, Flickr30k), train a tiny dual-encoder, and visualize the embedding space with t-SNE.
  • Prompt engineering challenge: craft prompts that cause MiniGPT-4 or LLaVA to hallucinate. What patterns emerge?
  • Diagram sketch: draw your own [DIAGRAM: Two-tower model merging into a multimodal transformer] and annotate where attention flows.
  • Comparison study: run Flamingo-style few-shot evaluations on VizWiz vs. TextCaps to see how models handle accessibility data.

Learning by creating—and occasionally breaking—these systems is the closest we get to the Feynman ideal in multimodal AI.


16. References and Further Reading

  • Radford, A. et al. (2021). Learning Transferable Visual Models from Natural Language Supervision. arXiv:2103.00020.
  • Li, J. et al. (2021). Align Before Fuse: Vision and Language Representation Learning with Momentum Distillation. arXiv:2107.07651.
  • Li, J. et al. (2022). BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation. arXiv:2201.12086.
  • Li, J. et al. (2023). BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Models. arXiv:2301.12597.
  • Alayrac, J.-B. et al. (2022). Flamingo: a Visual Language Model for Few-Shot Learning. arXiv:2204.14198.
  • Zhu, D. et al. (2023). MiniGPT-4: Enhancing Vision-Language Understanding with Advanced Large Language Models. arXiv:2304.10592.
  • Liu, H. et al. (2023). Visual Instruction Tuning. arXiv:2304.08485. (LLaVA)
  • Huang, J. et al. (2023). Language Is Not All You Need: Aligning Perception with Language Models. arXiv:2302.14045. (Kosmos-1)
  • OpenAI (2023). GPT-4 Technical Report. arXiv:2303.08774.
  • Google DeepMind (2023-24). Gemini: A Family of Highly Capable Multimodal Models. Technical blog and whitepaper.

If you want illustration placeholders, drop a comment like [TODO: diagram of CLIP dual encoder] where you imagine the figure. Happy to help scaffold those next. Until then, enjoy the feeling of watching an AI squint at the world and explain what it sees—almost like we do.

— Gopi Krishna Tummala, curious engineer exploring how machines learn to think.