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
A signed admission record for this exact file, plus a one-byte challenge
This model's checkpoint now has a published MFENX admission record: its single model.safetensors file (1,488,915,288 bytes, sha256 197a32965d4b1105faf060417baa899e193fb73cd401f42ec9295234d5553d79) is bound to a signed integrity receipt, published alongside the other records at https://mfenx.com/evidence/public-models/.
The challenge: download the file from this repo, change any byte you like, and run your copy against the published receipt with the free MFENX verifier (https://mfenx.com/verify/). Verification should fail, because the receipt binds these exact bytes. The first person to produce a modified copy that passes verification gets a free year of MFENX Team. Post your tamper-test output here if you try it.
If you ship model releases, would a receipt like this help your release process?
Scope note: this is an integrity-tier record (decision NOT_EVALUATED) under a demonstration key, proving the bytes are the admitted bytes, not that the embeddings are good.