# BLIP-2 (2023)

> Connected off-the-shelf frozen ViTs and frozen LLMs through a compact 188M-parameter Querying Transformer trained in two stages.

Page: https://mralbu.github.io/ai-datasets/p/blip-2

## Key facts

- Title: BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Models
- Authors: Junnan Li, Dongxu Li, Silvio Savarese, Steven Hoi
- Venue: ICML 2023
- Category: Vision
- Paper: https://www.alphaxiv.org/abs/2301.12597

## Why it matters

Flamingo showed that frozen vision and language models could work together, but its custom cross-attention layers were massive and tied to one proprietary LLM. BLIP-2 made multimodal bootstrapping modular and affordable, letting researchers swap in stronger open vision encoders and language models as fast as they arrived.

## The idea

Instead of inserting billions of cross-attention parameters inside an LLM, train a small Querying Transformer (Q-Former) with learned query vectors that extract only the text-relevant information from a frozen ViT. Stage 1 aligns the Q-Former to the vision encoder via contrastive, matching and captioning losses; Stage 2 projects its output queries straight into a frozen LLM (OPT or Flan-T5) for generative text output.

## The result

65.0% zero-shot accuracy on VQA v2—beating Flamingo-80B (56.3%) by 8.7 points while training 54× fewer parameters (188M vs 10.2B)—plus 97.6% R@1 image-to-text retrieval on Flickr30k and 121.6 CIDEr zero-shot on NoCaps.

## The data

- [VQA v2 (2017)](https://mralbu.github.io/ai-datasets/d/vqa-v2.md): 1.1 million questions about COCO photos, each answered by ten people.
- [MS COCO (2014)](https://mralbu.github.io/ai-datasets/d/coco.md): 330k everyday scenes with 1.5M labeled objects in 80 categories.
- [Flickr30k (2014)](https://mralbu.github.io/ai-datasets/d/flickr30k.md): 31,000 Flickr photos of people and everyday scenes, each with five written captions.
- [Visual Genome (2016)](https://mralbu.github.io/ai-datasets/d/visual-genome.md): 108,000 images where crowd workers named every object, its attributes and how objects relate.

## Builds on

- [CLIP (2021)](https://mralbu.github.io/ai-datasets/p/clip.md)
- [Flamingo (2022)](https://mralbu.github.io/ai-datasets/p/flamingo.md)

## Led to

- [LLaVA (2023)](https://mralbu.github.io/ai-datasets/p/llava.md)

## Part of

- [Modern VLMs](https://mralbu.github.io/ai-datasets/t/modern-vlms.md) (step 3 of 8)
