One 744M-parameter model turns text, images, audio and video into points in one shared space, so a spoken question can find a photo, a clip or a paragraph.
Pick a query, or tap anywhere in the space to drop one. Then filter the search by kind of item and watch the nearest neighbours light up across kinds. Then we build, piece by piece, the model that puts every item in its place: its inputs, its losses, its curriculum and the knobs that shrink it onto a phone.
You need what a vector is (a list of numbers, drawn as an arrow) and a rough idea of a neural network (a function with learned weights). We build the rest from zero.
Based on EmbeddingGemma 2: Unified and Efficient Multimodal Representations by Henrique Schechter Vera, Sahil Dua and the EmbeddingGemma Team at Google DeepMind (arXiv 2610.37364, October 2026). Every idea is re-taught here in our own words and devices.
Illustrative: 22 hand-placed items on a flat map that stands in for the model’s 768-dimensional space. Each map point is lifted onto a sphere, and the scores are true cosine similarities between those lifted vectors. Shapes: text, image, audio, video. The 744M parameters are the paper’s (Section 1).
Chapter 0
See why searching across text, pictures, sound and video needs one model, and why that model must also be small
Your phone holds ten thousand photos, two hundred voice memos, a folder of videos and a pile of notes. You say: “find the clip where the dog barks at the doorbell”. The answer is a video. Your question is speech. Nothing in the phone shares a format with anything else.
Search engines solve this kind of problem with embeddings. An embedding is a fixed-length list of numbers that stands for one piece of data. Think of it as an address on a map of meaning. The model that makes it, the embedding model, puts similar things at nearby addresses. To search, you turn the question into an address and return the items with the nearest addresses.
The hero at the top of this page is that map, drawn flat. The trick that makes it useful is that every kind of item lives on the same map. A bark, a beagle photo and the words “a dog barking” all sit in the same corner. If they did not, a spoken question could never land near a video.
The first way is to turn everything into text. A speech recogniser (ASR, automatic speech recognition) writes down what was said. An image captioner writes a sentence about each picture. Then a text embedding model does the rest.
The paper names two problems with this. Each extra model costs compute. And each one throws signal away: a transcript has no room for a dog’s bark, a captioner skips the small print on a slide.
The second way gives each modality (a kind of input: text, image, audio, video) its own encoder tower, trained so the towers agree. CLIP, ALIGN and SigLIP work like this for images and text. They match a photo to a caption well. But each tower sees only its own modality, so they cannot read a mixed-modal input, such as a photo plus the words “but in red”, as one thing.
The third way starts from a multimodal large language model (MLLM: a chat model that can also read images, sound or video) and trains it to output embeddings. It reads mixed inputs natively. But the paper points out the cost: these models usually hold several billion parameters. That is too slow for a search box that must answer at once, and too large for a phone that must work offline or keep data private.
Here is the first way, made concrete. A five-second voice memo holds a question and two sounds. Send it through the speech-recogniser pipeline, then through a model that hears audio natively. Compare what each one gets to embed.
The strip is the memo, second by second. Choose a pipeline and see which parts reach the embedding model. Drag the length to see how many audio tokens the native path makes.
The memo and its transcript are illustrative. The rate of 25 audio tokens per second (one per 40 ms chunk) and the two delimiter tokens are the paper’s (Section 2.2). The scores are the paper’s MSEB(Retrieval) results, MRR@10, Table 11: EmbeddingGemma 2 through ASR 57.59 (271M parameters), natively 69.54 (577M).
The transcript keeps the words and nothing else. The bark and the doorbell are gone, and an accent can turn “beach” into “beech” before the embedding model ever sees it. The native path cuts the sound into 40-millisecond chunks and turns each chunk into a vector, 25 per second, so the bark arrives as data.
The paper measures exactly this. MSEB(Retrieval) is a benchmark where a spoken question must find the right text passage, in 26 languages and locales. Its score, MRR@10, is the average of 1 divided by the rank of the first right answer, counting only the top 10. If the right passage comes third, that question scores 1/3; if it misses the top 10, it scores 0. The benchmark reports the mean times 100, so 100 means the right passage is always first. EmbeddingGemma 2 scores 57.59 through a transcript and 69.54 when it hears the audio itself.
EmbeddingGemma 2 is the paper’s answer to all three problems. It is one open model with 744M parameters. It reads text, images, audio, video, and any interleaved mix of them, and it writes one 768-number embedding for the whole input. Every input lands in the same space.
The model is built in three blocks. A 271M-parameter backbone (a transformer that reads a sequence of vectors and mixes them) does the thinking. A 167M-parameter vision encoder turns pictures into vectors. A 305M-parameter audio encoder does the same for sound. The encoders are modular: you can load only the backbone (271M, text only), add vision (439M), or add audio (577M).
It is small on purpose, and the paper still claims a new Pareto frontier: no other model it compares against is both smaller and better on its benchmarks for code, images, video, documents and audio. Chapter 7 lets you check that claim point by point.
Each chapter takes one part of the hero apart. By the end you could rebuild the pipeline, train it in the right order, and shrink it to fit a phone.
Chapter 1
Follow a mixed input of words, a picture and a sound through the model, and watch its shape at every step
Take one search request: the words “a dog like this one”, then a photo of a beagle, then three seconds of barking. Three modalities in one input. The model must return a single list of 768 numbers for all of it. How does a photo become something a transformer can read next to words?
The answer is that everything becomes the same kind of thing first: a row of vectors, each 512 numbers wide. Words, image patches and slices of sound all turn into rows of that one width. After that, the model does not care where a row came from.
Text is cut into tokens, the pieces a model counts: a common word, part of a rare word, or a punctuation mark. Each token has a number. The embedder E is a lookup table with one learned row of 512 numbers per token. A sentence of N tokens becomes N rows: a matrix of shape N × 512.
Before the text goes in, the model adds a task prefix, a short instruction that says what the embedding is for. For search, a query becomes “task: search result | query: a dog like this one” and a document becomes “title: none | text: …”. The paper uses seven such prefixes (Appendix A). Queries and documents get different prefixes because they play different roles.
A photo goes to the vision encoder, a vision transformer (ViT) inherited from Gemma 4. It cuts the picture into squares of 16 by 16 pixels, called patches, and turns each into a vector. Then it pools neighbouring patch vectors together until at most Nvis vectors remain. That cap is the vision token budget: 280 per image by default, and you can change it (Chapter 6).
The encoder’s vectors are 768 wide, not 512. A learned linear map, the vision adapter φvis, squeezes each to 512. The results are called soft tokens. A normal token is a number that picks a row from the table. A soft token is a row the encoder makes directly, with no number behind it, like a guest who takes a seat without a name card. Two delimiter tokens, <|SOI|> and <|EOI|> (start and end of image), wrap them so the backbone knows where the picture begins and ends.
Sound goes to the audio encoder: two downsampling convolution layers, then twelve conformer layers (transformer layers with a convolution inside, good at local patterns in time). It reads the sound as a Mel filterbank, a picture of which pitches are loud at each moment. Every 40 ms of audio becomes one soft token, so one second makes 25. Each is 1536 wide; the audio adapter φaud maps it to 512. <|SOA|> and <|EOA|> wrap the run.
A video is not a new modality inside the model. It is a list of images and audio slices. The model takes one frame per second. If there are more than Nfrm = 32 frames, it keeps either the first 32 or 32 evenly spaced ones. Each frame passes through the vision encoder like a photo, with a budget of 140 soft tokens per frame. If you include the soundtrack, each frame is followed by its next second of audio, and a text timestamp such as “00:07” sits before every frame and every audio slice.
Build a request below and watch how long the row of vectors gets.
Add segments in any order. The top bar is the sequence the backbone reads, one colour per modality. The funnel below shows the shape at each step, down to one unit vector.
Token counts follow Section 2.2: 280 soft tokens per photo and 140 per video frame plus 2 delimiters, 25 audio tokens per second plus 2 delimiters, 1 frame per second up to 32 frames. The text token counts (12 per text segment with its prefix, 4 per timestamp) are illustrative. Shapes are the paper’s: n = 24 layers, dM = 512, d = 768, L up to 8,192 in training.
Each segment becomes a block of 512-wide rows, and the blocks are simply placed end to end between <|BOS|> and <|EOS|>. One photo adds 282 rows. A 20-second video adds over 2,800. The paper trains with sequences of up to L = 8,192 rows, so a long video is where the length budget bites.
The backbone is a 24-layer transformer taken from a Gemma 4 decoder. A chat model uses causal attention: each token may look only at tokens before it, because it must predict what comes next. An embedding model has no next token to predict. So the paper switches the mask to bidirectional attention: every row can look at every other row. The word “this” can now see the photo that comes after it.
Out come L rows, still 512 wide. The model needs one vector, so it takes the plain average of all rows, called mean pooling. Then a linear layer f maps 512 numbers to 768. Last, it divides the vector by its length so the length is exactly 1. That step is ℓ2-normalisation, and its result is a unit vector, an arrow that ends on a sphere.
Why normalise? Because then comparing two embeddings is one cheap operation. The cosine similarity of two vectors is the cosine of the angle between them: 1 for the same direction, 0 for a right angle. For unit vectors, it equals the dot product: multiply matching entries and add them up.
a = (0.6, 0.8), b = (1, 0) → a·b = 0.6 × 1 + 0.8 × 0 = 0.60 = cos 53.1°
Both a and b have length 1 (0.36 + 0.64 = 1), so 0.60 is their cosine. A search over a million documents is then a million dot products, which hardware does very fast. A vector database stores the document vectors and finds the largest dot products for you, often with approximate nearest neighbour (ANN) search, which trades a little accuracy for a lot of speed.
One failure to know about. The symptom: a request with a long video retrieves worse than the same video cut short. The measurement: count the rows. Thirty-two frames at 140 tokens is already 4,544 rows before any audio, and the average in mean pooling spreads thin over all of them. The fix is in the budget knobs of Chapter 6: fewer frames or fewer tokens per frame.
Chapter 2
Turn “find the match in this batch” into a number the model can lower, and see which neighbours push hardest
Picture a class photo with 64 students and 64 name cards on a table. Your job is to hand each student the right card. You do not need to know what a “name” is in general. You only need to beat the other 63 cards. That is the whole idea of contrastive learning.
The model has never been told where “a dog barking” should go in its space. It is only told, again and again, which items belong together. Each training example is a pair: a query qi (a question, a caption, a spoken request) and its positive pi+ (the right answer). Many pairs go into one batch, B pairs at once.
For one query, line up every candidate in the batch and score each by cosine similarity. Turn the scores into probabilities with a softmax: raise e to the power of each score, then divide by the total. The loss is minus the log of the probability given to the right answer. If the positive gets almost all the probability, the loss is near 0. If it shares the probability evenly with 63 others, the loss is ln 64 ≈ 4.16.
Before the softmax, every score is divided by a temperature τ, a small number such as 0.05 (our example; the paper does not print its τ). Dividing by a small number stretches the gaps between scores. A gap of 0.2 in cosine becomes a gap of 4 in the exponent at τ = 0.05, a factor of e4 ≈ 55 in the softmax. So τ sets how strictly the test is marked.
EmbeddingGemma 2’s loss is a noise-contrastive estimation (NCE) loss. In plain words: it is the same softmax test, but the bottom of the fraction, the sum over all candidates, is split into four groups. Each group is a different source of wrong answers, called negatives.
The mask 1TN(i, j) is 0 when qi = qj or pi+ = pj+, and 1 otherwise (Equation 3). It does two jobs. It removes j = i, so the positive is not also counted as its own negative. And it removes false negatives: two pairs in a batch that share an answer. Without it, the model would be punished for putting a query near its own correct answer.
Why same-tower negatives? Queries are short questions and targets are long documents, or a spoken query and a photo. Left alone, the model can put all queries in one region and all targets in another, then match them across the gap. The paper adds the same-tower terms to stop queries and targets from clustering into separate subspaces. Pushing queries apart from each other forces them to spread through the same space the targets use.
Every point is a unit vector on a circle. Your query is teal. Drag any point with a mouse, or tap a point and then tap the circle to move it. The bar shows how the softmax shares its denominator.
Illustrative 2-D batch of 4 pairs (B = 4); pair 4’s positive is the same document as yours, a duplicate. The loss is Equation 2 for your query only, computed exactly from the angles: sim is the cosine of the angle between two points, and every exponent is divided by τ.
Take one query with four candidates: the positive at cosine 0.8, a hard negative at 0.6, and two in-batch negatives at 0.2 and 0.1. Set τ = 0.1, so each cosine is multiplied by 10 before the exponent.
e8 = 2,981.0 e6 = 403.4 e2 = 7.4 e1 = 2.7 → total 3,394.5
The positive’s share is 2,981.0 / 3,394.5 = 0.878, and the loss is −ln 0.878 = 0.130. Notice where the rest went: the hard negative holds 11.9% and the two easy negatives hold 0.3% together. The easy negatives barely matter. Almost all the pressure on the model comes from the one wrong answer that looks right.
Now set τ = 1. The four terms become e0.8 = 2.23, e0.6 = 1.82, e0.2 = 1.22 and e0.1 = 1.11. The positive’s share drops to 0.349 and the loss rises to 1.05. Same geometry, eight times the loss. That is why τ is a key setting.
The gradient of this loss has a clean form. For the query, it pulls toward the positive with strength (1 − the positive’s share). It pushes away from each negative with strength equal to that negative’s share. So the hard negative, holding 11.9% of the denominator, gets about 40 times the push of the two easy negatives together, which hold 0.3%. Hard negatives are where learning happens.
The paper’s previous model, EmbeddingGemma 1, went further and weighted hard examples up on purpose. EmbeddingGemma 2 drops that hardness weighting. The paper gives two reasons. First, the weighting amplifies noisy or weakly matched positive pairs, especially early in training. A wrong label that looks hard gets a big push in the wrong direction. Second, it worsens imbalances in gradient size between tasks of different modalities, so one modality can drown out another. The fix: remove the weighting and rely on the softmax alone.
Some training data comes as a ranked list: P positives in order, best first. The paper trains on these two ways. It extracts plain triplets for LC. It also uses a listwise loss based on the Plackett-Luce model, which treats a ranking as a series of picks: pick the best from all, then the best from the rest. Each rank-r positive is contrasted against all lower-ranked positives plus the usual negatives (Equation 4).
Finally, small squared-hinge penalties on the positive and hard-negative scores keep the raw cosine values in a steady range. That matters for tasks with a threshold, like “flag every pair above 0.7 as a duplicate”, where the absolute score is used, not just the ranking.
Chapter 3
Give each of the 24 layers its own fresh look at the input, and see why a giant lookup table for that job is worse than a small projection
Think of a long relay race with a note passed from runner to runner. Each runner adds to the note and passes it on. By the twentieth runner, the note is crowded with additions, and the original words are hard to read. What if every runner could also glance at the original note, written in a form tailored to that runner?
That is the job of per-layer embeddings (PLE). In a transformer, each layer reads a running sum called the residual stream, adds its own update, and passes the sum to the next layer. The input enters only at the bottom. PLE gives every layer a second, private input taken straight from the original tokens.
PLE came from Gemma 3n and is also in Gemma 4. There, each layer’s private input combines two sources. The first is a learned projection of the main token embedding. The second is a dedicated PLE lookup table: a separate table with a row for every token in the vocabulary and every layer.
That table is big, because its size is the vocabulary size times the number of layers times the row width. Because a lookup reads only the rows for the tokens in hand, a runtime can keep such a table outside accelerator memory (the small, fast memory beside a GPU or a phone’s neural chip) and fetch rows on demand. But it still costs memory somewhere.
For a multimodal model, the table has a deeper problem. An image patch or a slice of audio is a soft token. It has no token number, so it has no row in any table. The paper puts it plainly: a dedicated PLE lookup table provides no direct signal for non-text modalities and consumes additional memory.
EmbeddingGemma 2 keeps the per-layer inputs but removes the table. Every layer builds its private input from Tin, the same rows that enter the backbone. Since Tin already holds text tokens, image soft tokens and audio soft tokens side by side, every token gets a per-layer signal, whatever its modality. Here are the four steps for layer l.
The gate is the clever part. It is computed from H′l, so the layer decides, from what it currently knows, which features of the original input it wants again. Early layers might ask for spelling detail; late layers might ask for the broad topic. The projection pl is learned per layer, so each layer gets the input in a form tailored to it.
Top: an input of text, image and audio tokens. Each token’s per-layer signal comes from the projection lane, and, with a table, also from the table lane. Tap a token to see its gate math. Drag the layer and the vocabulary size.
The equations, n = 24 and dP = dM = 512 are the paper’s (Section 2.1). The 8 gate entries shown are illustrative numbers, and ul is drawn as identity. The projection count is our arithmetic: three 512 × 512 matrices per layer, 24 layers, no biases. The paper does not print its table size, so the table uses an illustrative vocabulary and a width of 256 per layer. Quality: Table 2, MMEB-v2 overall, 55.46 projection only vs 55.07 with lookup.
Take one token at one layer, with only four entries so the arithmetic fits. Its private view after RMSNorm is P = (1.0, −0.5, 0.8, 0.2). The layer’s gate input g(H′) is (2.0, −1.0, 0.0, 1.0). GELU(x) is x times the chance that a standard normal number is below x.
GELU(2.0, −1.0, 0.0, 1.0) = (1.954, −0.159, 0, 0.841)
Multiply entry by entry with P: (1.954 × 1.0, −0.159 × −0.5, 0 × 0.8, 0.841 × 0.2) = (1.954, 0.079, 0, 0.168). The third feature is shut off completely, because the gate there is 0. Treat u as the identity for the toy. The root mean square of the product is √((3.820 + 0.006 + 0 + 0.028) / 4) = 0.982, so U = (1.991, 0.081, 0, 0.171). That vector is added to the residual stream.
Count what this costs. Each layer has three 512 × 512 matrices: pl, gl and ul. That is 3 × 262,144 = 786,432 weights per layer, and 18.9 million over 24 layers. A table with a 256-wide row for each of 256,000 tokens and 24 layers would hold about 1.57 billion entries: more than twice the whole of EmbeddingGemma 2. The projections cost about a hundredth of that.
One might expect the table to help, since it gives each token extra private parameters. The paper tested it (Table 2, MMEB-v2). With the table: 55.07 overall. Projection only: 55.46. The simpler design wins on all three parts: images 54.67 vs 54.57, video 47.82 vs 47.13, visual documents 62.37 vs 61.76.
The paper also reports similar gains on text-only evaluations, where the table should help the most. Its reading: deriving every per-layer input from one shared 512-wide space improves multimodal representations. A single source of truth for all modalities beats a text-only side channel.
The failure mode, stated the paper’s way. The symptom: a multimodal model with a token table gives image and audio tokens a weaker per-layer signal than text tokens. The measurement: Table 2 shows the gap on video (+0.69) and visual documents (+0.61) when the table is removed. The fix: derive every per-layer input from Tin.
Chapter 4
Scrub through 2.9 trillion training tokens and watch the data widen from text to every modality while the goal shifts from copying a teacher to building its own space
A music student first copies a teacher’s recordings, note for note. Later, the student stops copying and plays to an audience. Copying gives a fast start. But the teacher’s style was built for the teacher’s hands, and at some point the student must find what works for their own.
EmbeddingGemma 2 learns the same way. Its teacher is Gemini Embedding 2, a much larger multimodal embedding model from Google. The training runs in stages, and two things change from stage to stage: which modalities are in the data, and which loss the model follows. The paper calls this a multi-stage curriculum with modality progression and objective progression.
The backbone starts as a pretrained Gemma 4 decoder. The paper switches its causal mask to a bidirectional one and skips any special stage to adapt to the new mask. Earlier work found such stages costly and unnecessary. It removes the PLE table (Chapter 3) and adds mean pooling, the projection f and normalisation.
The vision encoder starts as the smaller Gemma 4 vision encoder and keeps training in both multimodal stages. The audio encoder is bit-identical to the one in Gemma 4 E2B and E4B and stays frozen: its weights never change.
The distillation loss makes the student copy the teacher’s embeddings directly. For each input, take the teacher’s embedding, cut it to the student’s length (Gemini Embedding 2 supports shorter embeddings), and renormalise it. Call it ũ. The loss is the squared distance between student and teacher, averaged over the batch, for queries, positives and hard negatives alike.
The spread-out regularizer pushes embeddings to use the whole sphere. Pick two unrelated inputs. Their embeddings should look like two random points on the sphere, which are close to perpendicular. In d dimensions, the squared dot product of two random unit vectors averages 1/d. For d = 768 that is about 0.0013, a typical cosine of only about 0.04. So the loss is the average squared dot product over all pairs of different queries in the batch, plus the same for positives (Equation 5).
LS = mean over i ≠ j of (qi·qj)2 + mean over i ≠ j of (pi+·pj+)2
Why bother? Embedding models are known to crowd into a narrow cone, where every pair has a high cosine and the space is wasted. A spread-out space is called isotropic. The paper gives three payoffs: scores become easier to read as absolute values, the model is more robust to quantization, and vector databases search it faster with approximate nearest neighbour methods.
Drag the playhead through the run. The bar is to scale in tokens. Below it: the modalities in the data, the losses in force, and six embeddings on a circle, with the teacher’s as hollow rings. Then try the two ablations.
Token counts, stages, losses, encoder settings and merging are the paper’s (Section 2.4). Loss bars are drawn from the paper’s words (“almost exclusively distillation”, “exclusively distillation”, “completely replace distillation”); it prints no numeric weights. The six points are illustrative. Ablation scores (MMEB-v2 overall) are from Table 3 (52.27, 52.28, 55.46) and Table 4 (48.18 frozen), measured on an intermediate recipe.
The first stage uses text only: a large, loosely labelled mix of query and target pairs from question answering, sentence similarity, code retrieval and web search, in many languages. The loss is almost all distillation, plus a contrastive term with a small weight. The batch is large, which both steadies the gradient and gives each query more in-batch negatives.
The paper found this text-only stage important for final text quality. It also acts as a warm-up for the new bidirectional attention: the model learns to read in both directions on easy data before images arrive.
The second stage widens the data to images, audio, video and documents, in unimodal, cross-modal and mixed-modal tasks, most with hard negatives. The loss is distillation only. The goal is to inherit the teacher’s skill at mapping very different inputs into one shared space. Batches and learning rates are larger, and the stage runs for twice as many steps as stage 1.
The third stage drops distillation completely. The model now trains with the contrastive loss of Chapter 2, the spread-out regularizer and Matryoshka losses (Chapter 5). Learning rates and batches shrink. The data shifts to higher-quality, task-specific sets: tool retrieval, audio captioning, video ranking, medical imaging, product search, cropped-object retrieval and academic question answering.
Why stop copying? The paper’s reason: the teacher’s space was not built for the student’s architecture, its size or its Matryoshka sub-dimensions. Table 3 checks this with a fair test. From the stage 2 checkpoint (52.27 on MMEB-v2), one run keeps distilling for about the same compute and reaches 52.28. Another switches to the finetuning recipe and reaches 55.46. Distillation has plateaued; the switch adds 3.2 points, mostly on images (+4.6) and video (+4.6).
Model merging averages the weights of two checkpoints. The paper takes an unweighted average of the final finetuning checkpoint and a much earlier one from the same run. This helps on tasks that overfit during finetuning and still improves tasks that gained from it.
Last comes a short quantization-aware training (QAT) stage, a tail patch after merging. Chapter 6 covers it. The quantized student starts from the frozen float checkpoint and is distilled from it.
One more ablation, Table 4: freeze the vision encoder through stage 2 and MMEB-v2 falls from 52.27 to 48.18, a 4.1-point loss, with images down 5.75 points. Many multimodal models keep their encoders frozen; here, training it clearly pays. The paper adds that similar gains are likely from training the audio encoder too, which it kept frozen.
Chapter 5
Cut the 768-number vector down to 512, 256 or 128 numbers, and measure how much search quality each cut costs
You run a photo app with 100 million images. Each embedding is 768 numbers, stored as 4-byte floats: 3,072 bytes per image, 307 GB in all. That index will not fit in one machine’s memory, let alone a phone’s. Could you keep only the first 128 numbers of each vector and still search well?
For an ordinary embedding, no. Training spreads the meaning across all 768 numbers, with no reason to favour the first ones. Keep 128 and you throw away five-sixths of the numbers, and whatever meaning they held.
Matryoshka Representation Learning (MRL) fixes this by changing the training, not the model. Like a Russian nesting doll, the vector holds smaller complete vectors inside it. The first 128 numbers must work as an embedding on their own, and so must the first 256, the first 512 and all 768.
To get there, each loss is applied several times: once to the full vector and once to each prefix, after renormalising the prefix to length 1. The paper splits each of its losses into separate losses on these overlapping sub-dimensions. The total pushes the most important information into the front of the vector, because the front is graded at every size.
Why does the front end up holding the important part? Count how often each number is graded. The first 128 numbers appear in all four losses. Numbers 129 to 256 appear in three, numbers 257 to 512 in two, and the last 256 in only one. So the training signal pulls hardest on the front, and the broad meaning settles there. The back is left to carry fine detail.
The cost of this is small. The model itself does not change: it still outputs 768 numbers. Training only computes each loss four times on slices of the same vectors, which adds a few extra dot products per batch, not extra layers.
Take a 4-number toy embedding E = (0.8, 0.4, 0.4, 0.2). Its length is √(0.64 + 0.16 + 0.16 + 0.04) = 1. Keep the first 2 numbers: (0.8, 0.4), with length √0.80 = 0.894. Divide by it: (0.894, 0.447). That is the truncated embedding.
Now a document D = (0.6, 0.6, −0.2, 0.49), also length 1. The full cosine is 0.48 + 0.24 − 0.08 + 0.098 = 0.738. Truncated, D becomes (0.707, 0.707), and the cosine is 0.894 × 0.707 + 0.447 × 0.707 = 0.948. The score changed. What MRL protects is the order: the right document should still rank above the wrong ones after the cut.
Top: the 768 numbers, with the part you keep lit. Bars: each benchmark’s score at this size as a share of its full-size score. Pick a size and an index size.
Scores are the paper’s, at 768 / 512 / 256 / 128: MTEB(Code) 78.7 / 77.2 / 76.2 / 71.4 (Table 7); MMEB-v2 59.0 / 58.4 / 56.2 / 45.6 (Table 8); MIEB(lite) Mean(Type) 65.7 / 65.3 / 64.2 / 60.0 (Table 9); MAEB 49.9 / 49.8 / 49.1 / 47.3 (Table 10); MSEB 69.54 / 69.18 / 66.76 / 56.71 (Table 11); MTEB(Multilingual) 61.4 / 61.2 / 60.4 / 57.9 (Table 13); MTEB(English) 68.5 / 68.4 / 67.8 / 65.7 (Table 14). Memory is our arithmetic at 4 bytes per number.
For text, code and audio, the cut down to 256 is nearly free. MTEB(English) keeps 99.0% of its score at 256 (67.8 of 68.5). MAEB keeps 98.4%. Code keeps 96.8%, and the paper notes that all three text benchmarks degrade minimally, especially down to 256.
Vision is more sensitive, and documents most of all. On MMEB-v2, the visual document group falls from 67.8 at 768 to 62.6 at 256 and 49.5 at 128. Reading a slide or a PDF needs fine detail, and fine detail is what lives in the back of the vector. Speech retrieval behaves the same way: 69.54 at 768, 66.76 at 256, then a cliff to 56.71 at 128.
Yet the small sizes still compete. On MIEB(lite), the 128-number embedding (60.0 Mean(Type)) beats every other model under 1B parameters at full size; the next best is 53.5. On speech, the 256-number native-audio embedding (66.76) beats the full 768-number embedding built from a transcript (57.59).
The failure to watch for. The symptom: after cutting to 128, document search returns the right topic but the wrong page. The measurement: check the VisDoc scores, or your own recall on held-out queries, at each size before you commit. The fix: keep 256 or more for document and speech collections, and use 128 where items differ by topic rather than by detail.
A common setup uses both. Search the whole index with short 128-number vectors to get a few hundred candidates fast. Then rescore just those candidates with the full 768 numbers. MRL makes this two-step search possible from one embedding call, because the short vector is a prefix of the long one.
Chapter 6
Turn three dials, vision tokens, weight bits and loaded encoders, and see what each one saves and what it costs
A phone app wants to search your camera roll offline. It has a few hundred megabytes of memory to spare, a small battery and a user who will not wait. A server that indexes a billion product photos has the opposite problem: memory is there, but every millisecond per item adds up to days. One model has to serve both.
EmbeddingGemma 2 gives four dials for this. Chapter 5 covered the first, the embedding size. This chapter covers the other three: how many tokens each image gets, how many bits each weight gets, and which encoders are loaded at all.
Recall from Chapter 1 that the vision encoder pools each image down to at most Nvis soft tokens. The Gemma 4 encoder supports budgets of 70, 140, 280, 560 or 1,120 tokens. EmbeddingGemma 2 trains with 280 per image and 140 per video frame, but you can pick any of the five at inference time.
Fewer tokens means a coarser picture: each token averages a bigger patch of the image. It also means a shorter sequence, and attention cost grows with the square of the sequence length. A 32-frame video at 140 tokens per frame is 4,544 rows; at 560 it is 17,984, about 16 times the attention work.
Left: a toy slide as the encoder would see it, one cell per soft token. Right: the paper’s MMEB-v2 scores at each budget. Drag the budget.
Scores: Table 5 (top), an intermediate checkpoint trained at 280 per image and 140 per frame, one budget for all tasks at evaluation; the paper reports no score at 1,120. The slide is illustrative. Sequence lengths use (budget + 2) rows per frame for a 32-frame video; relative attention work is our arithmetic, the square of the length against 140 tokens per frame.
The paper’s Table 5 shows three different behaviours. Visual documents care most: 51.61 at 70 tokens, 63.60 at 140, then 67.62 at 560, still climbing past the training budget. Small text on a slide needs many tokens. Images in general saturate near 280: 55.15 at 280, 55.21 at 560.
Video goes the other way past 280: 48.51 at 280, then 46.52 at 560. The paper’s explanation is the failure mode from Chapter 1. Very long sequences dilute attention and the mean pool, so each frame’s signal gets averaged into mush.
Can training at a small budget make a small budget work better? The paper tested video at 70 versus 140 tokens per frame (Table 5, bottom). At a 70-token evaluation, training at 70 helps video (46.60 vs 45.79) but hurts images and documents. At a 140-token evaluation, training at 70 is worse everywhere: 54.66 overall against 55.46. Coarse frames throw away spatial detail that would have helped every visual task. So the default stays at 140 per frame.
In the paper’s float checkpoint, every weight is a bfloat16 number: a 16-bit float that keeps the range of a normal 32-bit float but only 2 to 3 significant digits. That is 2 bytes per weight. The 271M-parameter backbone alone is 542 MB that way. Quantization stores each weight with fewer bits. With 4 bits (int4), a weight can take only 16 values, from −8 to 7, times a scale s shared by a group of weights. The formula below is one simple scheme, for illustration; the paper does not print its exact rounding rule.
q = clip(round(w / s), −8, 7), ŵ = q × s, s = max|w| / 7 (over the group)
Worked through: a group with largest weight 0.70 gets s = 0.10. The weight 0.234 becomes round(2.34) = 2, which reads back as 0.20, an error of 0.034. The question is how to group. Per-channel (the paper’s Q4_C) gives each output channel, one row of the matrix, its own scale. Per-block (Q4_0) gives each short block of consecutive weights its own scale. One large weight then spoils only its block, not its whole row.
Rounding still hurts a model trained in full precision. Quantization-aware training (QAT) fixes this by training with the rounding in the loop, so the weights settle where rounding does little harm. The paper runs QAT as a separate tail patch after merging: the int4 model starts from the frozen float model and is distilled from it. This is cheaper than QAT inside finetuning and narrows the quality gap, notably on MTEB(English).
A toy 8 × 32 weight matrix, with one large weight in row 3. Top: the weights. Bottom: the rounding error. Drag the bits and switch the grouping.
The matrix and its errors are illustrative; the block size of 8 is ours, since the paper does not state Q4_0’s. Backbone size is our arithmetic (271M weights × bits, scales not counted). Scores are Table 1 (bfloat16 / Q4_0 / Q4_C): MTEB(Multilingual) 61.36 / 60.96 / 60.84, MTEB(English) 68.46 / 68.48 / 68.49, MTEB(Code) 78.68 / 76.85 / 76.70, MIEB(lite) 60.17 / 56.59 / 56.71, MSEB 69.54 / 64.99 / 63.92. The paper ran MIEB and MSEB on different harnesses for float and quantized. It reports no 2, 3 or 8-bit backbone.
Table 1 shows that 4-bit weights cost little on text. MTEB(English) is unchanged (68.46 in bfloat16, 68.49 with Q4_C), and multilingual drops 0.4 to 0.5 points. Code drops about 1.9. The multimodal benchmarks drop more, 3.5 points on MIEB(lite) and 4.5 to 5.6 on MSEB, though the paper flags that those float and quantized runs used different evaluation harnesses.
The encoders follow Gemma 4’s own schemes. The vision encoder uses 8-bit weights and 8-bit activations (W8A8) and also gets QAT. The audio encoder, taken unchanged from Gemma 4, uses 8-bit activations and 2, 4 or 8-bit weights depending on the layer cluster.
Because the encoders only feed soft tokens into the backbone, they are separate parts. A notes app that searches text needs neither. A photo app needs vision but not audio. The paper names three smaller sizes besides the full 744M: 271M parameters for text, 439M with vision and 577M with audio.
The backbone is always loaded. Toggle the two encoders and read the parameters, the measured phone memory and the inputs you can embed.
Parameters are the paper’s (Section 1): backbone 271M, vision encoder 167M, audio encoder 305M; configurations of 271M, 439M, 577M and 744M are the paper’s totals (each a little above the plain sum of its parts). Peak memory is measured on a Google Pixel 11 Pro with Q4_C weights, including runtime compilation overhead (Section 2.4): 191 MB text only, 447 MB text and vision, 567 MB for the full model. The paper gives no figure for text and audio without vision. bfloat16 sizes are our arithmetic.
The measured numbers are what make the claim real. On a Google Pixel 11 Pro with Q4_C weights, peak memory during inference is 191 MB for text only, 447 MB with vision and 567 MB for the full model. That includes the runtime’s own overhead, not just the weights.
The failure to avoid. The symptom: an app ships the full model to search typed notes and runs out of memory on older phones. The measurement: profile peak memory per configuration, as the paper did. The fix: load the 271M text configuration for text-only features, and add encoders only on screens that need them.
Chapter 7
Plot every model the paper compares by size and score, find the ones nobody beats on both, and check where EmbeddingGemma 2 lands
You are buying a used car and care about two things: price and range. One car costs more and goes less far than another; nobody should buy it. Throw out every car that some other car beats on both counts. The cars left over form the Pareto frontier: for each, you cannot get more range without paying more.
Embedding models trade size for quality the same way. A small model is cheap to run; a large one usually scores higher. The paper’s headline claim is that EmbeddingGemma 2 sets a new frontier: on its benchmarks, no compared model is both smaller and better. A claim like that is easy to check once the points are on a chart.
The rules matter as much as the scores. The baselines are the top-ranked models on each public leaderboard: specialists for one modality, and general models that cover every modality tested. For MTEB, MAEB and MIEB(lite), the paper compares models under 1B parameters; for MMEB-v2, under 2B, because small multimodal models are rare.
Three more rules. Only single-vector models count, since models that store many vectors per item cost far more to store and search. Models trained on more than 25% of the evaluation data are left out, because that data leaks the answers. And EmbeddingGemma 2 counts only the parameters it uses: 271M on text benchmarks, 439M on vision, 577M on audio.
Table 6 sets the summary against a slightly larger multimodal peer, jina-embed-v5-omni-nano at 986M parameters, and against specialists such as SigLIP for images and CLAP for audio. It also includes EmbeddingGemma 1, the 308M text-only predecessor. EmbeddingGemma 2 uses fewer parameters for text than that predecessor (271M against 308M), yet improves on multilingual text and on code.
MTEB (Massive Text Embedding Benchmark) holds 162 tasks over 250+ languages, 14+ programming languages and 10 task types, from retrieval to clustering. MMEB-v2 spans 78 tasks over images, video and visual documents such as PDFs, slides and charts. MIEB(lite) adds image tasks like linear-probe classification, compositionality and visual text similarity.
MAEB holds 30 audio tasks across speech, music, environmental sound, bioacoustics and emotion. MSEB(Retrieval), from Chapter 0, finds text passages from spoken queries in 26 languages and locales. Scores are averages over tasks, Mean(Task), or over task types, Mean(Type), which stops a type with many tasks from dominating.
Each dot is a model from the paper’s tables, placed by parameters on a log scale (equal steps to the right multiply the size) and by score. The green steps are the frontier. Pick a benchmark, tap a dot to name it, and show the truncated sizes.
Every point is a row of the paper’s leaderboard tables: MTEB(Code) Mean(Task), Table 7; MTEB(Multilingual, v2) Mean(Task), Table 13; MMEB-v2 Mean(Task), Table 8 (models under 2B); MIEB(lite) Mean(Type), Table 9; MAEB Mean(Task), Table 10. The frontier is computed here over the plotted points only. Figure 2 of the paper also plots larger models whose numbers it does not print, so they are left out.
Code is the cleanest win. At 271M parameters, EmbeddingGemma 2 scores 78.7 on MTEB(Code). The next best under 1B, pplx-embed-v1-0.6b, scores 75.8 with 596M. The paper adds that it beats every model under 4B on that leaderboard and comes within 2 points of a frontrunner 28 times larger. Its predecessor, EmbeddingGemma 1, scored 68.8.
Multilingual text is the honest exception. EmbeddingGemma 2 scores 61.4, slightly above EmbeddingGemma 1 (61.1), but harrier-oss-v1-270m (268M) scores 66.5 and jina-embed-v5-text-nano (212M) scores 65.5. Both are smaller, so on this panel EmbeddingGemma 2 is not on the frontier. The paper notes they are text specialists, while EmbeddingGemma 2 shares its space with images and audio. On English it regresses slightly against its predecessor, 68.46 against 69.67.
MMEB-v2: EmbeddingGemma 2 is the smallest model on the leaderboard, at 439M, and scores 59.0. Only models near 2B beat it, such as Eddy-vl at 1.93B with 63.2. jina-embed-v5-omni-nano, a 986M model that also covers every modality, scores 43.6.
MIEB(lite) is the widest margin: 65.7 Mean(Type) against 53.5 for the best other model under 1B, SigLIP so400m at 878M. That is +12.2 on type and +7.9 on task. The gains are largest on multilingual visual text similarity (+22.8) and multilingual retrieval (+12.5).
MAEB is close: 49.9 against 50.1 for jina-embed-v5-omni-nano, which has 986M parameters. EmbeddingGemma 2, at 577M, is on the frontier because it is smaller. It leads all sub-1B models on any-to-any retrieval (53.6) and audio classification (52.9).
Audio specialists such as CLAP still win at audio captioning tasks. And on clustering speakers by gender with no training, EmbeddingGemma 2 scores just 0.40. Yet a linear probe (a small classifier trained on top of the frozen embeddings) recovers gender at 66.40. So the information is in the vector, just not in its main directions.
The paper reads this as a design property: the speech embeddings are dominated by meaning, not by who is speaking. That avoids sorting results by a speaker’s demographics while keeping the acoustic facts available when a task needs them.
And the teacher is still ahead. Gemini Embedding 2 scores 73.99 on MSEB natively, against EmbeddingGemma 2’s 69.54. The paper’s claim is efficiency at a size, not a win over its teacher.
Chapter 8
Run the whole retrieval loop with every knob at once: compose a query, choose what to search, cut the vector and unload encoders
Back to the phone from Chapter 0, and the clip of the dog barking at the doorbell. Now we have every piece. Let us run the whole search, the way an app would, and turn every dial the paper gives us while it runs.
A search system has two phases. The indexing phase runs once per item, ahead of time. The query phase runs each time someone searches. EmbeddingGemma 2 sits in both, but it is called with different prefixes in each.
For tasks with no query and document roles, such as clustering or measuring similarity, both sides use the same prefix, for example “task: clustering | query: …”. Appendix A of the paper lists all seven.
This is the hero’s map again, with every knob from the chapters wired in. Each item now carries a longer toy vector: three numbers for its place on the map and four for fine detail, such as “two barks then a doorbell” versus just “a dog barking”. Cutting the vector removes the fine detail first, like Matryoshka truncation does.
Pick a query, including two mixed ones. Choose which kinds of item to search, cut the vector, and unload an encoder. The list shows the top 5 with cosine scores.
Illustrative throughout: 22 hand-made items with 7-number toy vectors (map place lifted onto a sphere, plus 4 detail numbers). The four sizes map to 7, 6, 5 and 3 toy numbers. Mixed queries are placed by hand where a joint reading would land; the real model reads both parts in one sequence. Parameter counts and phone memory are the paper’s (Sections 1 and 2.4).
Try the mixed queries first. “Beagle photo plus howling in a storm” lands between the dog corner and the storm corner, right on “a dog howling in a storm”. A two-tower model like CLIP could embed the photo or the words, but not their combination as one query. A unified backbone reads them together.
Now cut the vector to 128. The map position survives, so results stay on topic, but the detail numbers are gone. Items that differ only in detail start to tie, and the order inside the top 5 shifts. That is the toy version of the VisDoc drop in Chapter 5.
Last, unload the audio encoder. Every audio item disappears from the index, and the bark query can no longer be embedded at all. The memory falls from 567 MB to 447 MB on the paper’s phone. That is the trade a product makes when it chooses its configuration.
Follow one search over a million photos. Indexing produces a matrix E of shape 1,000,000 × 768. At 4 bytes per number, that is 3.07 GB; cut to 256 numbers and renormalised, it is 1.02 GB. The query becomes one vector of shape 256. Scoring is one matrix-vector product, (1,000,000 × 256) · (256), which gives 1,000,000 scores. That is 256 million multiply-adds, a fraction of a second on a laptop.
The response is just a short list of item numbers and scores, such as [(48213, 0.83), (90117, 0.81), …]. The app then looks up each item number to show the photo. Nothing about the photo itself travels through the search step, only its vector.
For a two-step search, score all items with the 128-number prefix and keep the best 500. Then rescore those 500 with the full 768 numbers. The second step costs 500 × 768 = 384,000 multiply-adds, almost nothing. MRL is what makes the cheap first pass trustworthy.
One failure to watch for. The symptom: search returns passages that look like the question, other questions for example, instead of passages that answer it. The measurement: print the strings sent to the model and check the prefixes. The fix: queries get “task: search result | query:” and documents get “title: … | text:”, exactly as in Appendix A.
Here is the whole loop as a short Python sketch. The function embed stands for a call to the model; it is not the official API, which lives on the model page linked in the Field Guide.
python import numpy as np def unit(v): # l2-normalise rows return v / np.linalg.norm(v, axis=-1, keepdims=True) def index(items, dim=768): # items: list of segment lists, e.g. [("text", "title: none | text: ...")] # or [("image", jpeg_bytes)] or [("audio", wav_16k)] E = np.stack([embed(segs) for segs in items]) # (N, 768), unit length return unit(E[:, :dim]) # Matryoshka cut + renormalise def search(query_segs, E, k=5): dim = E.shape[1] q = unit(embed(query_segs)[:dim]) # (dim,) scores = E @ q # (N,) cosine similarities top = np.argsort(-scores)[:k] return [(int(i), float(scores[i])) for i in top] # a mixed-modal query: one call, one vector hits = search([("text", "task: search result | query: a dog like this one"), ("image", beagle_jpeg)], E_256)
Two things in this code carry the paper’s design. The cut E[:, :dim] works only because of Matryoshka training. And the query list can hold any mix of segments, because the backbone reads them all as one sequence.
Chapter 9
Keep the numbers, the terms, a checklist and the core code in one place, and see where to go next
EmbeddingGemma 2 maps text, images, audio, video and their mixes into one 768-number space with one 744M-parameter model. Encoders turn pictures and sound into soft tokens; a 24-layer bidirectional backbone with simplified per-layer embeddings reads everything as one sequence; mean pooling, a projection and normalisation make the vector. Training copies Gemini Embedding 2 on text, then on all modalities, then switches to contrastive, spread-out and Matryoshka losses, and merges checkpoints. Four dials (vector size, vision tokens, weight bits and loaded encoders) fit it to anything from a server to a phone at 191 MB.
| What | Value | Where |
|---|---|---|
| Parameters | 271M backbone, 167M vision encoder, 305M audio encoder; 744M in all | Section 1 |
| Configurations | 271M text, 439M text and vision, 577M text and audio, 744M full | Section 1 |
| Backbone shape | n = 24 layers, dM = 512, output d = 768, dP = 512 | Section 2.1 |
| Encoder widths | vision dV = 768 (ViT, patch 16), audio dA = 1536 (2 conv + 12 conformer layers) | Section 2.1 |
| Tokens per input | 280 per image, 140 per video frame (70 to 1,120 at inference), 25 per audio second, 1 frame per second up to 32 | Section 2.2 |
| Training length | sequences up to 8,192; about 2.9T tokens: 300B text, 2T multimodal, 600B finetuning | Sections 2.2, 2.4 |
| Matryoshka sizes | 768, 512, 256, 128 | Section 2.3 |
| PLE ablation | MMEB-v2 55.46 projection only vs 55.07 with lookup table | Table 2 |
| Finetuning ablation | 52.27 start; 52.28 more distillation; 55.46 contrastive finetuning | Table 3 |
| Vision encoder ablation | 52.27 trained vs 48.18 frozen | Table 4 |
| Headline scores | MTEB(Code) 78.68, MTEB(Multilingual) 61.36, MTEB(English) 68.46, MMEB-v2 59.01, MIEB(lite) 65.67 Mean(Type), MAEB 49.87, MSEB 69.54 | Table 6 |
| Native audio vs ASR | MSEB 69.54 native vs 57.59 through ASR | Table 11 |
| Phone memory (Q4_C) | 191 MB text, 447 MB text and vision, 567 MB full, peak on a Pixel 11 Pro | Section 2.4 |
| Term | Meaning |
|---|---|
| Embedding | A fixed-length vector for one input; similar inputs get nearby vectors. |
| Soft token | A row made by an encoder, not looked up in a table; it sits in the sequence like a token. |
| Bidirectional attention | Every position may attend to every other, before and after it. |
| Mean pooling | The average of all output rows, giving one vector. |
| Per-layer embeddings | A gated, private view of the input added at every layer; here built by projection only. |
| Contrastive loss | Minus the log of the positive’s share in a softmax over the positive and the negatives. |
| Same-tower negatives | Other queries for a query, other targets for a target; they stop the two sides drifting apart. |
| Spread-out regularizer | Pushes the squared dot product of unrelated pairs toward that of random points. |
| Embedding distillation | Squared distance from the student’s embedding to the teacher’s truncated one. |
| Matryoshka (MRL) | Training every prefix of the vector to work as an embedding. |
| QAT | Training with weight rounding in the loop so a low-bit model loses little. |
| Pareto frontier | The models that no other model beats on both size and score. |
A compact sketch of the forward pass and the finetuning losses, written from the paper’s equations. It is for reading, not for running at scale: the backbone, encoders and adapters stand for the real modules.
python import torch, torch.nn.functional as F def ple(H_prime, T_in, p, g, u, norm_p, norm_u): P = norm_p(p(T_in)) # (L, 512) private view of the input G = F.gelu(g(H_prime)) # (L, 512) gate from what the layer knows return H_prime + norm_u(u(G * P)) # (L, 512) H_l = H'_l + U_l def embed(T_in, layers, f): # T_in: (L, 512), all modalities interleaved H = T_in for layer in layers: # 24 layers, bidirectional (no causal mask) H = ple(layer.block(H), T_in, *layer.ple_parts) e = f(H.mean(dim=0)) # mean pool (512,) then project to (768,) return F.normalize(e, dim=-1) def contrastive(q, p, hn, same_q, same_p, tau=0.05): # q, p: (B, d) unit; hn: (B, d) one hard negative each # same_q[i, j] / same_p[i, j]: True when queries / positives i and j are duplicates mask = ~(same_q | same_p) # 1_TN(i, j), also removes j = i zP = (q * p).sum(-1) / tau # (B,) zHN = (q * hn).sum(-1) / tau zIB = (q @ p.T) / tau # (B, B) in-batch zQQ, zPP = (q @ q.T) / tau, (p @ p.T) / tau # same-tower neg = torch.cat([zHN[:, None], zIB.masked_fill(~mask, -1e9), zQQ.masked_fill(~mask, -1e9), zPP.masked_fill(~mask, -1e9)], dim=1) logits = torch.cat([zP[:, None], neg], dim=1) return -F.log_softmax(logits, dim=1)[:, 0].mean() def spread_out(x): # mean of (x_i . x_j)^2 over i != j B = x.shape[0]; S = (x @ x.T) ** 2 return (S.sum() - S.diagonal().sum()) / (B * (B - 1)) def finetune_loss(q, p, hn, same_q, same_p, w_s=1.0): total = 0 for m in (768, 512, 256, 128): # Matryoshka: every prefix is graded cut = lambda x: F.normalize(x[:, :m], dim=-1) qm, pm, hm = cut(q), cut(p), cut(hn) total += contrastive(qm, pm, hm, same_q, same_p) total += w_s * (spread_out(qm) + spread_out(pm)) return total
The temperature 0.05 and the weight w_s are placeholders: the paper does not print its values. Everything else follows Equations 1 to 5 and Section 2.1.
Two-tower models such as CLIP, ALIGN and SigLIP made cross-modal search work, one modality per tower. Then MLLM-based embedders such as E5-V, VLM2Vec, MM-Embed and GME made mixed inputs work, at billions of parameters. Omni-modal ones added audio and video. EmbeddingGemma 2 brings that full scope under 1B parameters, with a text path (271M) smaller than its text-only predecessor EmbeddingGemma 1 (308M). It does so by building on Gemma 4 and learning from Gemini Embedding 2.
The paper’s own next steps: longer context to index whole films and recordings, encoder-free designs to cut memory and latency further, training an embedder end to end inside a RAG system, and better benchmarks for interleaved, all-to-all search. It also points out that the model is a general multimodal encoder, a starting point for routers, rerankers, reward models and more.
This lesson re-teaches EmbeddingGemma 2: Unified and Efficient Multimodal Representations (arXiv 2610.37364, 27 October 2026) by Henrique Schechter Vera and Sahil Dua (co-first authors), Jovan Andonov, Sara Smoot, Sebastian Russo and the EmbeddingGemma Team at Google DeepMind, with leadership from Tris Warkentin, Armand Joulin, Tom Duerig and Mojtaba Seyedhosseini. The model is released at ai.google.dev/gemma/docs/embeddinggemma. All numbers here come from the paper; every device marks what is illustrative.
Now teach it back. Open Teach and draw the input pipeline and the contrastive denominator on the whiteboard from memory, or flip through the Sparks deck. Then go back to the map at the top and drop a query: you can now name every part of what happens when the lines light up.