Skip to content

EmbeddingGemma 2: Unified and Efficient Multimodal Representations

optionalcorefrontierpaperrubric 11/122026 · arXiv (EmbeddingGemma Team, Google) · ~40 min

Henrique Schechter Vera, Sahil Dua, Jovan Andonov, … Mojtaba Seyedhosseini

Read first: Distilling the Knowledge in a Neural Network · Nomic Embed: Training a Reproducible Long Context Text Embedder

Status

TL;DR. EmbeddingGemma 2 is Google’s second small open embedder. One bidirectional Gemma 4 backbone of 271M parameters embeds text, and optional vision (167M) and audio (305M) encoders feed the same backbone, so text, images, video, audio and mixtures all share one 768-dimensional space. Training is about 2.9T tokens: two long stages of distillation from Gemini Embedding 2, one contrastive finetuning stage, checkpoint averaging, then quantisation-aware training to 4-bit. The paper reports 61.36 on MTEB Multilingual v2, 78.68 on MTEB Code, 59.01 on MMEB-v2 and 69.54 MRR@10 on spoken-query retrieval (MSEB).

Why it matters now. Most open embedders are text-only and large. This one targets phones: you load only the modules you need, and the 4-bit checkpoint peaks at 191 MB of memory for text and 567 MB for everything. It also shows how far plain embedding distillation from a frontier API model can go, and where it stops. That is a live question for anyone training retrievers under a compute budget.

EmbeddingGemma 2: one small bidirectional backbone for text, image, video and audio, trained by distillation then contrastive finetuning Left: text tokens, image or video frames through a ViT, and audio through a frozen USM conformer all feed a 271M-parameter Gemma 4 backbone with bidirectional attention and simplified per-layer embeddings. Its outputs are mean pooled, linearly projected and l2 normalised into a 768-dimensional vector whose 512, 256 and 128 prefixes are also usable. Bars show modular loading: 271M text only, 439M with vision, 577M with audio, 744M in total. Right: the training recipe of about 2.9T tokens. Stage 1 text pre-finetuning of about 300B tokens with MSE distillation to Gemini Embedding 2 plus a small contrastive loss. Stage 2 multimodal pre-finetuning of about 2T tokens with distillation only. Stage 3 multimodal finetuning of about 600B tokens with contrastive and spread-out losses and no distillation. Stage 4 averages the final checkpoint with a much earlier one. Stage 5 is quantisation-aware training to 4-bit checkpoints distilled from the float model. One encoder, three modalities text tokens shared token embedder image / video frames ViT, patch 16 · 167M audio (encoder frozen) USM conformer · 305M Gemma 4 backbone 271M · 24 layers d_model 512 bidirectional attn simplified PLE (no lookup table) mean pool → linear projection → ℓ2 normalise 768-d; Matryoshka prefixes 512 / 256 / 128 Modular loading (total params) text 271M text + vision 439M text + audio 577M full model 744M Training recipe (≈ 2.9T tokens) 1 · text pre-finetuning, ~300B MSE to Gemini Embedding 2 + small NCE 2 · multimodal pre-finetuning, ~2T distillation only, twice the steps 3 · multimodal finetuning, ~600B NCE + spread-out loss, no distillation 4 · merge checkpoints average final + much earlier checkpoint 5 · quantisation-aware training Q4_0 / Q4_C, distilled from float model every loss is wrapped in Matryoshka (MRL) peak phone memory, Q4_C: 191 MB text · 447 MB +vision · 567 MB full
Original sketch of the architecture and training recipe described in the paper (Sections 2–3).

Architecture. The backbone is a Gemma 4 decoder switched to bidirectional attention, with 24 layers and model width 512. Unlike the first EmbeddingGemma, which started from an encoder–decoder (T5Gemma-style) checkpoint, there is no separate adaptation stage. Outputs are mean pooled, linearly projected to 768 dimensions and ℓ2-normalised, and Matryoshka training makes the 512, 256 and 128 prefixes usable.

Simplified per-layer embeddings (PLE). Gemma-family on-device models inject an extra per-layer embedding into every layer. Here each layer derives it by projecting the shared input embeddings TinT_{in} instead of reading a dedicated lookup table:

Pl=RMSNorm(pl(Tin)),Ul=RMSNorm(ul(GELU(gl(Hl′))⊙Pl)),Hl=Hl′+UlP_l = \mathrm{RMSNorm}(p_l(T_{in})),\quad U_l = \mathrm{RMSNorm}\big(u_l(\mathrm{GELU}(g_l(H'_l)) \odot P_l)\big),\quad H_l = H'_l + U_l

Dropping the table saves parameters and did not hurt: 55.46 vs 55.07 on MMEB-v2 in the ablation (Table 2).

Losses.

  • A contrastive NCE loss over hard negatives, in-batch negatives and same-tower (query–query, passage–passage) negatives, with duplicates masked out.
  • A listwise Plackett–Luce loss with calibration penalties.
  • A spread-out regulariser that pushes embeddings to use the whole sphere.
  • An embedding-matching distillation loss: the MSE between the student vector and the truncated, normalised Gemini Embedding 2 vector, applied to queries, positives and negatives.

All of them are wrapped in Matryoshka, so every prefix is trained.

Recipe (diagram, right). Stage 1 is text pre-finetuning, about 300B tokens, mostly distillation. Stage 2 is multimodal pre-finetuning, about 2T tokens, distillation only. Stage 3 is multimodal finetuning, about 600B tokens, contrastive plus spread-out with no distillation. The final checkpoint is averaged with a much earlier one from the same run, and QAT then distils the float model into Q4_0 and Q4_C checkpoints.

Table 1 (bf16 → Q4_0) and Table 6 (comparison with other single-vector models), paper-reported:

BenchmarkEG2 bf16EG2 Q4_0Qwen3-Embed-0.6Bjina-v5-omni-nano
MTEB Multilingual v261.3660.9664.3465.52
MTEB English v268.4668.4870.4771.11
MTEB Code78.6876.8575.42—
MMEB-v2 overall59.01——43.61
MIEB-lite60.1756.59——
MSEB (MRR@10)69.5464.99——

On MMEB-v2 the split is Image 57.28, Video 50.67 and VisDoc 67.84. jina-v5-omni-nano (986M) wins VisDoc at 71.34 despite the much lower overall score. Ablations (Tables 2–5) use an intermediate recipe and MMEB-v2:

  • the contrastive finetuning stage adds about 3.2 points, while extra distillation adds nothing;
  • a trainable vision encoder beats a frozen one by about 4.1 points;
  • raising the inference token budget from 70 to 560 lifts VisDoc from 51.61 to 67.62.
  • Text quality is not best in class. At 271M text parameters it trails 0.6B-class text embedders on MTEB by 2–4 points.
  • 4-bit costs multimodal quality. Text MTEB barely moves under Q4_0, but MIEB-lite loses 3.6 points and MSEB 4.6, so phone deployments get noticeably weaker image and audio retrieval than the headline numbers.
  • Audio embeddings encode content better than speaker attributes. Gender clustering on VoxPopuli scores 0.40 even though a linear probe on IEMOCAP gender gets 66.40, so the information is present but not organised into clusters.
  • Distillation ceiling. Two of the three training stages copy a proprietary teacher. How much of the model’s quality is reproducible without Gemini Embedding 2 is not tested.
  • Open: whether a multi-vector variant would close the VisDoc gap, and whether the simplified PLE result holds for text-heavy multilingual retrieval (the ablation measured only MMEB-v2).
  • Same family: the first EmbeddingGemma (308M, Gemma 3, text only) introduced encoder–decoder initialisation, geometric distillation, a spread-out regulariser and model souping. Version 2 keeps the distillation, regulariser and merging ideas and drops the encoder–decoder start.
  • Other open embedders: Nomic Embed, Nomic Embed v2 (mixture of experts) and NV-Embed. For the opposite size extreme, see static embeddings and Bekko. For a closed multimodal API, see Cohere Embed 5.
  • Distillation: knowledge distillation. Here the student matches the teacher’s vectors directly rather than its scores.
  • Visual documents: ColPali is the multi-vector alternative for page images.
  • Evaluation: MTEB and MMTEB explain the text benchmarks reported here.

Questions to think through

These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.

  1. Derive / compute

    EmbeddingGemma 2 has 744M parameters: a 271M text backbone (including the token embedder), a 167M vision encoder and a 305M audio encoder. (a) Reproduce the modular sizes 439M (text + vision) and 577M (text + audio). (b) Estimate the weight memory of the text-only and full model in bf16 and at 4 bits per weight, and compare with the reported Q4_C peak phone memory of 191 MB and 567 MB. (c) For 100M documents, compute fp32 index size at 768 and 128 dimensions, and use Table 7 (code retrieval 78.7 / 77.2 / 76.2 / 71.4 at 768 / 512 / 256 / 128) to price each halving.

    What a strong answer covers
    • (a) 271M + 167M = 438M ≈ 439M and 271M + 305M = 576M ≈ 577M; 271 + 167 + 305 = 743 ≈ 744M. Rounding explains the 1M differences.
    • (b) bf16: 271M × 2 B ≈ 542 MB text-only and 744M × 2 B ≈ 1.49 GB full. 4-bit: ≈ 136 MB and ≈ 372 MB. The reported 191 MB and 567 MB peaks sit above these, which leaves room for quantisation scales, activations and any parts kept at higher precision; the paper does not give that breakdown.
    • (c) 100M × 768 × 4 B ≈ 307 GB; at 128 dims ≈ 51 GB, 6× smaller.
    • Price per step: 768 → 512 costs 1.5 points, 512 → 256 costs 1.0, and 256 → 128 costs 4.8. The last halving is the expensive one, so 256 is the natural knee for code search.
    • For comparison, the first EmbeddingGemma (300M, text only) scores 68.8 on the same code suite, below EmbeddingGemma 2 even at 128 dims (71.4).
  2. Mechanism

    The contrastive loss uses hard negatives and in-batch negatives plus same-tower negatives (query–query and passage–passage), with a mask that removes duplicates. Explain what the same-tower terms add and why the mask matters for them. Then explain why stages 1–2 are almost pure embedding distillation from Gemini Embedding 2, yet stage 3 drops distillation entirely, using the Table 3 numbers.

    What a strong answer covers
    • Ordinary in-batch negatives only push a query away from other queries' passages. Same-tower negatives also push queries apart from each other and passages apart from each other, so queries and targets cannot settle into two separate, tightly packed regions of the space.
    • The mask: identical or duplicate texts in a batch would otherwise become negatives of themselves, which teaches the model to separate equivalent inputs. It removes false negatives, which are more likely in same-tower pairs.
    • Distillation is an MSE between the student vector and the teacher vector (truncated to the student's dimension and ℓ2-normalised) for queries, positives and negatives. It needs no relevance labels, so it scales to about 2.3T tokens of mostly unlabelled multimodal data and transfers the teacher's geometry.
    • Table 3 (MMEB-v2 overall): after pre-finetuning 52.27; spending more steps on distillation 52.28 (no gain); the contrastive finetuning stage 55.46. Image goes 50.10 → 54.67 and Video 43.26 → 47.82, while VisDoc stays about 62.3.
    • Reading: distillation saturates at the teacher's geometry as seen through a small student, while the contrastive stage optimises the ranking objective directly and can depart from the teacher where that helps.
  3. What if…

    Table 4 compares a trainable and a frozen vision encoder, and Table 5 varies the visual token budget at inference (the model was trained at 280 tokens per image and 140 per video frame). Interpret both: why does freezing hurt Image and Video more than VisDoc, why does VisDoc gain most from extra tokens, and why might Video drop at 560 tokens per frame? Then explain why the audio encoder is frozen anyway.

    What a strong answer covers
    • Table 4: frozen ViT 48.18 overall vs trainable 52.27; Image 44.35 vs 50.10, Video 39.24 vs 43.26, VisDoc 60.59 vs 62.26. The ViT came from a generative model, so letting it adapt to the retrieval objective matters most for natural images.
    • Table 5: VisDoc goes 51.61 at 70 tokens to 63.60 at 140 and 67.62 at 560. Document pages carry small text, so resolution is the bottleneck; natural images saturate sooner.
    • Video falls from 48.51 to 46.52 at 560 tokens per frame. One hypothesis: with 32 frames that would be about 17,900 visual tokens, far beyond both the 140-per-frame training setting and the 8,192-token training length, so the model sees an unfamiliar input distribution.
    • Training video at only 70 tokens per frame hurt Image and VisDoc, so the budgets interact across modalities.
    • Audio: the USM conformer is kept frozen and bit-identical to the one in Gemma 4 E2B and E4B, so a phone can share one copy between the generative model and the embedder. It trades some quality for memory.
  4. Critique

    On MTEB text, EmbeddingGemma 2 (61.36 multilingual, 68.46 English) trails Qwen3-Embedding-0.6B (64.34 / 70.47) and jina-v5-omni-nano (65.52 / 71.11), and its English score is below the first EmbeddingGemma (69.67). On MMEB-v2 it scores 59.01 overall against 43.61 for jina, but jina wins VisDoc (71.34 vs 67.84). Critique the headline claim of a best-in-class unified model under 1B parameters. Consider parameter counting, baseline selection and the 4-bit results.

    What a strong answer covers
    • Parameter counting: for text, the relevant size is the 271M path, not 744M. Against a 0.6B text model that is about 2.2× fewer parameters, so a 3-point MTEB gap is a fair price; a "under 1B" label hides that.
    • English regression from EmbeddingGemma 1 (69.67 → 68.46) is the visible cost of sharing a smaller text budget with three modalities.
    • Baselines are restricted to single-vector models and exclude models trained on more than 25% of the evaluation data. That is reasonable for contamination, but the authors decide what counts, and multi-vector page retrievers (ColPali style) are out of scope.
    • Quantisation hurts unevenly. Q4_0 changes text MTEB by at most 0.4 but drops Code by 1.8, MIEB-lite by 3.6 and MSEB by 4.6, so the on-device multimodal numbers are noticeably lower than the bf16 table.
    • Better comparison: per-modality, parameter-matched and latency-matched tables, with the 4-bit checkpoints of each model.
  5. Design

    You are building two products. (1) A phone app that searches a user's photos and voice memos (about 50k items). (2) A server-side search over 10M scanned PDF pages. For each, choose which EmbeddingGemma 2 modules to load, the visual token budget, the embedding dimension, the precision, and whether to transcribe audio first. Justify your choices with the paper's numbers, and say what you would measure before shipping.

    What a strong answer covers
    • Phone: load text + vision + audio (Q4_C peak 567 MB) or drop modules you do not need (191 MB text-only, 447 MB with vision). Use native audio embeddings, not transcription: MSEB MRR@10 is 69.54 native vs 57.59 for an ASR pipeline, and even 256-dim native audio (66.76) beats the full-size ASR pipeline.
    • Phone index: 50k × 256 dims × 4 B ≈ 51 MB in fp32, about 13 MB in int8. Keep the default 280-token image budget to bound latency.
    • PDF server: bf16 weights, image budget 560 or more, because VisDoc is the most resolution-sensitive (67.62 at 560 vs 63.38 at 280). 10M pages × 768 × 4 B ≈ 31 GB; drop to 256 dims only after measuring the loss.
    • Check alternatives on the PDF side: jina-v5-omni-nano scores higher on VisDoc (71.34), and multi-vector page retrievers may beat any single-vector model there.
    • Measure on your own data: recall at the chosen dimension, latency per page at each token budget, and the 4-bit loss. The paper reports weak speaker-attribute clustering (VoxPopuli gender clustering 0.40), so do not expect voice-identity search.

Done with this page?

Status