Google Ships EmbeddingGemma 2: Open Apache-2.0 Multimodal Embeddings for Local Code Search
DeepMind released EmbeddingGemma 2, a 740M-parameter multimodal embedding model under the Apache 2.0 license. It unifies code, text, image, audio, and video representations into a single vector space with an 8K token context window.

Why it matters
You can index and perform semantic searches across local code repositories and multimodal assets completely on-device without cloud API calls or data leakage.
TL;DR
- 01Apache 2.0 license with 740M total parameters and an 8K token context window.
- 02MTEB Code score improved to 78.68, ideal for on-device code repository search.
- 03Matryoshka representation allows truncating 768-dim vectors down to 128 dims for 6x storage cuts.
Key facts
- Parameter count
- 740M total (270M text, 170M vision, 300M audio)
- Context window
- 8K tokens (4x larger than v1)
- License
- Apache 2.0 permissive
- MTEB Code score
- 78.68 (up from 68.76)
- Active RAM footprint
- ~191MB (text-only quantized), ~567MB (full multimodal)
Multimodal Embeddings in Sub-1B Footprint
EmbeddingGemma 2 provides unified vector search across heterogeneous assets using 740M total parameters (or 270M for text-only inference). The model supports an 8K token context window—a 4x increase over EmbeddingGemma 1—enabling ingestion of up to 5.5 minutes of audio, 29 images, or 58 video frames locally. On code evaluation benchmarks, MTEB Code jumped from 68.76 to 78.68 points.
Matryoshka Compression and Deployment Runtimes
- Flexible Dimension Truncation: Matryoshka Representation Learning (MRL) allows dropping vectors from 768 down to 128 dimensions, saving up to 6x vector storage without full retraining.
- Low Memory Envelope: With quantization, it consumes as little as ~191MB active RAM for text and ~567MB for the full multimodal model.
- Permissive Open Source: Licensed under Apache 2.0 with weights on Hugging Face and Kaggle.
- Direct Tooling Integration: Native inference support in llama.cpp, Ollama, MLX, vLLM, sentence-transformers, LiteRT, and Qdrant vector storage.
Try it in 2 minutes
ollama pull embeddinggemma-2
curl http://localhost:11434/api/embeddings -d '{
"model": "embeddinggemma-2",
"prompt": "def calculate_token_savings(cached_tokens, total_tokens):"
}'bash
✓ When to use
- On-device and privacy-first RAG setups that require zero data transfer outside the host machine.
- Codebase search requiring simultaneous indexing of code snippets, UI diagrams, and audio documentation.
✕ When NOT to use
- Cloud architectures where API token costs are negligible and billions-parameter proprietary embeddings are already integrated.
- Monolingual enterprise setups where existing text embeddings achieve higher benchmark scores than small sub-1B architectures.
What to do today
- Pull the EmbeddingGemma 2 weights via Ollama or Hugging Face to benchmark against your existing local RAG pipeline.
- Evaluate Matryoshka dimension truncation to 256 or 128 dimensions in Qdrant to shrink vector index sizes.
- Replace text-only embedders in local codebase indexing scripts with EmbeddingGemma 2 to capture multimodal code assets.