October 7, 2026
EmbeddingGemma 2 improves code search: up 9.92 points in Google's test
In Google's Oct 6 evaluation, EmbeddingGemma 2 scored 78.68 on MTEB Code, compared with 68.76 for the first version.

EmbeddingGemma 2 turns file contents into vectors for semantic search. For example, you can use a task description to find relevant code.
The first EmbeddingGemma worked with text. The new model supports text and code, as well as images, video and audio. For applications that search across different file types, Google offers a single model with compatible vectors.
For code search. The text configuration has 270 million parameters, compared with 740 million in the full model. Weights are available in the `google/embeddinggemma-2` repository on Hugging Face under Apache 2.0.
Running it requires sentence-transformers version 6.1.0 or later. Installation and loading without image or audio processing:
```bash pip install -U "sentence-transformers[image,audio,video]" transformers ```
```python from sentence_transformers import SentenceTransformer
model = SentenceTransformer( "google/embeddinggemma-2", config_kwargs={"vision_config": None, "audio_config": None}, ) query_vector = model.encode(query, prompt_name="SearchQuery") document_vector = model.encode(document, prompt_name="Document") ```
Google uses different prompts for queries and documents: `SearchQuery` for what you are looking for, and `Document` for the contents of the index. For example, a description of the function you need is treated as a query, while a code file is treated as a document.
Less memory. When encoding, you can set `truncate_dim` and `normalize_embeddings=True` to reduce vectors from 768 dimensions to 512, 256 or 128. Queries and documents must have matching dimensions.
In Qdrant's Oct 6 measurement, compressing 768-dimensional vectors with 1-bit TurboQuant reduced their RAM usage by a factor of 30. Across five BEIR text datasets, the top ten search results retained 99% of their original quality as measured by nDCG@10. The calculation covers the vectors themselves and excludes the graph index, metadata and originals used to rerank results.
The context window grew fourfold to 8K tokens. Google lists the following limits for different input types:
- 5.5 minutes of audio. - 29 images. - 58 video frames.
After weight compression, the text configuration on Pixel 11 Pro requires about 191 MB of active RAM, while the full multimodal configuration requires about 567 MB. These are Google's measurements from Oct 6.
Primary source: [Google DeepMind, Oct 6, 2026](https://deepmind.google/blog/embeddinggemma-2-an-open-lightweight-multimodal-embedding-model).
All four configurations use a compatible vector space, so adding image or audio processing does not require recomputing existing text vectors.