Skip to content

google/EmbeddingGemma 2 740M ​

Description ​

EmbeddingGemma 2 is a lightweight multilingual embedding model for retrieval, semantic search, routing, and RAG. The upstream model maps text, code, images, video, and audio into a shared embedding space. This registry entry serves its text, image and audio embedding paths through the local llama-server embedding API.

The model produces 768-dimensional vectors and supports Matryoshka reduction to 512, 256, or 128 dimensions. It supports an 8K-token context window.

Run ​

bash
self serve embeddinggemma-2:740m

Here is a link to the API docs: Embeddings API.

Example Request ​

With the server running, open another terminal and send a request:

bash
curl http://localhost:8080/v1/embeddings \
	-H 'Content-Type: application/json' \
	-d '{"input":"task: code retrieval | query: How do I index a codebase?"}'

The server returns a JSON response containing the embedding vector.

Engine Parameters ​

Served by the upstream llama-server through the embedding adapter. These are startup settings, not per-request API fields. Settings not specified in the registry are left to the bundled engine's defaults.

ParameterDefaultWhat it controls
context_size8192Engine context size in tokens; accepts integers from 512 to 1048576.
poolingmeanEmbedding pooling; accepts none, mean, cls, last, or rank.
threadsEngine default (not set in registry)Number of CPU workers; accepts integers from 1 to 1024.
gpu_layersEngine default (not set in registry)Layers offloaded to GPU; accepts integers from -1 to 10000, with -1 meaning all layers.
flash_attnEngine default (not set in registry)Flash Attention mode: auto, on, or off; availability depends on the backend and model.
parallelEngine default (not set in registry)Number of parallel engine slots; accepts integers from 1 to 256.

Override startup settings with --set <parameter>=<value>.

Quantizations and Files ​

Default variant: q8. Sizes and SHA-256 hashes are pinned in the model registry.

q8 (default) ​

FileRoleSizeSHA-256Origin
embeddinggemma-2-Q8_0.ggufmodel295.6 MiB (309855456 bytes)2188ac1deca4b77dffefd603c2776a9d76d9d74ec01841392982ebb840b09135ggml-org/embeddinggemma-2-GGUF
mmproj-embeddinggemma-2-Q8_0.ggufmmproj529.1 MiB (554821024 bytes)c4a8a52691ecef40618438928bdf9e68379b854e24166f292592353db0aab64fggml-org/embeddinggemma-2-GGUF

Total download: 824.6 MiB (864676480 bytes).

Notes ​

  • Requires the bundled llama.cpp b11476 runtime or a compatible newer release with gemma-embedding2 support.
  • For search queries, use task: search result | query: <query>; for code search, use task: code retrieval | query: <query>. Format indexed documents as title: <title or none> | text: <content>. The adapter does not add these prefixes.
  • The API returns the full vector and does not support the dimensions request field. For Matryoshka reduction, truncate and normalize vectors consistently for queries and documents according to the upstream model card.
  • The bundled Q8 projector enables image and audio inputs. Use content-object batches documented in the Embeddings API. Media must be inline PNG/JPEG or PCM16 WAV; remote URLs and video are not supported.

Quality benchmarks ​

MTEB: Publisher-reported

google/embeddinggemma-2

Publisher-reported full-precision checkpoint, 768 dimensions. Not confirmed in the independent MTEB model index; no leaderboard rank.

Checked 2026-10-13

DatasetMetricScore
MTEB multilingual v2Mean(Task), Multiple61.36
MTEB code v1Mean(Task), NDCG@1078.68

Benchmarks ​

No submitted benchmark reports yet.