EmbeddingGemma 2 — GGUF, lighter (Q6_K text, split encoders)
EmbeddingGemma 2 by Google DeepMind for llama.cpp, packed to download less:
- the text model quantized to Q6_K (246 MB instead of Q8_0's 310 MB), with the same search quality in our tests;
- the image and audio encoders split into two files, so an app that only needs pictures doesn't download the audio encoder (226 MB for images, 328 MB for audio, instead of 555 MB for both).
Made for Pastemind, a clipboard history and launcher for macOS that searches by meaning. Nothing was retrained or fine-tuned.
Files
| File | What | Size | SHA-256 |
|---|---|---|---|
embeddinggemma-2-Q6_K.gguf |
text model, Q6_K | 245,764,320 B | a7aae0a994f621421032db719cbc7f67081de72d8774650ae480b9a24e637fd2 |
mmproj-embeddinggemma-2-vision-Q8_0.gguf |
image encoder (also video frames), Q8_0 | 226,342,528 B | 099ef9869f816ca2bd8e665d598db4d4ed43c551b7d1d961a54d16b86693354b |
mmproj-embeddinggemma-2-audio-Q8_0.gguf |
audio encoder, Q8_0 | 328,479,328 B | a838ad159d2b5e708c1b0b8b14e945a763ed194bae24dce2c1c56384df3ff72d |
Use the text model with either encoder, or both (each as its own mmproj, in its own mtmd context).
How they were made
- Text model:
llama-quantize … Q6_K(llama.cpp b11461) fromembeddinggemma-2-BF16.ggufof ggml-org/embeddinggemma-2-GGUF at revisionbfcd298762cc34d0357ece5ebdd31791a3a374d8(converted fromgoogle/embeddinggemma-2). Never F16: the model's activations overflow float16. - Encoders:
mmproj-embeddinggemma-2-Q8_0.gguffrom the same revision, split with llama.cpp's gguf-py: the vision file keeps thev.*tensors andmm.input_projection, the audio file thea.*tensors andmm.a.input_projection, each with the other encoder's metadata removed and itsclip.has_*_encoderflag set to false. Tensors are copied byte for byte: vectors from the split files equal those from the original file (cosine 1.000000 on 10 pictures, a video and 3 recordings).
Quality against Q8_0
Pastemind's evaluations (llama.cpp, Metal, M1 Pro; pictures at 140 soft tokens):
| Size | Vectors vs Q8_0 (cosine, mean / min) | Text queries (24) | Pictures (46) | Files (32) | |
|---|---|---|---|---|---|
| Q8_0 (ggml-org) | 310 MB | — | 24 | 44 | 30 |
| Q6_K (here) | 246 MB | 0.999 / 0.997 | 24 | 44 | 30 |
| Q5_K_M | 213 MB | 0.997 / 0.991 | 23 | 44 | 31 |
| Q4_K_M | 182 MB | 0.989 / 0.967 | 21 | 43 | 31 |
The queries are in several languages; numbers are top-1 hits. Q6_K's vectors are close enough to Q8_0's that an index made with one can be searched with the other. Speed is the same (a query ~9 ms, a picture ~180 ms).
Use
llama-embedding -m embeddinggemma-2-Q6_K.gguf --pooling mean -p "task: search result | query: a dog on the beach"
Images and audio go through mtmd (mtmd_init_from_file with the vision or the audio file), their output rows then
take their place among the text model's tokens, mean-pooled into one 768-d vector in the same space as text. Prompts
and sizing are those of the original model: see
google/embeddinggemma-2.
License
Apache License 2.0, as the original model (see LICENSE). EmbeddingGemma 2 is by Google DeepMind; the GGUF conversion
is by ggml-org. These files change the format only, as described above. Not affiliated with or endorsed by Google.