brazembed-pt-br-retrieval

brazembed-pt-br-retrieval is the retrieval and reranking expert of BrazEmbed-PT-BR: a sentence-embedding model based on BERTimbau (the Brazilian BERT, 110M parameters, pretrained by NeuralMind on brWaC), specialised for semantic search, RAG retrieval, reranking.

  • 768-dimensional embeddings, mean pooling, max 128 tokens, no instruction prefix. License: MIT.
  • For one general-purpose model, use tardellirs/brazembed-pt-br (the merge of the four experts; MTEB-BR 57.5, on the benchmark's Pareto frontier).

Usage

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("tardellirs/brazembed-pt-br-retrieval")
emb = model.encode(["O Brasil é um país tropical da América do Sul."], normalize_embeddings=True)

Or route each task type to its expert with route.py:

Expert Use for
brazembed-pt-br-clfclu classification, clustering
brazembed-pt-br-pairclf pair classification / NLI
brazembed-pt-br-sts semantic similarity
brazembed-pt-br-retrieval retrieval, reranking

How it was trained

  1. Stage 1: BERTimbau was fully fine-tuned with symmetric in-batch InfoNCE on 3,633 Gemini-generated Portuguese query–passage pairs (medical, legal, encyclopedic and web domains), turning the masked language model into an embedding model. All four experts start from this same Stage-1 encoder.
  2. This expert: A uniform weight-soup of three LoRA adapters (r=16) trained with InfoNCE plus mined hard negatives on mMARCO-pt (400k pairs), SQuAD-pt_BR (78k), Ulysses-RFCorpus (4.2k, oversampled) and 5,851 synthetic legal QA pairs (federal-law passages with Gemini-generated queries). mMARCO-pt was checked against the Quati judged pool (0 of 8.8M passages overlap) and SQuAD-pt_BR/Ulysses against FaQuAD, JurisTCU, BRTaxQA and Quati (0 overlap).

The LoRA weights are merged into the full model, so it loads as a plain SentenceTransformer. Training ran on single A10G GPUs in June 2026.

Evaluation

On the 16-task development version of the MTEB-BR benchmark, used while building the models: Retrieval 0.515 · Reranking 0.601 (category averages). Development iterated against that benchmark without a held-out split, so these numbers carry some selection optimism. The current MTEB-BR (por, v1) leaderboard (21 tasks) evaluates the merged single model, brazembed-pt-br.

Citation

@article{stekel2026mtebbr,
  title   = {MTEB-BR: A Text Embedding Benchmark for Brazilian Portuguese},
  author  = {Stekel, Tardelli Ronan Coelho},
  journal = {arXiv preprint arXiv:2607.04581},
  year    = {2026}
}
Downloads last month
132
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for tardellirs/brazembed-pt-br-retrieval

Finetuned
(260)
this model

Collection including tardellirs/brazembed-pt-br-retrieval

Paper for tardellirs/brazembed-pt-br-retrieval