Model Library/EmbeddingGemma 2

EmbeddingGemma 2

Embeddings
Multimodal
Multilingual

Google's multimodal embedding model mapping text, code, images, video, and audio into one 768-dimensional vector space, served as an OpenAI-compatible embeddings API

On-Demand Dedicated 1xH100 NVL

Details

Modalities

text, vision, video, audio

Recommended Hardware

1xH100 NVL

Estimated Price

Loading...

Provider

Google

Family

Gemma

Parameters

1B

Context

8192 tokens

License

apache-2.0

EmbeddingGemma 2: Multimodal Embeddings for Text, Images, Video and Audio

EmbeddingGemma 2 is an open multimodal embedding model from Google DeepMind. It maps text (including code), images, video, and audio, and combinations of them, into a single shared 768-dimensional vector space. A text query can therefore be compared directly against an image, a video clip, or an audio recording. The model pairs a compact text backbone with modular vision and audio encoders and builds on the architecture of Gemma 4.

Key Features

  • Native multimodality: text, images, video, and audio share one embedding space
  • Multilingual and code-aware: understands more than 100 languages, with a reported 14% gain on code tasks over the first EmbeddingGemma
  • 8,192-token context shared across modalities, enough for minutes of audio or video in one input
  • Matryoshka Representation Learning: the 768-dimensional vector can be truncated to 512, 256, or 128 dimensions for up to 6x lower storage
  • Task-steered embeddings through short text instruction prefixes
  • Interleaved inputs: one embedding can represent text mixed with several images, video, and audio

Task Instruction Prefixes

EmbeddingGemma 2 is trained with short task prefixes prepended to text inputs. Using the right prefix improves quality; omitting it still works but reduces precision. Images, video, and audio take no prefix.

For retrieval-style tasks, prefix queries and documents differently:

  • Web or document search: task: search result | query: {query}
  • Question answering: task: question answering | query: {question}
  • Fact checking: task: fact checking | query: {claim}
  • Code search: task: code retrieval | query: {query}
  • Documents for any of these: title: {title} | text: {content}, using title: none when there is no title

For symmetric tasks, apply the same prefix to every input being compared:

  • Classification: task: classification | query: {content}
  • Clustering: task: clustering | query: {content}
  • Semantic similarity: task: sentence similarity | query: {content}

Matryoshka Dimensions

The supported output sizes are 768, 512, 256, and 128. This template returns the full 768-dimensional vector. To store a shorter one, keep its leading dimensions and L2-normalize the result again before computing cosine similarity; the model card warns that skipping re-normalization silently degrades ranking quality. Queries and documents must share a dimension. Quality stays close to lossless down to 256 dimensions, while 128 dimensions degrades multimodal quality substantially.

Architecture

EmbeddingGemma 2 has a 24-layer text backbone with a 5:1 ratio of local sliding-window to global attention layers, grouped-query attention, and a 262,144-token vocabulary. Token representations are mean-pooled and projected from 512 to 768 dimensions. Separate vision and audio encoders feed the same backbone. Each image costs about 280 tokens by default, video is sampled at one frame per second at about 140 tokens per frame, and audio costs 25 tokens per second, all drawn from the shared 8,192-token budget. The model should run in bfloat16 or float32; the model card warns that float16 produces NaN or degraded embeddings.

Use Cases

  • Semantic search and RAG over text, code, images, video, and audio
  • Code search from natural-language queries
  • Spoken-query search over audio archives
  • Classification, such as sentiment analysis, content moderation, audio event detection, or image categorization
  • Clustering and near-duplicate detection across modalities
  • Evidence retrieval for fact-checking and source attribution

Benchmarks

Google reports a multilingual MTEB (v2) mean of 61.36 at 768 dimensions, slightly above the first EmbeddingGemma's 61.15, and a code MTEB (v1) score of 78.68 against its predecessor's 68.76. On image tasks the model scores 64.64 on MIEB lite and 57.28 on the MMEB v2 image split, with 67.84 on visual document retrieval. It reaches 50.67 on MMEB v2 video, 69.54 on MSEB audio retrieval, and 49.39 on MAEB. Truncating to 256 dimensions keeps multilingual MTEB at 60.41, while 128 dimensions drops it to 57.89 and costs more on multimodal benchmarks.

Learn more on the EmbeddingGemma 2 model card.

Quick Start Guide

Choose a model and click 'Deploy' above to find available GPUs recommended for this model.

Rent your dedicated instance preconfigured with the model you've selected.

Start sending requests to your model instance and getting responses right now.