riso348's picture
EmbeddingGemma 2 text-only (language_model tensors)
5cf2f93 verified
|
Raw History Blame Contribute Delete
1.72 kB
---
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](https://huggingface.co/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 in `model.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: `, document `title: none | text: `.
- **Made for:** on-device mail search in [Enveloo](https://enveloo.app) (Rust, candle). The extraction script is
`scripts/extract_embeddinggemma_text.py` in the Enveloo repository.
## License
Apache 2.0, the same as the original model ([Gemma 4 license](https://ai.google.dev/gemma/docs/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.