EmbeddingGemma 2 Vector Checker
Check exported vectors and compare rankings across prefix dimensions.
JSON format for the EmbeddingGemma 2 Vector Checker
Use strict JSON: double-quoted keys, finite numeric arrays and no comments. Required top-level keys are query and documents; metadata is optional. Each document requires id, modality and embedding. Additional keys and whole OpenAI API response envelopes are not accepted: copy the numeric embedding arrays into this format first.
{
"query": [0.25, 0.5],
"documents": [
{"id": "item-1", "modality": "text", "embedding": [0.2, 0.6]}
],
"metadata": {
"model": "embeddinggemma-2",
"runtime": "pytorch",
"dtype": "bfloat16"
}
}
This two-dimensional illustration can be checked, but cannot be truncated to a supported MRL width. Load synthetic example provides a complete 768d file for the comparison controls. Its hand-written coordinates and modality labels are demonstrations, not EmbeddingGemma 2 outputs or quality benchmarks.
The accepted declared model IDs are embeddinggemma-2, google/embeddinggemma-2 and onnx-community/embeddinggemma-2-ONNX. Useful runtime declarations are pytorch, sentence-transformers, transformers-pytorch, vllm, onnx, onnxruntime or transformers.js. An optional runtimeVersion string records a release or commit. These declarations are not verified. IDs allow 100 characters; metadata strings allow 160; nesting is limited to 8 levels.
What a dimension comparison tells you
EmbeddingGemma 2 has a native 768d output and supports Matryoshka Representation Learning (MRL): retaining the leading 512, 256 or 128 components. This checker slices the existing query and every document, normalizes each prefix to unit length, then uses their dot product as cosine similarity. The full-width normalized ranking supplies the reference.
Top-k overlap is the fraction of reference top-k IDs that remain in a prefix ranking. Rank movement, entered IDs and exited IDs show what changed on this small sample. They do not show whether a result is relevant. Group means use your declared modality labels and may hide individual errors. Evaluate relevant-document labels and a representative workload before choosing a production dimension.
With the same storage type, raw vector bytes scale with dimension: 512d uses two thirds of 768d; 256d one third; 128d one sixth. Index overhead, database costs and real search latency are not measured here. Google’s model card reports larger multimodal degradation at 128d, so test your own mixed-modality workload.
Runtime notes before you trust an export
Google’s original PyTorch model guidance says to use bfloat16 or float32 for inference, and avoid float16. The ONNX Community conversion separately documents fp16 on WebGPU and quantized variants. This checker distinguishes those declared runtimes; it does not run either model, test a device or infer the generating dtype from JSON numbers.
vLLM issue #60977, reported October 10, 2026, describes unfixed upstream commit a98247ab4d: the default request returned 768d, while explicitly requesting 768 was rejected by a 512 validation limit. A matching declared commit gets that specific notice. Other versions remain unverified here; this page does not fix or test your serving runtime.
Before generating your vectors, confirm that query and corpus used the same model, revision and embedding space. Check the task prefixes in Google’s model card: task-steered query prefixes and titled document formatting apply to text; image, audio and video inputs do not take text prefixes. This is a preparation checklist, not a check this page performs on your input.
Frequently asked questions
Does this generate embeddings or load EmbeddingGemma 2?
No. Supply vectors you already generated. This page uses local JavaScript arithmetic and does not load a model or call an API. The example uses hand-written synthetic numbers, not model inference.
Does top-k overlap measure retrieval accuracy?
No. It measures how many original top-k document IDs remain in the truncated ranking. The original ranking is a reference, not ground truth. Evaluate retrieval quality with your own relevant-document labels.
Can the checker verify the model or a document’s modality?
No. Model, runtime, dtype and document modality are user declarations. Numeric vectors do not establish their source model, encoder, task prefix or semantic accuracy.
What do the downloads contain?
JSON contains diagnostics, metadata, rankings and normalized query/document vectors at the original and selected prefix dimensions. CSV contains all ranking rows and diagnostics, with formula-like text cells neutralized. Downloads stay local and can contain your document IDs and vectors.
Are vectors uploaded or sent to analytics?
No. Inputs and calculations stay in the current browser page and are not stored. Google Analytics receives page visits and fixed tool actions, never vectors, document IDs, modality labels, metadata or filenames. Reloading or Clear all removes the input. See our privacy page.
Can normalization fix a bad model export?
It can make a finite, nonzero vector unit-length. It cannot repair missing dimensions, NaN values, a wrong model, inappropriate text prefixes or degraded inference. Proper cosine already divides by both norms; the practical risk is using a raw dot product as though it were cosine.
Facts checked October 14, 2026. Sources: Google’s October 6 launch, official model card, ONNX Community conversion and the reported vLLM issue. This independent tool is not affiliated with or endorsed by Google, Hugging Face or vLLM.
Related tools
Prepare a Wallet poster generic pass, review an project.xcproj configuration, or browse all Tool Cafe tools.
Prepare your JSON in 3 steps
- Export one query vector and up to 50 document vectors from the same embedding space.
- Give each document a unique ID and one declared modality: text, image, audio, video or code.
- Wrap them in the format below. Check the originals, then compare the prefix dimensions you need.