Google releases EmbeddingGemma 2 for on-device multimodal embeddings
EmbeddingGemma 2 is an open 740M parameter model that maps text, code, images, video, and audio into a unified vector space for local RAG and semantic search.
Google has launched EmbeddingGemma 2, an open multimodal embedding model designed to map text, code, images, video, and audio into a single 768-dimensional vector space. Built on the Gemma 4 architecture and released under the Apache 2.0 license, the model is optimized for on-device inference on consumer hardware like laptops and mobile devices. This allows developers to build privacy-focused retrieval augmented generation (RAG) pipelines and cross-modal search tools that operate entirely offline.
Modular architecture and on-device resource usage
The model consists of 740 million total parameters but uses a modular design to reduce memory overhead. It combines a 270M parameter text backbone with optional encoders for vision (170M) and audio (300M), allowing developers to load only the necessary modalities for a specific task.
On a Google Pixel 11 Pro with quantization, the model requires approximately 191MB of active RAM for text-only weights and 567MB for the full multimodal configuration. It features an 8K token context window, which is four times larger than the first version, enabling the processing of up to 5.5 minutes of audio or 58 video frames on local hardware.
Performance gains in code and multimodal tasks
EmbeddingGemma 2 improves code performance by 9.92 points on the MTEB Code benchmark, rising from 68.76 to 78.68. This makes it suitable for local codebase indexing and semantic code search. The model matches the multilingual text performance of its predecessor while outperforming some specialized models that are more than twice its size.
When paired with generative models like Gemini 4 Hydrogen, it enables on-device RAG pipelines. Because both models share the same text tokenizer and audio encoder, they can run together with a lower combined memory footprint.
Vector storage reduction via Matryoshka Learning
The model implements Matryoshka Representation Learning (MRL), which allows developers to truncate output vectors from 768 dimensions down to 512, 256, or 128. This capability provides up to a 6x reduction in storage for local vector databases with minimal impact on quality down to 256 dimensions.
To maintain ranking quality during truncation, vectors must be L2-normalized before calculating cosine similarity. The 128-dimension setting is recommended specifically for text-only workloads, as it degrades multimodal quality more substantially.
Deployment and implementation requirements
The model is available on Hugging Face and Kaggle and can be served using tools such as vLLM, llama.cpp, Ollama, and LMStudio. For optimal results, Google recommends running inference in bfloat16 or float32, as float16 can lead to NaN values or degraded embeddings due to the model's activation range.
pip install -U sentence-transformers transformersTo improve precision, the model uses task-specific instruction prefixes for text inputs. For example, asymmetric tasks like web search require a SearchQuery prefix for queries and a specific format for documents: title: {title} | text: {content}.
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("google/embeddinggemma-2")
query = "What causes the northern lights?"
document = "The northern lights are caused by charged particles from the sun."
query_emb = model.encode(query, prompt_name="SearchQuery")
doc_emb = model.encode(document, prompt_name="Document")
print(model.similarity(query_emb, doc_emb))Related reading
- DigUp: AI-Powered Embedding Search for macOS Files & Media
- Claude Meetings: AI Joins Team Calls to Create Docs & Notes
- Google Gemini 4 Hydrogen: New AI Model Beats Sonnet & Terra
Sources
EmbeddingGemma 2 is a best-in-class open model for natively multimodal embeddings
Related news
AI AgentsGoogle Releases Gemini 3.5 Flash and Antigravity HarnessGoogle introduces Gemini 3.5 Flash, a model optimized for agentic workflows and coding, alongside the Antigravity development platform.·same source: blog.google
Open-Source AIZhipu releases GLM-5.3-Flash with 1M Context and MIT LicenseZhipu has open-sourced GLM-5.3-Flash, a natively multimodal model with 320B parameters that outperforms GLM-5.2 at one-tenth of the cost.·same source: huggingface.co
- AI AgentsNico Martin's gemma4-browser-extension runs Gemma 4 locally in Chrome via Transformers.jsA Chrome extension that puts an on-device AI agent in your side panel — searching history, summarizing pages, and controlling tabs without sending data to any server.·same source: huggingface.co
Open SourceHKUDS Releases RAG-Anything: Open-Source Multimodal RAG Framework Built on LightRAGHKUDS launches RAG-Anything, a unified multimodal RAG system that processes text, images, tables, and equations through a single graph-based pipeline.·by shared tag
Comments
Weekly digest
The best of vibe coding, AI agents and open source — once a week, no spam.