EmbeddingGemma 300M
google/embeddinggemma-300m
published Jul 2025 · updated Sep 2025
EmbeddingGemma 300M is a sentence-similarity model that produces vector representations of text for search, retrieval, classification, and clustering tasks.
specs
| Task | Sentence Similarity / Embedding |
| Architecture | Based on Gemma 3 with T5Gemma initialization |
| Parameters | 300M |
| License | Google Gemma Terms |
| Embedding Dimension | 768 (with MRL options 512, 256, 128) |
| Context Length | 2048 tokens |
about this model
google/embeddinggemma-300m is a sentence-similarity model that produces dense vector embeddings for text, optimized for search, retrieval, and semantic similarity tasks. Developed by Google DeepMind, it is a 300M parameter open embedding model built from Gemma 3 with T5Gemma initialization and trained on data spanning over 100 languages. The model accepts up to 2048 tokens per input and outputs 768-dimensional vectors, with support for Matryoshka Representation Learning (MRL) enabling truncation to 512, 256, or 128 dimensions while preserving accuracy.
Key Strengths
EmbeddingGemma achieves state-of-the-art results among models with fewer than 500M parameters, outperforming both proprietary and open alternatives. Its performance is comparable to models double its size, offering an exceptional performance-to-cost ratio. The model is designed for low-latency, high-throughput deployment: official benchmarks report generative embeddings in less than 22ms on EdgeTPU and memory usage under 200MB with quantization.
Benchmark Results (Full Precision)
Evaluated on the Massive Text Embedding Benchmark (MTEB) across multilingual, English, and code domains:
| MTEB (Multilingual v2) | Mean (Task) | Mean (TaskType) |
|---|---|---|
| 768d | 61.15 | 54.31 |
| 512d | 60.71 | 53.89 |
| 256d | 59.68 | 53.01 |
| 128d | 58.23 | 51.77 |
English MTEB v2 achieves 69.67 (768d) and Code v1 achieves 68.76 (768d). Quantization-aware training (QAT) checkpoints are available with minimal degradation, e.g., Q4_0 retains 60.62 on multilingual MTEB.
Additional Capabilities
The model supports both query and document encoding with dedicated methods, and its lightweight footprint makes it suitable for on-device and resource-constrained environments. For further technical details, refer to the paper EmbeddingGemma: Powerful and Lightweight Text Representations.
best for
- ·Semantic search and retrieval
- ·Text classification and clustering
- ·On-device embedding generation
FAQ
It excels at semantic search, retrieval, classification, and clustering tasks, especially in resource-constrained environments like mobile or edge devices.
At 300M parameters, it outperforms prior top models under 500M parameters and matches models twice its size. It can generate embeddings in less than 22ms on EdgeTPU and run on under 200MB of RAM with quantization.
The model is released under the Google Gemma Terms, which permit use, reproduction, modification, and distribution subject to the terms. See the official terms page for details.
Input: text strings up to 2048 tokens. Output: numerical vector embeddings of dimension 768 (or 512/256/128 via Matryoshka Representation Learning). Use float32 or bfloat16 precision.
Use the gigarouter OpenAI-compatible endpoint with your API key. Send a POST request with the input text and model name to get the embedding vector.
# OpenAI client - just change base_url from openai import OpenAI client = OpenAI(base_url="https://gigarouter.ai/v1", api_key=KEY) v = client.embeddings.create(model="google/embeddinggemma-300m", input=["hello world"]) print(v.data[0].embedding[:4])
try it live
runs the real hosted model on a shared demo allowance · get your own key + $25 free →