Blog

Notes on small models in production.

What I have learned running these models for real — the memory math, the economics, and the new models worth your attention. Mostly small. Sometimes brand new.

One space for everything: EmbeddingGemma 2

Text, code, images, video, and audio in one 768-dimension space

· 3 min read

Search needs numbers. A model reads your words, your images, your video, and your audio. It writes one list of numbers for each item. You store the lists. Later you give the model one item, and it gives you back the lists that look like it.

Today, every kind of data needs its own model and its own index. EmbeddingGemma 2 removes that rule. It puts all five kinds into one shared space of 768 dimensions. One index and one query search all of it. Google released the model on 6 October 2026.

The model is modular

The full model has 740 million parameters. You rarely need all of them. The model has a 270M text core. A 170M image encoder and a 300M audio encoder join it only when a task asks for them.

LoadParametersActive RAM (quantized)
Text + code only270M~191 MB
Text + image + video440M—
Text + audio570M—
Everything740M~567 MB

Google measured this memory on a Pixel 11 Pro with the int4 builds. The text-only load fits in the memory that one phone app can use.

One warning from the model card: use bfloat16 or float32. Plain float16 breaks the output. This is rare, and it will surprise people.

The context is a shared budget

The context is 8,192 tokens. All media share it. That is room for about 29 images, 58 video frames, or 5.5 minutes of audio. The previous model had a quarter of that.

It is still a budget. A three-hour video does not fit. Split the media into parts, embed each part, and search the parts.

Cut the vector, keep the meaning

The vectors are Matryoshka. A full vector has 768 dimensions. You can cut it to 512, 256, or 128. The model stays usable. A cut vector costs less storage and less math. Google says the 128 setting fits text-only work. For an index of one million documents, the cut from 768 to 256 removes about two thirds of the store.

The scores

Google reports MTEB Code from 68.76 to 78.68. Code search improved a lot. The multilingual text score barely moved: 61.15 to 61.36. The English score went down a little. The vision, video, and audio scores are new, so there is no old number to compare them with.

Now the warning. Google ran every test itself, on the full-precision model. The MTEB project has not accepted the submission. No outside test of this model exists yet. I would treat the scores as a starting point, and test the model on my own data first.

The license

EmbeddingGemma 1 used the Gemma license with a manual gate. You asked Google for access. Google approved. Version 2 is Apache 2.0 with the gate off. A build server can pull the weights without a person in the loop. This is the biggest change from version 1.

Two small details. The repository has no LICENSE file at the root. The license lives in the metadata and a link. The model card still mentions the Gemma Prohibited Use Policy. Neither blocks a commercial use today. Check both again before you build a product on it.

Start it

pip install sentence-transformers

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("google/embeddinggemma-2")

# text and code embed straight away
doc = model.encode(["a voice memo about a broken window"])

# the image and audio encoders load only when a
# modality asks for them — no extra setup

The weights sit on Hugging Face and Kaggle under google/embeddinggemma-2. Transformers 5.19 supports the model. Ollama, MLX, ONNX, and llama.cpp builds exist. There is no gated repo and no permission to ask for.