Feature Extraction
sentence-transformers
Safetensors
multilingual
embedding_gemma2
embedding
text-embeddings-inference
on-device
Instructions to use riso348/embeddinggemma-2-text with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use riso348/embeddinggemma-2-text with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("riso348/embeddinggemma-2-text") 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
|
Download README.md from riso348/embeddinggemma-2-text: direct link, hf CLI and curl.
- Browser
- Download file 1.72 kB
-
https://huggingface.co/riso348/embeddinggemma-2-text/resolve/main/README.md
- Command line
-
hf download hf://riso348/embeddinggemma-2-text/README.md
-
curl -L -o README.md https://huggingface.co/riso348/embeddinggemma-2-text/resolve/main/README.md
1.72 kB
metadata
license: apache-2.0
base_model: google/embeddinggemma-2
pipeline_tag: feature-extraction
library_name: sentence-transformers
tags:
- embedding
- text-embeddings-inference
- on-device
language:
- multilingual
EmbeddingGemma 2 — text only
The text tower of google/embeddinggemma-2 without the vision and audio encoders: 542 MB instead of 1.5 GB, same text embeddings.
- What changed: only the
language_model.*tensors (413, bfloat16) are kept inmodel.safetensors. Nothing was retrained, merged or re-quantized. Config, tokenizer and the sentence-transformers modules (mean pooling, normalization, prompts) are copied unchanged. - Embeddings: identical to the original for text input (cosine 1.00000 in float32; ≥ 0.99994 in bfloat16 on Apple GPUs).
- sentence-transformers: loads as usual and gives the same text embeddings (cosine 1.0). It warns that the vision and audio weights are missing and initializes those towers randomly; they are never used for text.
- Use: text search on phones and laptops, where downloading the image and audio parts is wasted. Prompts as in the
original: query
task: search result | query:, documenttitle: none | text:. - Made for: on-device mail search in Enveloo (Rust, candle). The extraction script is
scripts/extract_embeddinggemma_text.pyin the Enveloo repository.
License
Apache 2.0, the same as the original model (Gemma 4 license). This is a modified version of google/embeddinggemma-2: the vision and audio weights were removed. All credit for the model goes to Google DeepMind.