Blog
Embeddings

What EmbeddingGemma 2 is and what it does

Google's open multimodal embedding model: its size, 768-number vectors, task prefixes, 8K context, license, and where you can run it.

EmbeddingGemma 2 is an open embedding model from Google, released on October 6, 2026. It reads text, code, images, video, audio or a mix of them and returns a vector of 768 numbers, arranged so that inputs with similar meaning land close together. How embedding models turn text into vectors covers the basics.

Who made it

Google's launch post is by Sahil Dua and Henrique Schechter Vera, research engineers at Google DeepMind. It says the model comes from the same technology as Google's Gemini Embedding models, and the model card says it builds on Gemma 4. It shares Gemma 4's text tokenizer and audio encoder, which saves memory when both run in one pipeline.

It succeeds EmbeddingGemma, a text-only model from September 4, 2025. The new launch post says the first one has more than 20 million downloads.

Size: 740M parameters, 270M for text

The full model has 740 million parameters: a 270M text model (a 130M transformer plus a 140M embedder), a 170M vision encoder and a 300M audio encoder. You can load only the encoders you need: 270M for text only, 440M with images, 570M with audio, 740M with everything.

With quantization, Google reports about 191 MB of active RAM for the text-only weights on a Pixel 11 Pro, and about 567 MB for the full model.

What comes out: 768 numbers, or fewer

Every input lands in the same 768-number space, so a text query can be scored against a photo or an audio clip. With Matryoshka Representation Learning (MRL), the first 512, 256 or 128 numbers work as an embedding on their own, which cuts storage by up to 6x. Google's scores on MTEB (Massive Text Embedding Benchmark) and MMEB (Massive Multimodal Embedding Benchmark):

LengthMTEB multilingual v2MTEB code v1MMEB v2 overall
76861.3678.6859.01
51261.1777.2458.38
25660.4176.1856.24
12857.8971.4145.65

Google rates quality as close to lossless down to 256, and says 128 holds up for text-only work but loses a lot on images, video and audio (MMEB falls to 45.65).

After cutting a vector, rescale it to length 1 before cosine similarity, and use one length for queries and documents. Skipping the rescale gives plausible-looking scores and worse rankings, with no error to flag it. In sentence-transformers, truncate_dim with normalize_embeddings=True handles both.

Task prefixes

Each text input gets a short instruction in front. The matching prefix improves quality; leaving it out still works, with less precision. Images, video and audio take no prefix.

Retrieval tasks use one format for queries and another for documents:

  • 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: title: {title} | text: {content}, with title: none when there is no title

Classification, clustering and similarity put the same prefix on every input:

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

In sentence-transformers these are named prompts, such as prompt_name="Classification". The Document prompt always writes title: none, so format titled documents by hand.

Languages and context length

The model understands more than 100 languages, and quality can differ between them. Its pre-training data runs to January 2025.

One input holds up to 8,192 tokens, shared by every modality:

InputToken costMost that fits
Text1 per subword8,192 tokens
Image280 per image by defaultabout 29 images
Video140 per frame, at 1 frame per second by defaultabout 58 frames
Audio25 per second of 16 kHz monoabout 327 seconds

A mixed input marks each item's place with <|image|>, <|video|> or <|audio|> in the text and comes out as one vector. Ollama's tag list shows a 256K context window, matching the GGUF metadata's context_length of 262,144. Plan around the card's 8,192 tokens.

License

EmbeddingGemma 2 uses Apache 2.0, and its Hugging Face repository is ungated. The first EmbeddingGemma shipped under the Gemma Terms of Use with gated access.

How it compares with the first EmbeddingGemma

EmbeddingGemmaEmbeddingGemma 2
Built onGemma 3Gemma 4
Parameters308M740M (270M for text)
InputsText, including codeText, code, images, video, audio
Context2,048 tokens8,192 tokens
Vector length768, MRL down to 128768, MRL down to 128
MTEB multilingual v261.1561.36
MTEB English v269.6768.46
MTEB code v168.7678.68

Code is the big gain: 9.92 points, about 14%. Multilingual text is up 0.21 points, and English text is down 1.21. All scores are Google's, at 768 numbers with full-precision weights.

Where you can run it

Weights are on Hugging Face and Kaggle. Google's launch post also names MLX, vLLM, SGLang, LM Studio, MediaPipe, LiteRT and transformers.js. The versions we checked:

  • sentence-transformers 6.1.0 or newer, which the model's config requires. Hugging Face Transformers added the model in 5.19.0.
  • llama.cpp added support on October 6, 2026; release b11454 and later include it.
  • Ollama 0.40.4 or newer (October 12, 2026) for GGUF files, since earlier releases bundle an older llama.cpp. Ollama's library also lists embeddinggemma-2, in tags from 270m (378 MB) to 740m (1.3 GB); those default tags are the same files as the tags marked MLX on Ollama's tag page, so for the llama.cpp path use the GGUF below.
  • GGUF: ggml-org/embeddinggemma-2-GGUF has the text model as Q8_0 (about 310 MB) and BF16 (about 558 MB), plus a separate mmproj file that holds the vision and audio encoders together (about 555 MB at Q8_0, 982 MB at BF16). Quantization explained with two real models covers what those labels mean.

For the PyTorch weights, use bfloat16 where the hardware supports it and float32 elsewhere; float16 returns NaN or degraded vectors, according to the card. This loads only the text model and embeds one string:

from sentence_transformers import SentenceTransformer

model = SentenceTransformer(
    "google/embeddinggemma-2",
    config_kwargs={"vision_config": None, "audio_config": None},
)
vec = model.encode("hi there", prompt_name="Classification")
print(vec.shape)  # (768,)

With Ollama, ollama pull hf.co/ggml-org/embeddinggemma-2-GGUF:Q8_0 fetches the build we use.

How Gemma Gemini uses it

Google's launch post lists routing among the model's on-device uses, and that is its job in Gemma Gemini. Since October 13, 2026, our router has embedded each message with the classification prefix. Two small logistic-regression classifiers then turn those 768 numbers into two probabilities: that Gemma 4 E2B will answer well, and that the message needs a web search. The Q8_0 GGUF runs on the CPU of one of our Jetson Orin Nano boards, beside Gemma on its GPU, and embeds a message in a median of 36 ms; the whole decision, sent from the web app through our fleet gateway, takes about 250 to 650 ms, mostly network.

We replaced our cloud router with EmbeddingGemma 2 covers the 164 labeled messages behind it and its 93% score on 46 held-out messages. Running EmbeddingGemma 2 next to Gemma on an 8 GB board covers fitting both models into one board's memory.

Gemma Gemini sends each message to Gemma 4 E2B or to Gemini 4 Argon, and shows you why.

Try Gemma Gemini