Matryoshka Microscope

EmbeddingGemma 2 runs in this tab and matches what the lens sees against 1,305 phrases. Turn the focus to see the match with 128, 256, 512 or all 768 numbers per vector.

Loading the model

How the ranking changes as the focus sharpens

Left, the five best phrases at 128 dimensions. Right, the five best at 768. Lines follow each phrase through every level.

What you are looking at

EmbeddingGemma 2 turns a photo and a sentence into vectors in the same space, so a photo can be matched against text directly. It was trained with Matryoshka Representation Learning: the first 128 numbers of a vector already work as a smaller vector, as do the first 256 and 512. This page scores the photo against every phrase at all four lengths and lets you move between them.

Nothing leaves your device. The model (text and vision parts, 4-bit, about 285 MB) downloads once from Hugging Face and runs on your GPU through WebGPU. The phrase vectors were computed ahead of time with the same model.