Run this model with HF Jobs
Run google/embeddinggemma-2 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/google/embeddinggemma-2. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/google/embeddinggemma-2 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
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] - Inference
- Notebooks
- Google Colab
- Kaggle
I make a local photo and video search app using EmbeddingGemma 2
I’ve been using EmbeddingGemma 2 to build an open source desktop app for searching local photos and short videos with text or a reference image.
It uses the ONNX Community conversion, defaults to Q8, and supports videos up to 32 seconds. Processing runs locally. Installers are available for macOS and Windows, with a native CoreML GPU backend for Apple Silicon.
Sharing it here as an example application of the model. Feedback on the implementation is welcome.
Thanks for sharing this as a working example. Local processing throughout, the ONNX Community conversion defaulting to Q8, and video support up to 32 seconds make the design clear, and the native CoreML GPU backend for Apple Silicon alongside macOS and Windows installers gives it a concrete local lane to test. Field notes on search quality over large local libraries would be useful data from here.