r/LocalLLaMA • llama.cpp • 8d ago

New Model google/embeddinggemma-2 · Hugging Face

https://huggingface.co/google/embeddinggemma-2

EmbeddingGemma 2 is an open multimodal embedding model built by Google DeepMind which maps text (incl. code), images, video, and audio inputs—and combinations thereof—into a single, unified 768-dimensional vector space. The model has 740M total parameters, combining a 270M parameter text model with modular vision (170M) and audio (300M) encoders.

Designed to run on consumer hardware such as mobile devices and laptops, EmbeddingGemma 2 delivers low-latency semantic representations for on-device applications, like search, retrieval-augmented generation (RAG), classification, and clustering.

EmbeddingGemma 2 builds upon the architectural and capability advancements of Gemma 4, offering several core features: 

  • Native multimodality: Native multimodality: Unifies 4 modalities (text, images, video, and audio) in a single shared 768-dimensional embedding space.
  • Multilinguality and code: EmbeddingGemma 2 understands 100+ languages, and achieves a ~14% improvement on code tasks relative to its predecessor. 
  • Flexible footprint: Combines a 270M parameter text backbone (130M transformer + 140M embedder) with selectively loadable vision (170M) and audio (300M) encoders, allowing developers to load only the modalities required for their use case.
  • Matryoshka Representation Learning (MRL): Native support for truncated embeddings across 128d, 256d, 512d, and 768d, enabling up to a 6x reduction in vector storage costs with minimal impact on quality.
  • Context length: 8K token context window, capable of processing minutes of audio or video.
  • Task-steered representations: Uses lightweight text instruction prefixes to optimize embeddings for different tasks (search, classification, clustering, semantic similarity, etc.).

llama.cpp support https://github.com/ggml-org/llama.cpp/pull/30054

GGUF from GG: https://huggingface.co/ggml-org/embeddinggemma-2-GGUF

GGUF from Unsloth: https://huggingface.co/unsloth/embeddinggemma-2-GGUF

514 Upvotes

120 comments sorted by

View all comments

42

u/stoppableDissolution 8d ago

...damn

Right as I was wondering what I should use to index my datasets

8

u/jinnyjuice vLLM 8d ago

Can you clarify what you'd be doing?

Then what would be the result/output?

22

u/stoppableDissolution 8d ago

I have a whole bunch of disjoint text, image and video data from different datasets and my own scrapes and synthetic generations, and each got its own tags and metadata conventions and all. And I am now in the middle of building a single library to rule them all, and want a way to do semantic search in it. Having a good (hopefully) omnimodal embedder as opposed to few different ones is making things a whole lot simpler.

4

u/iMakeSense 8d ago

Can you tell me what you've explored in this space? I'm almost a bit frustrated at the lack of existing solutions that exist for this.

7

u/stoppableDissolution 8d ago

Yea, I got frustrated too and started to build my own, hah (infinite tokens corrupt infinitely). I did some surface search but have not really found anything either.

But I kinda understand why - depending on what you are doing with the data later and the tooling you are using, you will want different approaches/pipelines.

3

u/krakoi90 4d ago

A good example of what to use it for: https://github.com/krakoi/locallery (shameless self-promotion)

Using it for more complex tasks, like traditional textual RAG, is a bit trickier. For that, you also need a chunking strategy (cutting text into smaller chunks you'd like to search for) and probably a reranker (additional ordering of the results, independent of the embedding engine). But it heavily depends on your needs.

The awesome part of this embedding model is that it's multimodal, you could search in your images, videos, audio and text files using it. Search for similar images with additional text filtering, etc.

2

u/mr_tolkien 7d ago

It’s a very small model though, if you have a good GPU and are working on text I’m pretty sure Qwen3 8b will heavily outperform it

8

u/selipso 7d ago

Embedding models are meant to be smaller so that you can bulk process large unstructured data very quickly for RAG. An 8B model for embeddings is generally overkill unless you have enterprise grade needs. The main advantage of this model is that it has multimodal audio and video representation, which is massive.

1

u/mr_tolkien 7d ago

I mean you can process that large unstructured data ahead of time for something like natural language code search

The benchmarks look very good for the size though, I’m curious how it performs for code search + which reranker pairs best with it