- How you use it
- Runs a short model trial
- What it can do
- installs software · writes files · network · runs shell
- What's inside
The option
| Option | AModel trial kit · v2026-10-06+wwfix.1EmbeddingGemma 2 with sentence-transformers |
|---|---|
| How you use it | Runs a short model trial |
| What it can do | installs software · writes files · network · runs shell |
| What's inside |
What this thread does
What it is
EmbeddingGemma 2 is Google DeepMind's open embedding model, released 6 October 2026 (Google blog; source post by @MiaAI_lab). Per the model card:
- One shared 768-dimension space for text (including code), images, video and audio, so a typed query can find a screenshot or a spot in a recording.
- 740M parameters in total: a 270M text backbone plus optional vision (170M) and audio (300M) encoders. Load only what you need.
- 8,192-token context shared across modalities, 100+ languages, Matryoshka truncation to 512, 256 or 128 dimensions.
- MTEB code v1: 78.68 vs 68.76 for EmbeddingGemma 1 (Google's numbers).
When to use it for agent work
- Local code search or a docs index that your agent queries through a RAG or memory tool, with no code sent to a cloud embedding API.
- Indexing screenshots, diagrams or meeting audio next to text.
Use the task prefixes the model was trained with (for code: the CodeRetrieval prompt, which prefixes queries with task: code retrieval | query: ..., title: {filename} | text: {code} for documents). Queries and documents must use the same dimension.
Caveats
- Do not run it in float16: Google says it returns NaN or quietly degraded embeddings. Use bfloat16 or float32.
- At 128 dimensions, multimodal retrieval drops a lot; Google recommends validating before using it.
- Install sentence-transformers and transformers with
pip install -U sentence-transformers transformers, as shown in the model card. Ollama also has it (ollama pull embeddinggemma-2), useful for tools that take an Ollama embedding model. - Apache 2.0, but Google also points to the Gemma Prohibited Use Policy.
- Alternatives: EmbeddingGemma 1 or other text-only embedders if you only need text; hosted embedding APIs if data can leave the machine.
Sources
Primary sources: the Hugging Face model card (Google) and the Gemma docs page, read on 18 October 2026 (checked 2026-11-17: the page presents EmbeddingGemma 2 directly; last updated 6 October 2026).
- Confirmed by the model card: 768-dimension native output with Matryoshka truncation to 512, 256 and 128 (truncated vectors must be re-normalised before cosine similarity); 8,192-token context shared across modalities; 740M parameters in total (130M backbone, 140M embedder, 170M vision encoder, 300M audio encoder; the text model is 270M); MTEB code v1 78.68 against 68.76 for EmbeddingGemma 1 (Google's own numbers); use bfloat16 or float32 because float16 can give NaN or silently degraded embeddings; 128 dimensions degrade multimodal quality substantially; Apache 2.0 with the Gemma Prohibited Use Policy to follow. The docs page confirms the shared 768-dimension space, 8,192 tokens and Apache 2.0.
- Corrected above: the card gives the code-search query prefix as
task: code retrieval | query: {query}(prompt nameCodeRetrieval). - The model card documents installation with
pip install -U sentence-transformers transformers, without an exact minimum version. The Ollama model page confirms the pull command. The exact release date is confirmed by the Google launch blog.
Started from a post by @MiaAI_lab, packaged by the editor. Original post
- 01 · YouPaste the line from Try it into your agent.
- 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
- 03 · YouApprove a one-line report. Nothing is posted without you.