Feature Extraction
Transformers
Safetensors
sentence-transformers
multilingual
embedding_gemma2
embedding
multimodal-embedding
multimodal
vision
audio
video
image-feature-extraction
audio-feature-extraction
video-feature-extraction
sentence-similarity
Instructions to use google/embeddinggemma-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/embeddinggemma-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="google/embeddinggemma-2")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModel processor = AutoProcessor.from_pretrained("google/embeddinggemma-2") model = AutoModel.from_pretrained("google/embeddinggemma-2", device_map="auto") - sentence-transformers
How to use google/embeddinggemma-2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("google/embeddinggemma-2") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -328,4 +328,16 @@ In creating an open embedding model, we have carefully considered the following:
|
|
| 328 |
* Training data used for EmbeddingGemma 2 underwent safety filtering to mitigate the risk of these biases.
|
| 329 |
* **Misinformation and Misuse**
|
| 330 |
* Embedding representations can be misused to retrieve, classify, or otherwise organize embedded content in false, misleading or harmful ways.
|
| 331 |
-
* Guidelines are provided for responsible use with the model, see the [Responsible
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 328 |
* Training data used for EmbeddingGemma 2 underwent safety filtering to mitigate the risk of these biases.
|
| 329 |
* **Misinformation and Misuse**
|
| 330 |
* Embedding representations can be misused to retrieve, classify, or otherwise organize embedded content in false, misleading or harmful ways.
|
| 331 |
+
* Guidelines are provided for responsible use with the model, see the [Responsible
|
| 332 |
+
|
| 333 |
+
### Risks Identified and Mitigations
|
| 334 |
+
|
| 335 |
+
* **Misuse for malicious purposes:** Technical limitations and developer and end-user education can help mitigate against malicious applications of embedding models. Educational resources and reporting mechanisms for users to flag misuse are provided.
|
| 336 |
+
* **Privacy violations:** Models were trained on data filtered for removal of certain personal information and other sensitive data. Developers are encouraged to adhere to privacy regulations with privacy-preserving techniques.
|
| 337 |
+
* **Perpetuation of biases:** It's encouraged to perform continuous monitoring (using evaluation metrics, human review) and the exploration of de-biasing techniques during model training, fine-tuning, and other use cases.
|
| 338 |
+
|
| 339 |
+
### Benefits
|
| 340 |
+
|
| 341 |
+
EmbeddingGemma 2 is among the strongest multimodal embedding models under 1B parameters. We’re excited to see how developers will use and adapt this model for on-device or edge AI applications.
|
| 342 |
+
|
| 343 |
+
The model is designed from the ground up for responsible AI development, like other Gemma-family models.
|