The publication AI reads — a remote MCP server, nothing to install.Connect your agent →
Vision, audio and multimodal·Updated

Multimodal models: how CLIP and Flamingo join modalities

Images, audio and text now feed a single model. Here is how they get joined

What is a multimodal model?

A multimodal model is a neural network that takes more than one kind of input — images and text, or video and text — and learns a joint representation of them. It does not treat each kind as a separate problem. Instead of training a vision system and a language system in isolation, the model learns how the two relate.

Two broad approaches dominate the papers that established the field. CLIP (Radford et al., 2021), from OpenAI, learns a shared embedding space for images and text through contrastive pretraining, so an image and its caption land near each other and mismatched pairs land far apart. Flamingo (Alayrac et al., 2022), from DeepMind, instead bolts a vision encoder onto a frozen large language model, so the combined system can read images and generate open-ended text about them.

How does contrastive pretraining work?

CLIP trains an image encoder and a text encoder together on batches of image-text pairs scraped from the internet. For a batch of N pairs, the model scores all N-by-N possible image-text combinations by cosine similarity. It is trained to make the true pairings score high and every mismatched combination score low. Radford et al. (2021) call this a 'contrastive' objective, because the model learns by contrast between correct and incorrect pairings, not by reproducing exact caption text.

That choice mattered for efficiency. The paper reports that swapping an earlier caption-prediction objective for the contrastive one gave a fourfold improvement in the rate of zero-shot transfer to ImageNet. That came on top of a threefold gain from using a bag-of-words target instead of predicting exact words. CLIP trained on 400 million image-text pairs the authors collected and called WIT, for WebImageText.

The outcome is a shared embedding space. Put an image through the image encoder and a sentence through the text encoder. If they describe the same thing, their vectors sit close together — with no labelled classes anywhere in training.

How is CLIP used for zero-shot classification?

Because CLIP's text encoder can embed any sentence, it doubles as a classifier generator. Embed the names of a dataset's classes as short phrases, such as 'a photo of a {label}', and pick whichever class embedding is closest to the image. Radford et al. (2021) report this zero-shot approach reaches 76.2% top-1 accuracy on ImageNet, matching the original ResNet-50 without using any of its 1.28 million training images.

Across more than 30 datasets the paper tested, zero-shot CLIP beat a fully supervised linear classifier on ResNet-50 features on 16 of 27 compared datasets. That included a 14.5-point edge on the Kinetics700 action-recognition benchmark. It did badly on specialised tasks such as satellite imagery, tumour detection and counting objects in synthetic scenes — tasks the paper says even non-expert humans find easier than CLIP does.

How does Flamingo join a vision encoder to a language model?

Flamingo takes a different route. Rather than build a shared embedding space from scratch, it connects an already-pretrained vision encoder to an already-pretrained, frozen language model, and trains only the connecting pieces. A Perceiver Resampler, borrowed in spirit from the Perceiver architecture, compresses a variable number of image or video features down to a fixed 64 visual tokens per image, Alayrac et al. (2022) write.

Those tokens then feed newly inserted 'gated cross-attention dense' layers, interleaved between the frozen language model's own layers. Each new layer is multiplied at initialisation by a learnable gate set to zero, via a tanh function. So the model starts out behaving exactly like the unmodified language model, and only gradually learns to use the visual signal. The paper's ablations show removing this gating drops its overall score by 4.2%.

Trained this way, on web-scraped interleaved image-and-text pages alongside paired image-text and video-text datasets, Flamingo accepts arbitrarily interleaved images, video and text and produces free-form text output. CLIP, by contrast, only scores similarity and cannot generate language.

What can each approach do that the other cannot?

CLIP's contrastive objective gives cheap, flexible zero-shot classification but nothing more open-ended. It can tell you how well an image matches a caption, not describe the image itself. Alayrac et al. (2022) note this limitation directly, writing that contrastive models 'can only address limited use cases such as classification' since they lack the ability to generate language.

Flamingo trades that efficiency for generative range. On 16 image and video benchmarks, Alayrac et al. (2022) report that an 80-billion-parameter Flamingo model set a new few-shot state of the art. It beat models fine-tuned on up to a thousand times more task-specific data on six of them, using as few as four examples per task. But the same paper concedes Flamingo's raw classification accuracy still lags state-of-the-art contrastive models like CLIP, which optimise directly for that one task.

Where do these ideas show up today?

Flamingo itself uses a CLIP-style contrastively trained vision encoder for one of its ablation comparisons. Its default NFNet-F6 vision encoder was pretrained with the same two-term contrastive loss Radford et al. (2021) describe. That is evidence the two approaches are complementary rather than competing. Flamingo's authors frame unifying contrastive retrieval and open-ended generation in a single model as 'an important research direction', rather than a solved problem.

Key terms

CLIP
A model from Radford et al. (2021) that jointly trains an image encoder and a text encoder with a contrastive objective to predict which captions pair with which images.
Contrastive pretraining
A training method that pulls matching image-text pairs together in an embedding space and pushes mismatched pairs apart, rather than predicting exact text.
Zero-shot transfer
Using a model on a task or dataset it was never explicitly trained on, as CLIP does by embedding class names as text instead of training a dedicated classifier.
Flamingo
A family of visual language models from Alayrac et al. (2022) that connect a frozen pretrained vision encoder and a frozen pretrained language model to generate free-form text from interleaved images, video and text.
Perceiver Resampler
A module in Flamingo that converts a variable number of image or video features into a fixed number of 64 visual tokens before they reach the language model.
Gated cross-attention
Newly added layers in Flamingo, interleaved between frozen language model layers, whose output is multiplied by a learnable gate initialised to zero so training starts from the unmodified language model.
In-context few-shot learning
Adapting a model to a new task by including a handful of example input-output pairs in the prompt, with no change to model weights.

Multimodal models in the news

·AWS Machine Learning

AWS adds TwelveLabs' Pegasus 1.5 video model to Bedrock

Timestamped JSON segments replace manual review of long-form video

·Hugging Face

Swiss AI releases Apertus 1.5 with vision, audio and longer context

The open-weight 8B and 70B models add multimodality, but still trail frontier rivals

·Hugging Face

Meta releases Muse Spark Open, an 816B-parameter MoE model

Open weights, four modalities, a million-token window — but 1.5TB to serve

·Transformers releases

Transformers v5.20.0 adds Meta's 816B-parameter Muse Spark Open

Seven new model families land alongside breaking changes to cache and config APIs

·Google DeepMind

Google DeepMind launches Gemini 4 Argon for robotics

A physical-reasoning model that writes its own simulations before touching hardware

·llama.cpp releases

llama.cpp adds image-embedding support for Qwen3.8 Flash Next

A single pull request, the release notes offer little else

·Transformers releases

Transformers 5.18.0 adds four model families, breaks six APIs

Hugging Face's release adds Nemotron 3 diarization and NemotronH Omni alongside six backwards-incompatible fixes.

·Google DeepMind

Google adds a talking avatar to Gemini 3.8 Live

The enterprise feature pairs real-time video with speech, lip-syncing across 97 languages and running background tool calls.

Written from the documents above by The Neural Net’s automated desk (claude-sonnet-5, theneuralnet/guides@1) without human review, and updated as news on this topic publishes. How this works.