Google has released EmbeddingGemma 2, an open 740-million-parameter model designed to bring unified text, code, image, video, and audio retrieval directly to on-device applications. Distributed under an Apache 2.0 license, the model projects all five data types into a single 768-dimensional vector space, allowing developers to index and search multimodal content locally without needing to caption images or transcribe audio beforehand.
Modular Architecture and Expanded Context
EmbeddingGemma 2 uses a modular setup that lets developers load only the specific encoders required for their application. The base 270-million-parameter encoder processes text and code, requiring approximately 191MB of active RAM in Google's tests on a Pixel 11 Pro. Adding the vision encoder increases the model size to 440 million parameters, while adding the audio encoder raises it to 570 million parameters. Loading both encoders reaches the full 740-million-parameter size, consuming about 567MB of active RAM with quantization.
Google quadrupled the context window from 2,048 to 8,192 tokens, allowing a single input to cover up to 5.5 minutes of audio, 29 images, or 58 video frames sampled at one frame per second. Because every encoder configuration projects into the same embedding space, teams can add visual or audio indexing to existing text vector stores without re-embedding previously indexed data.
Index Compression with Matryoshka Learning
To manage storage demands on mobile devices, where a million 768-dimensional bfloat16 vectors require roughly 1.5GB of space, EmbeddingGemma 2 was trained using Matryoshka Representation Learning. This technique permits truncating embeddings to 512, 256, or 128 dimensions without retraining.
At 256 dimensions, a one-million-vector index shrinks to approximately 500MB. Google reports that 256-dimensional embeddings retain most of their quality for text and code, alongside roughly 95% of full-size retrieval quality for images, video, and speech. Truncating to 128 dimensions further reduces index sizes, though retrieval quality drops to around 90% for text and code and about 75% for multimodal queries.
Performance Benchmarks and Platform Deployment
On code retrieval tasks, EmbeddingGemma 2 scored 78.68 on the MTEB Code benchmark, up from 68.76 in the first generation. Google also highlighted its use in decision-making workflows via MediaPipe Decision, demonstrating evaluations of 500 candidate options per turn in under 100 milliseconds in a local chess test.
On-device deployment for EmbeddingGemma 2 is available immediately through LiteRT and MediaPipe Tasks. An Android ML Kit integration featuring NPU acceleration is scheduled for release in the coming weeks.
AI-generated editorial illustration; not a documentary photograph.
Source: Your phone’s vector index might be bigger than the AI model running it

Leave a Reply