EmbeddingGemma 2 sem audio
lightweight model for text, images, and video
2 min readupdated
This is an unofficial copy of the multimodal language model google/embeddinggemma-2 from Google DeepMind with audio support completely removed. As a result, the file size dropped from 1.49 GB to 878 MB, and the parameter count decreased from 744M to 439M (million). Text and visual capabilities are fully preserved, and embedding accuracy (numerical vector representations of data) matches the original up to the sixth decimal place. The model is useful for developers who need vector representations of text, images, and video but do not require audio processing, allowing them to save server memory.
Key features
- Reduced size: Model weight decreased by almost half due to the removal of 752 audio encoder tensors.
- Multimodality: Support for text (including code), images, and video within a single 768-dimensional vector space.
- Flexible dimensionality: Support for MRL (Matryoshka Representation Learning) with the ability to reduce dimensionality to 512, 256, or 128.
- Full compatibility: Fully maintains compatibility with the
transformersandsentence-transformerslibraries.
What you can do
- Semantic search: Build a search engine for text documents and code using task prefixes like
SearchQueryandDocument. - Multimodal search: Search for images and video using text queries or vice versa.
- Clustering and comparison: Sort and group text snippets or images using cosine similarity.
- Resource optimization: Run the model on weaker hardware or in services with strict VRAM (video memory) limits.
Example
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("HRB25/embeddinggemma-2-sem-audio")
consulta = "O que causa a aurora boreal?"
documento = "A aurora boreal é causada por partículas carregadas vindas do Sol."
q = model.encode(consulta, prompt_name="SearchQuery")
d = model.encode(documento, prompt_name="Document")
print(model.similarity(q, d))
Read more
DetailsEmbedding dimension: 768 (with support for truncation to 512, 256, and 128)
Parameters: 438.76M (instead of 744.37M in the original)
Weight precision: bfloat16, context up to 8192 tokens
Limitations: audio module completely removed, input audio is not supported
License: Apache 2.0 (same as the base model)










Comments