Papers › Flamingo: a Visual Language Model for Few-Shot Learning

Flamingo: a Visual Language Model for Few-Shot Learning

29 Apr 2022DeepMind 2022 4arXiv:2204.14198archive 2025-07-28

Jean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech, Iain Barr, Yana Hasson, Karel Lenc, Arthur Mensch, Katie Millican, Malcolm Reynolds, Roman Ring, Eliza Rutherford, Serkan Cabi, Tengda Han, Zhitao Gong, Sina Samangooei, Marianne Monteiro, Jacob Menick, Sebastian Borgeaud, Andrew Brock, Aida Nematzadeh, Sahand Sharifzadeh, Mikolaj Binkowski, Ricardo Barreira, Oriol Vinyals, Andrew Zisserman, Karen Simonyan

Building models that can be rapidly adapted to novel tasks using only a handful of annotated examples is an open challenge for multimodal machine learning research. We introduce Flamingo, a family of Visual Language Models (VLM) with this ability. We propose key architectural innovations to: (i) bridge powerful pretrained vision-only and language-only models, (ii) handle sequences of arbitrarily interleaved visual and textual data, and (iii) seamlessly ingest images or videos as inputs. Thanks to their flexibility, Flamingo models can be trained on large-scale multimodal web corpora containing arbitrarily interleaved text and images, which is key to endow them with in-context few-shot learning capabilities. We perform a thorough evaluation of our models, exploring and measuring their ability to rapidly adapt to a variety of image and video tasks. These include open-ended tasks such as visual question-answering, where the model is prompted with a question which it has to answer; captioning tasks, which evaluate the ability to describe a scene or an event; and close-ended tasks such as multiple-choice visual question-answering. For tasks lying anywhere on this spectrum, a single Flamingo model can achieve a new state of the art with few-shot learning, simply by prompting the model with task-specific examples. On numerous benchmarks, Flamingo outperforms models fine-tuned on thousands of times more task-specific data.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2204.14198")

Code

Syntology Ran 18 of 24 code samples harvested from 4 repositories linked to this paper; 6 have no recorded run. Of those that ran: 1 ran · violated contract; 6 ran · our draft was wrong; 11 ran with no contract checked.

By repository: community (archive-listed): 24 samples from 4 repositories, 18 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

doc-doc/NExT-OE mentioned on GitHubpytorch report
happen2me/cross-gnn mentioned on GitHubpytorch report
mlfoundations/open_flamingo mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

24 samples harvested; 18 ran; 0 honoured the contract we drafted; 6 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · violated contract
6ran · our draft was wrong
11ran
6unverified

Licence: 7 of the 24 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 4 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

FeedForward happen2me/cross-gnn/models/flamingo.py community (archive-listed) ran · our draft was wrong no licence file found · pointer only · d2cbfbdf5d175293 · report
FeedForward mlfoundations/open_flamingo/open_flamingo/src/flamingo.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 169a4ac97467ef76 · report
FeedForward lucidrains/flamingo-pytorch/flamingo_pytorch/flamingo_pytorch.py community (archive-listed) ran MIT (permissive) · a89330150e46391d · report
FlamingoCausalLMOutputWithCrossAttentions happen2me/cross-gnn/models/flamingo.py community (archive-listed) ran · metamorphic tier: deterministic no licence file found · pointer only · 98b69f6a47879974 · report
FlamingoConfig happen2me/cross-gnn/models/flamingo.py community (archive-listed) ran · metamorphic tier: deterministic no licence file found · pointer only · 51f18d348dec5cf5 · report
GatedCrossAttentionBlock happen2me/cross-gnn/models/flamingo.py community (archive-listed) ran · metamorphic tier: deterministic no licence file found · pointer only · c8218f7ce578b5de · report
MaskedCrossAttention happen2me/cross-gnn/models/flamingo.py community (archive-listed) ran · metamorphic tier: deterministic no licence file found · pointer only · 00768fd117651888 · report
MaskedMultiHeadAttention doc-doc/NExT-OE/networks/q_v_transformer.py community (archive-listed) ran MIT (permissive) · cba160ad51d9b9c4 · report
MaskedPositionalWiseFeedForward doc-doc/NExT-OE/networks/q_v_transformer.py community (archive-listed) ran fingerprinted MIT (permissive) · d09369fe81f54586 · report
MaskedScaledDotProductAttention doc-doc/NExT-OE/networks/q_v_transformer.py community (archive-listed) ran MIT (permissive) · 3de90c17165b445d · report
PerceiverAttention mlfoundations/open_flamingo/open_flamingo/src/flamingo.py community (archive-listed) ran MIT (permissive) · 65ec29626e592e07 · report
PerceiverResampler mlfoundations/open_flamingo/open_flamingo/src/flamingo.py community (archive-listed) ran · metamorphic tier: deterministic MIT (permissive) · d7676545407e647c · report
PositionalEncoding doc-doc/NExT-OE/networks/q_v_transformer.py community (archive-listed) ran MIT (permissive) · 07f824c36726e2e6 · report
apply_rotary_pos_emb lucidrains/flamingo-pytorch/flamingo_pytorch/flamingo_palm.py community (archive-listed) ran · our draft was wrong fingerprinted MIT (permissive) · fd592af960c2230e · report
exists lucidrains/flamingo-pytorch/flamingo_pytorch/flamingo_palm.py community (archive-listed) ran · violated contract MIT (permissive) · aa5486a3650902d8 · report
padding_mask_k doc-doc/NExT-OE/networks/q_v_transformer.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 784d83b86ef3420a · report
padding_mask_q doc-doc/NExT-OE/networks/q_v_transformer.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 1d75807b764af41c · report
rotate_half lucidrains/flamingo-pytorch/flamingo_pytorch/flamingo_palm.py community (archive-listed) ran · our draft was wrong fingerprinted MIT (permissive) · fdd93453f92f9167 · report
Flamingo mlfoundations/open_flamingo/open_flamingo/src/flamingo.py community (archive-listed) unverified MIT (permissive) · f908fc9abf51351f · report
FlamingoDecoderBaseModel happen2me/cross-gnn/models/flamingo.py community (archive-listed) unverified no licence file found · pointer only · ff5084867dff89f3 · report
HijackedLMBlock happen2me/cross-gnn/models/flamingo.py community (archive-listed) unverified no licence file found · pointer only · 458a3153261db764 · report
MaskedCrossoverTransformer doc-doc/NExT-OE/networks/q_v_transformer.py community (archive-listed) unverified MIT (permissive) · 5dfb80e194f33d12 · report
MaskedCrossoverTransformerLayer doc-doc/NExT-OE/networks/q_v_transformer.py community (archive-listed) unverified MIT (permissive) · e75370a7c51938e8 · report
apply_with_stopping_condition mlfoundations/open_flamingo/open_flamingo/src/flamingo.py community (archive-listed) unverified MIT (permissive) · 7709ecb3e78084fd · report

Tasks

Few-Shot LearningGenerative Visual Question AnsweringLanguage ModelingLanguage ModellingMedical Visual Question AnsweringMeme ClassificationMultiple-choiceQuestion AnsweringTemporal/Casual QAVideo Question AnsweringVideo UnderstandingVisual Question AnsweringVisual Question Answering (VQA)Zero-Shot Cross-Modal RetrievalZero-Shot LearningZero-Shot Video Question Answer

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Action Recognition RareAct 🦩 Flamingo mWAP 60.8 #1 of 3 Archive leaderboard report
Generative Visual Question Answering PMC-VQA Open-Flamingo BLEU-1 4.1 #3 of 3 Archive leaderboard report
Meme Classification Hateful Memes Flamingo (fine-tuned) ROC-AUC 0.866 #6 of 17 Archive leaderboard report
Meme Classification Hateful Memes Flamingo (few-shot:32) ROC-AUC 0.700 #16 of 17 Archive leaderboard report
Temporal/Casual QA NExT-QA Flamingo(32-shot) WUPS 33.5 #4 of 8 Archive leaderboard report
Temporal/Casual QA NExT-QA Flamingo(0-shot) WUPS 26.7 #7 of 8 Archive leaderboard report
Video Question Answering STAR Benchmark Flamingo-9B (4-shot) Average Accuracy 42.8 #13 of 17 Archive leaderboard report
Video Question Answering STAR Benchmark Flamingo-80B (4-shot) Average Accuracy 42.4 #14 of 17 Archive leaderboard report
Video Question Answering STAR Benchmark Flamingo-9B (0-shot) Average Accuracy 41.8 #15 of 17 Archive leaderboard report
Video Question Answering STAR Benchmark Flamingo-80B (0-shot) Average Accuracy 39.7 #16 of 17 Archive leaderboard report
Visual Question Answering (VQA) MSRVTT-QA Flamingo Accuracy 0.474 #5 of 34 Archive leaderboard report
Visual Question Answering (VQA) MSRVTT-QA Flamingo (32-shot) Accuracy 0.310 #32 of 34 Archive leaderboard report
Visual Question Answering (VQA) MSRVTT-QA Flamingo (0-shot) Accuracy 0.174 #34 of 34 Archive leaderboard report
Visual Question Answering (VQA) OK-VQA Flamingo80B Accuracy 50.6 #18 of 37 Archive leaderboard report
Visual Question Answering (VQA) OK-VQA Flamingo9B Accuracy 44.7 #24 of 37 Archive leaderboard report
Visual Question Answering (VQA) OK-VQA Flamingo3B Accuracy 41.2 #27 of 37 Archive leaderboard report
Visual Question Answering (VQA) PMC-VQA Open-Flamingo Accuracy 26.4 #2 of 4 Archive leaderboard report
Visual Question Answering (VQA) VQA v2 test-dev Flamingo 80B Accuracy 56.3 #49 of 56 Archive leaderboard report
Visual Question Answering (VQA) VQA v2 test-dev Flamingo 9B Accuracy 51.8 #52 of 56 Archive leaderboard report
Visual Question Answering (VQA) VQA v2 test-dev Flamingo 3B Accuracy 49.2 #55 of 56 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval COCO 2014 Flamingo Image-to-text R@1 65.9 #10 of 18 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval COCO 2014 Flamingo Image-to-text R@10 92.9 #10 of 18 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval COCO 2014 Flamingo Image-to-text R@5 87.3 #10 of 18 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval COCO 2014 Flamingo Text-to-image R@1 48.0 #10 of 18 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval COCO 2014 Flamingo Text-to-image R@10 82.1 #10 of 18 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval COCO 2014 Flamingo Text-to-image R@5 73.3 #10 of 18 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval Flickr30k Flamingo Image-to-text R@1 89.3 #12 of 22 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval Flickr30k Flamingo Image-to-text R@10 99.7 #12 of 22 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval Flickr30k Flamingo Image-to-text R@5 98.8 #12 of 22 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval Flickr30k Flamingo Text-to-image R@1 79.5 #12 of 22 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval Flickr30k Flamingo Text-to-image R@10 97.9 #12 of 22 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval Flickr30k Flamingo Text-to-image R@5 95.3 #12 of 22 Archive leaderboard report
Zero-Shot Video Question Answer STAR Benchmark Flamingo-9B Accuracy 41.8 #3 of 4 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections