AI
Google's EmbeddingGemma 2 Bridges Text, Code, Images, and Audio in Single Embedding Space
A new multimodal embedding model built on Gemma 4 lets developers search across different media types without separate embedding systems.
InfoQ
Google has released EmbeddingGemma 2, an open-weight embedding model that unifies text, code, images, video, and audio into a single semantic space. The model, built on Gemma 4 and distributed under the Apache 2.0 license, aims to simplify on-device semantic search and retrieval-augmented generation for consumer hardware like phones and laptops.
Unified Embeddings Across Media Types#
At its core, EmbeddingGemma 2 represents a shift in how multimodal search systems work. Rather than maintaining separate incompatible embedding spaces for different content types—a complexity that typically plagues retrieval systems—the model produces all embeddings in a shared 768-dimensional space. This means developers can compare semantic similarity across media without architectural workarounds. Embeddings for documents, images, code, and video can coexist and be searched together within the same framework.
This unified approach enables practical retrieval tasks: finding relevant screenshots or recordings in response to a query, searching code repositories using natural language, and locating video clips based on text descriptions.
Flexible Model Sizing and Compression#
The model offers scalability options depending on application needs. Developers can load only the encoders required for their use case, ranging from 270 million parameters for text and code alone, up to 740 million for full multimodal capability. This modularity helps minimize resource consumption on constrained devices.
EmbeddingGemma 2 also supports Matryoshka Representation Learning (MRL), a technique that allows vectors to be truncated to shorter dimensions. Compressing from 768 to 128 dimensions can reduce storage by roughly 80%—a million vectors shrink from 1.5 GB to 250 MB. However, this compression comes with quality trade-offs: text retrieval retains about 90% accuracy at 128 dimensions, while image, video, and audio retrieval drops to around 75%.
Improvements for Code Search#
Google emphasizes the model's advances over its predecessor for code-related tasks. EmbeddingGemma 2 "significantly outperforms EmbeddingGemma 1 on code search and technical retrieval," making it suited for local codebase indexing and agent-based code discovery. For text-only applications, improvements are more modest.

