Instructions to use google/embeddinggemma-300m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use google/embeddinggemma-300m with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("google/embeddinggemma-300m") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Inference
- Notebooks
- Google Colab
- Kaggle
I thought it will be smaller?
google/gemma-3-270m-it size is better for me even if this is mean lower accuracy
Hi @yousef1727 ,
Welcome to Google's open-source Gemma models, thanks for reaching out to us. The google/gemma-3-270m-it is a Tiny model that was released under Gemma-3 models, which is the smallest parameters model that is available under Gemma 3 family in million parameters level. The google/embeddinggemma-300m is designed and developed for On-Device Embeddings related tasks. EmbeddingGemma generates embeddings, which are numerical representations - in this case, of text (such as sentences and documents) - by transforming it into a vector of numbers to represent meaning in a high-dimensional space. The better the embeddings, the better the representation of language, with all its nuances and complexities.
To know more about embedding Gemma please visit the following page.
Thanks.
Thanks for it anyway!