EmbeddingGemma 2: On-Device Multimodal Embeddings Guide
Use Google’s open EmbeddingGemma 2 to search text, images, video, and audio on-device. Modular 740M model, Apache 2.0, practical setup steps.
Google DeepMind released EmbeddingGemma 2 on 6 October 2026. The open model maps text, code, images, video, and audio into one 768-dimensional space. At 740 million parameters it runs on phones and laptops. The Apache 2.0 licence lets developers ship it in commercial apps without royalty fees.
This guide shows what the model does, how to install it, and practical steps for on-device retrieval. All numbers come from the official Google blog and model card.
What EmbeddingGemma 2 Delivers
The model unifies four modalities. A text query can retrieve matching images. A voice note can surface related documents. Interleaved inputs are supported in one call. Context length is 8,192 tokens across every modality. That covers roughly 29 images, 58 video frames, or about 5.5 minutes of audio.
It improves on the previous EmbeddingGemma. Code retrieval rises from 68.76 to 78.68 on MTEB Code. Multilingual text stays roughly level at 61.36 on MTEB multilingual v2. The full multimodal version sets a new efficiency frontier against larger specialist models.
Modular design is the practical advantage. Load only the parts you need:
- Text and code: 270M parameters
- Text + vision: 440M
- Text + audio: 570M
- Full multimodal: 740M
Quantized weights drop active RAM. On a Pixel 11 Pro the text-only checkpoint uses about 191 MB. The full model uses about 567 MB. Matryoshka Representation Learning lets you truncate vectors from 768 down to 512, 256, or 128 dimensions and cut storage up to 6x.
Step-by-Step Setup
Weights live on Hugging Face as google/embeddinggemma-2. Sentence Transformers provides the fastest path.
- Install the library.
pip install -U sentence-transformers transformers
- Load the model and encode text.
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("google/embeddinggemma-2")
query = model.encode("What causes the northern lights?", prompt_name="SearchQuery")
doc = model.encode("The northern lights are caused by charged particles from the sun.", prompt_name="Document")
print(model.similarity(query, doc))
-
Add images or audio when needed. Pass a dictionary with the modality key. The vision and audio encoders load only if you request them.
-
Truncate for storage. After encoding, keep the first 256 dimensions. Similarity search still works because the model was trained with Matryoshka learning.
-
Quantize for mobile. Use the INT8 or INT4 variants listed in the model card. LiteRT and GGUF builds are available for edge runtimes.
For Android, pair it with the existing Gemini Nano or MediaPipe pipelines already documented in our Android AI tools guides.
Practical Retrieval Patterns
On-device RAG is the clearest use case. Index your local documents, screenshots, and voice memos once. Queries stay on the device. No data leaves the phone.
Cross-modal search works out of the box. Embed product photos and their descriptions together. A spoken query later retrieves the matching photo. Video moment retrieval uses the same vectors. Encode key frames plus a transcript snippet.
Code search improves enough for local codebase indexing. The 9.92-point gain on MTEB Code makes natural-language queries over a repository practical on a laptop.
Watch the official introduction for the architecture walkthrough.
Tips and Limits
Start with the text-only checkpoint if RAM is tight. Add vision or audio only for the specific feature that needs it. Measure peak memory on your target device before shipping.
The model has no safety fine-tuning. Treat outputs as retrieval scores, not generated content. Performance is not uniform across the 100+ languages. Test the languages you support.
Quantization and truncation trade a little quality for large storage wins. Profile both on your dataset. For most search tasks the 256-dimension vectors remain strong.
Conclusion
EmbeddingGemma 2 puts multimodal retrieval on everyday hardware. The modular design, Apache 2.0 licence, and measured efficiency gains make it ready for privacy-first apps. Load the weights, encode your local data, and keep queries on-device.
Sources
- Google Blog: EmbeddingGemma 2 is a best-in-class open model for natively multimodal embeddings (6 October 2026). https://blog.google/innovation-and-ai/technology/developers-tools/embeddinggemma-2/
- Google Developers Blog: EmbeddingGemma 2: The Developer Guide. https://developers.googleblog.com/embeddinggemma-2-the-developer-guide/
- Model card on Google AI for Developers. https://ai.google.dev/gemma/docs/embeddinggemma/model_card_2
- Official YouTube: Introducing EmbeddingGemma 2. https://www.youtube.com/watch?v=anPsS6huQk0
- Hugging Face: google/embeddinggemma-2
Share this story