EmbeddingGemma 2: Unified and Efficient Multimodal Representations

Henrique Schechter Vera, Sahil Dua, Jovan Andonov, Sara Smoot, Sebastian Russo, Ivan Llanos, Max Matveev, Jae Hyeon Yoo, Kat Black, Shih-Cheng Huang, Josiah Aklilu, Maarten Grootendorst et al.
25 minread4.65scoreNo. 110-29 AI Search issue
Rel 5Nov 4Prac 5Evid 4Time 5

To search text, images, video and audio with one embedding model, the usual route is to transcribe audio and caption images first, then hand everything to a text model. That costs extra compute and throws away tone of voice and visual detail. Google's EmbeddingGemma 2 is a 744M-parameter model that maps these inputs directly into one vector space, and each modality encoder can be loaded only when needed. Finding text passages from a spoken question shows the difference best: the same model transcribing speech to text first reaches an MRR@10 of 57.59, while reading the audio directly reaches 69.54. A small multimodal model need not give up text and code; its code retrieval score is almost ten points above its predecessor's, from 68.76 to 78.68.

Teams building on-device or low-cost retrieval should read this paper, because it gives a reproducible training recipe for a small multimodal embedding model and backs each key choice with an ablation: distill first, finish with contrastive learning, train the vision encoder too, and average the final checkpoint with an early one. Quantized to int4, the full multimodal model peaks at 567MB of memory on a Pixel 11 Pro, and 191MB for text only. The caveats: English text scores dip slightly below the predecessor, int4 quantization hurts images and speech much more than text, and video gets worse when the vision token budget is raised.

What problem is it solving?

Multimodal retrieval today follows roughly three routes.

RouteExampleStrengthMain cost
Convert to text, then text embeddingASR plus a text model, image captioningReuses the text retrieval stackExtra model calls; tone, background sound and layout are lost
One specialist model per modalityCLIP, CLAPStrong single- and cross-modal qualityCannot natively take mixed inputs such as image plus text
Turn a multimodal LLM into an embedderMulti-billion-parameter VLM embeddersStrong and handles mixed inputsToo large for latency- or memory-bound settings

EmbeddingGemma 2 aims for a fourth option: stay under 1B parameters yet still embed any modality, and any mix of them, into one space.

A small example (illustrative). A phone gallery assistant must answer the spoken request "that video of me playing guitar". The library holds a guitar video, a guitar photo and a note titled "guitar tuner".

RouteModels to runInformation used
Transcribe speech, caption videoASR, video captioner, text embedderOnly the transcribed and generated text
Three specialistsOne each for speech, video and textEach has its signal, but vectors are not comparable
EmbeddingGemma 2One backbone, audio and vision encoders loaded on demandRaw speech and frames, compared directly in one space

Pipeline overview

Paper Figure 1: text and code enter through a 141M embedding layer, images and video through a 167M vision encoder, audio through a 305M audio encoder; the three token streams are interleaved into one sequence and encoded by a 130M shared backbone into one space.
Paper Figure 1: text and code enter through a 141M embedding layer, images and video through a 167M vision encoder, audio through a 305M audio encoder; the three token streams are interleaved into one sequence and encoded by a 130M shared backbone into one space.

Look at the row of coloured squares in the middle: tokens from different modalities are interleaved in their original order, so a single input can be "some text, then an image, then a voice clip".

StageWhat it does
BackboneA 24-layer bidirectional Transformer adapted from Gemma 4, hidden size 512, 271M parameters including the embedding layer, usable alone as a text model
Modality encodersVision outputs 768-dim and audio 1536-dim soft tokens, each linearly projected to 512 and interleaved with text tokens
OutputMean pooling and a projection to 768 dimensions. MRL training computes each loss separately on nested sub-vectors (the first 768, 512, 256 and 128 dimensions), so the first 512, 256 or 128 dimensions can be used directly
TrainingText distillation, multimodal distillation, multimodal contrastive finetuning, checkpoint merging, then a separate quantization-aware stage
DeploymentLoad only what is needed: 271M for text, 439M for vision-language, 577M for audio plus text, 744M for everything

Images are pooled to a token budget and wrapped in start and end markers, video is processed frame by frame up to 32 frames, and audio is cut into 40 ms chunks. Tasks are signalled by prefixes such as task: search result | query: {text}.

Design 1: drop the per-layer lookup table

Why it is needed: Gemma 4 injects Per-Layer Embeddings (PLE) into every layer, the sum of a projection of the main token embedding and a vocabulary lookup table. Image and audio soft tokens have no vocabulary ids, so they cannot use that table, and the table costs memory.

How it works: EmbeddingGemma 2 keeps only the projection, so every position gets per-layer input computed from its own embedding, whatever its modality.

A tiny example (illustrative): an input of two words plus 280 image tokens. Before, the two words got the lookup and the 280 image tokens only the projection; now all 282 positions get the same kind of per-layer input. Hoot says

Hoot saysOne text-plus-image input: where each layer's extra input comes from, before and afterClose ✕
Before, text took projection + lookup while image tokens took projection only; without the table, all 282 positions get it from their own embedding.

Gemma 4: projection + lookup

2 text positions
projection + lookup
280 image positions
projection only, no entry
Overall
mixed sources, extra memory

A whole per-layer table also sits in memory.

EmbeddingGemma 2: projection only

2 text positions
projection
280 image positions
projection
Overall
all 282 positions alike

Audio tokens work the same: any position with an embedding gets per-layer input.

Illustrative: 2 text positions plus 280 image positions; the lookup needs a vocabulary id, which image tokens lack. Source: PLE description and illustrative example in Design 1

PLE strategyMMEB-v2 overallImage Hit@1Video Hit@1VisDoc NDCG@5
Projection only55.4654.6747.8262.37
With lookup55.0754.5747.1361.76

This shows the lookup table does not help multimodal retrieval; removing it saves memory and slightly improves video and visual documents.

Design 2: distill first, finish with contrastive learning

Why it is needed: a small model trained contrastively from scratch struggles to learn the structure a large model has, but pure distillation only approaches the teacher's space, which was not built for a tiny student, 768 dimensions or Matryoshka Representation Learning (MRL) truncation.

How it works: four stages, about 2.9T tokens in total.

StageDataLoss
Text pre-finetuning~300B tokensAlmost all distillation from Gemini Embedding 2: teacher vectors truncated to the student's size, the student matches them directly
Multimodal pre-finetuning~2T tokensDistillation only
Multimodal finetuning~600B tokensContrastive loss with in-batch, hard and same-tower negatives, plus a spread-out regularizer that penalizes squared inner products between pairs of queries and between pairs of positive documents in the batch, and MRL; no distillation
Merge and quantize—Average the final checkpoint with a much earlier one from the same run, then distill an int4 model from the frozen float model

The contrastive loss is , where covers same-tower negatives: a query's similarity to the other queries in the batch, plus its positive document's similarity to the other positive documents. They stop queries and documents from collapsing into two disjoint subspaces.

SettingMMEB-v2 overall
End of pre-finetuning52.27
Longer distillation52.28
Contrastive finetuning instead55.46

This shows distillation plateaus. Switching to the full finetuning recipe (contrastive loss plus the spread-out regularizer) adds over three points; the comparison does not test the two parts separately. The merge step uses a single run instead of several finetuning jobs: tasks that overfit late recover from the early checkpoint, while tasks that gained keep gaining. In a reproduction, the early checkpoint can be picked on a validation set, before overfitting tasks start to drop.

Design 3: train the vision encoder, tune the token budget per use

Keeping the vision encoder trainable gives 52.27 on MMEB-v2 against 48.18 when frozen. This shows freezing costs about four points, which the saved training compute does not justify.

Inference vision tokensOverallImage Hit@1Video Hit@1VisDoc NDCG@5
7050.0750.9046.3351.61
14055.3753.5847.9963.60
28056.1555.1548.5163.38
56057.0255.2146.5267.62

This shows bigger budgets help documents such as PDFs and slides most, over four points from 280 to 560, while video frames drop from 48.51 to 46.52 past 280, so budgets should be set per content type.

Main results

Paper Figure 2: parameters on a log x-axis, leaderboard score on the y-axis, for code, image-video-documents, audio and image. The star is EmbeddingGemma 2, the solid line is the new Pareto frontier with it included, and the shading is what it adds beyond the old frontier.
Paper Figure 2: parameters on a log x-axis, leaderboard score on the y-axis, for code, image-video-documents, audio and image. The star is EmbeddingGemma 2, the solid line is the new Pareto frontier with it included, and the shading is what it adds beyond the old frontier.

Find the star, then the shading: code and image show the largest shaded areas, so that is where it leads most below 1B; audio has a small area, meaning it roughly ties the best model of its size.

BenchmarkMetricEmbeddingGemma 2Reference
MTEB MultilingualTask mean61.36Predecessor 61.15
MTEB EnglishTask mean68.46Predecessor 69.67
MTEB CodeTask mean78.68Predecessor 68.76
MMEB-v2Overall59.01jina-v5-omni-nano (986M) 43.61
MIEB(lite)Task mean / type mean60.17 / 65.67+7.9 / +12.2 over the best sub-1B model
MSEB speech retrievalMRR@1069.54Same model via ASR 57.59

This shows its strengths sit in code, images and documents: on code it beats every sub-4B model and comes within 2 points of a leader 28 times larger, while text roughly matches the predecessor and English slips.

Speech retrieval routeMRR@10
Predecessor via ASR50.95
EmbeddingGemma 2 via ASR57.59
EmbeddingGemma 2 native, 256 dims66.76
EmbeddingGemma 2 native, 768 dims69.54
Gemini Embedding 2 native73.99

This shows skipping ASR is not just cheaper but worth about 12 points, and even at 256 dimensions (66.76) it beats its own ASR route (57.59) by over 9 points, though not Gemini Embedding 2 via ASR (70.40). After int4 per-channel quantization, MTEB English stays at 68.49 while MIEB(lite) drops from 60.17 to 56.71 and speech retrieval from 69.54 to 63.92, though the paper used different evaluation harnesses for these.

Limitations

First, English text pays for multimodality: MTEB English falls from 69.67 to 68.46. Teams serving mostly English text should measure that 1.2-point drop on their own data first.

Second, video is the weakest link: in the vision-token budget experiment, video Hit@1 stays between 46 and 49 and loses about 2 points when the budget doubles past 280.

Third, the audio encoder was frozen. One sign: a linear probe for speaker gender on IEMOCAP reaches 66.40%, so the information is in the vectors; but clustering VoxPopuli recordings directly by gender is among the weakest audio results in appendix Table 17. The information is there but not arranged in a shape clustering can use.

How a search or recommendation team could try it

  1. Load only the 271M text part, swap it for the current text embedder, and compare offline on English, Chinese and code queries, watching English closely.
  2. For voice search, route spoken queries two ways, through current ASR plus text and straight into the audio encoder, and compare MRR@10 and latency.
  3. For image or document libraries, test 140, 280 and 560 vision tokens separately for documents and for video.
  4. Truncate to 256 dimensions with MRL and weigh index size against recall before choosing the serving dimension.
  5. For on-device use, evaluate the int4 per-channel build per modality, with separate bars for images and speech.
  6. To finetune your own, copy the order: distill from a large model, finish with contrastive learning with same-tower negatives, then average the final and an earlier checkpoint.

Verdict

The most complete sub-1B multimodal embedding recipe so far, leading its size class in code, image and speech retrieval, at the price of slightly weaker English text and weak video.

DimensionAssessment
Problem importanceHigh. On-device and low-cost settings need one model for many inputs
NoveltyMedium. Most pieces exist; the contribution is a small-model recipe combining them, each ablated
EvidenceHigh. Five kinds of benchmarks with ablations for key choices; quantized comparisons use mismatched harnesses
Engineering costLow to medium. Open weights, per-modality loading, int4 builds for phones
Worth tryingYes, especially for voice or image search under latency and memory limits; English-only text teams should A/B first

How did this read for you?

One tap, no sign-in; tap again to undo. Only anonymous counts are kept, never who you are.

Discussion

Add experiment details, reproduction notes or a different take. Requires a GitHub sign-in.

Loading the discussion…