Skip to content

Commit f93e634

Browse files
Copilotkiview
andcommitted
Create ai/embedding-gemma.md model card
Co-authored-by: kiview <[email protected]>
1 parent 6077b42 commit f93e634

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

ai/embedding-gemma.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Embedding Gemma
2+
3+
![logo](https://github.com/docker/model-cards/raw/refs/heads/main/logos/[email protected])
4+
5+
**Embedding Gemma** is a state-of-the-art text embedding model from Google DeepMind, designed to create high-quality vector representations of text. Built on the Gemma architecture, this model converts text into dense vector embeddings that capture semantic meaning, making it ideal for retrieval-augmented generation (RAG), semantic search, and similarity tasks. With open weights and efficient design, Embedding Gemma provides a powerful foundation for embedding-based applications.
6+
7+
## Intended uses
8+
9+
Embedding Gemma is designed for applications requiring high-quality text embeddings:
10+
11+
- **Semantic search and retrieval**: Excellent for building search systems, document retrieval, and RAG applications that need to find semantically relevant content.
12+
- **Text similarity and clustering**: Generate embeddings for measuring text similarity, document clustering, and content deduplication tasks.
13+
- **Classification and downstream tasks**: Use embeddings as input features for various NLP classification tasks and machine learning pipelines.
14+
15+
## Characteristics
16+
17+
| Attribute | Details |
18+
|---------------------- |--------------------------------------------------------------|
19+
| **Provider** | Google DeepMind |
20+
| **Architecture** | Gemma Embedding |
21+
| **Cutoff date** | - |
22+
| **Languages** | English |
23+
| **Tool calling** ||
24+
| **Input modalities** | Text |
25+
| **Output modalities** | Embedding vectors |
26+
| **License** | [Gemma Terms](https://ai.google.dev/gemma/terms) |
27+
28+
## Available model variants
29+
30+
| Model variant | Parameters | Quantization | Context window | VRAM¹ | Size |
31+
|----------------------------------------------------------------------|------------|--------------|----------------|----------|-----------|
32+
| `ai/embedding-gemma:latest`<br><br>`ai/embedding-gemma:300M-F16` | 300M | F16 | 2K tokens | 0.68 GiB | 571.25 MB |
33+
| `ai/embedding-gemma:300M-F16` | 300M | F16 | 2K tokens | 0.68 GiB | 571.25 MB |
34+
35+
¹: VRAM estimated based on model characteristics.
36+
37+
> `latest``300M-F16`
38+
39+
## Use this AI model with Docker Model Runner
40+
41+
First, pull the model:
42+
43+
```bash
44+
docker model pull ai/embedding-gemma
45+
```
46+
47+
Then run the model:
48+
49+
```bash
50+
docker model run ai/embedding-gemma
51+
```
52+
53+
To generate embeddings using the API:
54+
55+
```bash
56+
curl --location 'http://localhost:12434/engines/llama.cpp/v1/embeddings' \
57+
--header 'Content-Type: application/json' \
58+
--data '{
59+
"model": "ai/embedding-gemma",
60+
"input": "Your text to embed here"
61+
}'
62+
```
63+
64+
For more information on Docker Model Runner, [explore the documentation](https://docs.docker.com/desktop/features/model-runner/).
65+
66+
## Considerations
67+
68+
- **Context length**: The model supports up to 2K tokens. Longer texts may need to be chunked for optimal performance.
69+
- **Language support**: Primarily trained on English text, performance on other languages may vary.
70+
- **Embedding dimension**: The model produces 768-dimensional embeddings suitable for most downstream tasks.
71+
- **Normalization**: Embeddings are normalized by default, making them suitable for cosine similarity calculations.
72+
73+
## Benchmark performance
74+
75+
| Task Category | Embedding Gemma |
76+
|---------------------|----------------|
77+
| Retrieval | 54.87 |
78+
| STS | 78.53 |
79+
| Classification | 73.26 |
80+
| Clustering | 44.72 |
81+
| Pair Classification| 85.94 |
82+
| Reranking | 59.36 |
83+
84+
## Links
85+
86+
- [Embedding Gemma Model Card](https://huggingface.co/google/embeddinggemma-300m)
87+
- [Gemma Model Family](https://ai.google.dev/gemma/docs)
88+
- [Gemma Terms of Use](https://ai.google.dev/gemma/terms)

0 commit comments

Comments
 (0)