Views
No views yet
google/embeddinggemma-300m.
It keeps the 64k most frequent Portuguese tokens and drops the rest of the multilingual
vocabulary — shrinking the model from ~308M to ~157M parameters (≈ half) while keeping
98.8% of the full model's MTEB(por) score. No training was involved — only the token
embedding matrix was sliced; the transformer encoder and the pooling/Dense heads are identical
to the base model.| model | params | MTEB(por) mean_16 | % of full |
|---|---|---|---|
| google/embeddinggemma-300m | ~308M | 0.7257 | 100% |
| embeddinggemma-pt-br-128k | ~207M | 0.7192 | 99.1% |
| embeddinggemma-pt-br (64k, this) | ~157M | 0.7172 | 98.8% |
| embeddinggemma-pt-br-48k | ~144M | 0.7098 | 97.8% |
| embeddinggemma-pt-br-32k | ~131M | 0.6881 | 94.8% |
| embeddinggemma-pt-br-24k | ~125M | 0.6895 | 95.0% |
| embeddinggemma-pt-br-16k | ~119M | 0.6520 | 89.8% |
mean_16 = the 16 headline MTEB(por) tasks (classification, pair-classification, STS, clustering,
retrieval, reranking). Full curve + charts in the
tool's results.1from sentence_transformers import SentenceTransformer
2
3model = SentenceTransformer("tardellirs/embeddinggemma-pt-br")
4emb = model.encode(
5 ["O Brasil é um país tropical da América do Sul.",
6 "Operações matemáticas envolvem soma e multiplicação."],
7 normalize_embeddings=True,
8)
9print(emb.shape) # (2, 768)task: search result | query: for queries and
title: none | text: for documents. Supports Matryoshka output dims (768/512/256/128) via the base
model's Dense heads.A B → AB only if A, B and AB all survive) → slice embed_tokens.weight
→ reattach the original encoder + pooling/Dense. Reproduce:1python trim_vocab.py --model google/embeddinggemma-300m --corpus-config por \
2 --vocab-size 64000 --output ./embeddinggemma-pt-br