EmbeddingGemma 2 — GGUF
GGUF conversions of google/embeddinggemma-2 for llama.cpp.
Multimodal embedding model (text + vision + audio) by Google. Output dimension: 768.
Files
| File | Type | Size |
|---|---|---|
google-embeddinggemma-2-bf16.gguf |
Main model (bf16, lossless from original weights) | 533 MB |
google-embeddinggemma-2-q8_0.gguf |
Main model (q8_0) | 290 MB |
google-embeddinggemma-2-q4_K_M.gguf |
Main model (q4_K_M) | 174 MB |
mmproj-google-embeddinggemma-2-bf16.gguf |
Multimodal projector (vision + audio, bf16) | 937 MB |
Usage
Requires a recent llama.cpp build (2025-10+ / commit 8bb3cf0d2 or newer) with EmbeddingGemma 2 support.
llama-server (OpenAI-compatible embeddings)
llama-server \
-m google-embeddinggemma-2-q8_0.gguf \
--mmproj mmproj-google-embeddinggemma-2-bf16.gguf \
--embeddings \
-ngl 99 -b 2048 -ub 2048 \
--port 8080
curl http://localhost:8080/v1/embeddings \
-H "Content-Type: application/json" \
-d '{"model": "embeddinggemma-2", "input": ["your text here"]}'
Task instruction prefixes (important for quality)
Per the original model card, queries and documents should be prefixed by task:
| Use case | Query | Document |
|---|---|---|
| Web / document search | task: search result | query: {query} |
title: {title} | text: {content} |
| Question answering | task: question answering | query: {question} |
title: {title} | text: {passage} |
| Fact checking | task: fact checking | query: {claim} |
title: {title} | text: {evidence} |
| Symmetric similarity | raw text | raw text |
Use title: none when no title is available.
Notes
- Embeddings are L2-normalized by llama.cpp by default: dot product = cosine similarity.
- The llama.cpp
/v1/embeddingsendpoint currently supports text-only embeddings; vision/audio encoders require the mmproj file and are for multimodal use (audio support is experimental upstream). - Converted with
convert_hf_to_gguf.pyfrom the officialgoogle/embeddinggemma-2release (commit914f7f8).
License
Gemma Terms of Use — see license link. Original model © Google.