/ Модель

Характеристики

Контекст
512 токенов
Параметры
136 млн
Лицензия
MIT
Архитектура
bert · dense
Базовая модель
bert-base-portuguese-cased
Библиотека
sentence-transformers
Опубликована
5 июн 2026

brazembed-pt-br

ЭмбеддингиТекст → embedding9 профессий

Дообученная модель на базе BERTimbau для создания эмбеддингов и сравнения семантической близости текстов на бразильском португальском.

249скачиваний за 30 дней2лайкавеса обновлены22 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Эмбеддинги» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

BrazEmbed-PT-BR — модель для получения векторных представлений текстов на бразильском португальском, созданная на базе BERTimbau и опубликованная tardellirs. Это дообученная модель семейства BERT с 136,1 млн параметров; она использует mean pooling и L2-нормализацию, работает через библиотеку sentence-transformers и принимает последовательности длиной до 512 токенов. В README указано, что опубликованный одиночный чекпойнт представляет собой TIES-слияние четырёх экспертов по отдельным задачам.

Модель предназначена для вычисления эмбеддингов предложений и сравнения их семантической близости, например при поиске похожих фраз или семантическом поиске по текстам на португальском. В MTEB(por) для одиночной модели указан результат mean_16 0,6372; более высокий результат 0,6567 относится к отдельной системе с маршрутизацией по задачам, а не к этому чекпойнту. README сообщает об аудите пересечений обучающих данных с тестовыми наборами, но также отмечает, что разработка велась итеративно по MTEB(por) без отложенной выборки. Лицензия — MIT.

Сценарии применения

  • семантический поиск по текстам на бразильском португальском
  • поиск похожих предложений и фраз
  • ранжирование текстов по семантическому сходству
  • кластеризация португалоязычных текстов по эмбеддингам

Ограничения

Контекст ограничен 512 токенами. README отмечает, что разработка велась итеративно по MTEB(por) без отложенной выборки; заявленный результат для маршрутизируемой системы не относится к одиночному чекпойнту.

Для каких профессий подходит9

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

BrazEmbed-PT-BR

BrazEmbed-PT-BR is a sentence-embedding model based on BERTimbau, the Brazilian BERT (110M parameters) pretrained by NeuralMind on the brWaC web corpus. BERTimbau is a masked language model, not an embedding model. BrazEmbed adds the embedding training on top of it: a contrastive stage that builds the sentence-embedding space, four task-specialised fine-tunes, and a merge of those four into this single model.

  • Size: 110M parameters, 768-dimensional embeddings, mean pooling, max 128 tokens, no instruction prefix.
  • MTEB-BR (por, v1): 57.5 mean over the 7 task types (21 native Brazilian-Portuguese tasks). That is the best score among models up to ~110M parameters, +13.4 points over its own base (BERTimbau, 44.1), and a point on the benchmark's Pareto frontier: no model on the leaderboard is both smaller and better.
  • Base: neuralmind/bert-base-portuguese-cased. License: MIT.

Usage

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("tardellirs/brazembed-pt-br")
sentences = [
    "O Brasil é um país tropical da América do Sul.",
    "A República Federativa do Brasil fica na América Latina.",
    "Operações matemáticas envolvem soma e multiplicação.",
]
emb = model.encode(sentences, normalize_embeddings=True)   # 768-d, L2-normalised
print(emb @ emb.T)                                          # cosine similarities

No query/passage prefix is needed; the same encoder is used for queries and documents.

Results on MTEB-BR

MTEB-BR (por, v1) is a benchmark of 21 tasks built only from data created or found in Brazilian Portuguese (no machine translation), across 7 task types (arXiv 2607.04581). The score is the mean of the 7 task-type averages.

MTEB-BR quality vs. size: BrazEmbed-PT-BR on the Pareto frontier

Models of the same size (~100–120M parameters), plus the base model:

ModelParamsMTEB-BRClassif.MultilabelPair clf.STSClusteringRetrievalReranking
BrazEmbed-PT-BR109M57.569.825.781.378.249.250.847.6
serafim-100m-portuguese-pt-sentence-encoder-ir109M55.969.624.379.477.140.251.848.7
multilingual-e5-small118M55.069.324.676.174.042.550.748.0
granite-embedding-107m-multilingual107M53.968.323.671.670.542.751.050.0
BERTimbau-base (no embedding training)109M44.173.323.360.262.931.826.930.1

Strengths are pair classification, STS and clustering. Retrieval and reranking are on par with the other ~100M models rather than ahead of them; for retrieval-heavy use, see the routed retrieval expert below or a larger model. Live leaderboard with all 122 models: https://huggingface.co/spaces/MTEB-BR/leaderboard

How it was trained

neuralmind/bert-base-portuguese-cased (MLM, 110M)
   │  Stage 1 — contrastive, full fine-tune (symmetric in-batch InfoNCE, mean pooling)
   ▼
Stage-1 encoder ──► four task experts (LoRA r=16, merged into full weights, then weight-souped)
   │                  ├─ classification + clustering   → brazembed-pt-br-clfclu
   │                  ├─ pair classification (NLI)     → brazembed-pt-br-pairclf
   │                  ├─ semantic similarity (STS)     → brazembed-pt-br-sts
   │                  └─ retrieval + reranking         → brazembed-pt-br-retrieval
   ▼
TIES merge of the four experts (density 0.6, λ = 1.0)  → brazembed-pt-br  (this model)
  1. Stage 1 (embedding space). Full fine-tune of BERTimbau with symmetric in-batch InfoNCE on 3,633 Portuguese query–passage pairs generated with Gemini across medical, legal, encyclopedic and web domains (batch 64, lr 2e-5, 300 steps). This alone lifts the MLM from a weak to a usable embedder; larger synthetic sets (6k–9.5k pairs) did not help.
  2. Task experts. On the frozen Stage-1 encoder, one LoRA adapter (r=16) per task group, merged into the weights. Each deployed expert is a uniform weight-soup (plain average, no weighting or greedy selection) of 2–4 checkpoints from the same start:
    • Classification + clustering: 50/50 soup of Stage 1 and an InfoNCE adapter trained on PLUE NLI (252k triples), with EmbeddingGemma-300m used to mask false in-batch negatives.
    • Pair classification: soup of two NLI adapters: PLUE NLI with an embedding-matching term towards EmbeddingGemma-300m similarities, and PLUE plus 33.7k MoritzLaurer multilingual NLI rows.
    • STS: 4-seed soup trained with CoSENT on 14,739 pairs (STSb machine-translated, ASSIN2 train, ASSIN train).
    • Retrieval: soup of three adapters trained with InfoNCE plus mined hard negatives on mMARCO-pt (400k), SQuAD-pt_BR (78k), Ulysses-RFCorpus (4.2k) and 5,851 synthetic legal QA pairs (federal-law passages, Gemini queries).
  3. Single model. TIES merge (trim by magnitude, sign election, disjoint mean) of the four experts as task vectors relative to Stage 1, with standard parameters (density 0.6, λ = 1.0), not tuned on the test sets.

Training ran on single A10G GPUs (Modal) in June 2026.

Routed system (four experts)

The four experts are released separately and can be routed by task type with route.py. On the 16-task development version of the benchmark the routed system scored 0.6567 against 0.6372 for this single model: one set of weights cannot be optimal for both topic geometry (clustering) and retrieval geometry at once.

ExpertUse for
brazembed-pt-br-clfcluclassification, clustering
brazembed-pt-br-pairclfpair classification / NLI
brazembed-pt-br-stssemantic similarity
brazembed-pt-br-retrievalretrieval, reranking

Data and contamination

  • Checked against the benchmark test sets (exact match on normalised text): mMARCO-pt against the Quati judged pool (0 of 8.8M passages and 0 of 400k training pairs overlap), and SQuAD-pt_BR and Ulysses-RFCorpus against FaQuAD, JurisTCU, BRTaxQA and Quati (0 overlap).
  • ASSIN leak found and removed. A self-audit found 10 ASSIN2-STS test pairs in the STS training set (via machine-translation collisions in STSb-MT); they were removed and the STS expert was retrained. eduagarcia/sick-br was dropped entirely (363 exact pairs overlap with the ASSIN2 test set).
  • Uses benchmark-family training splits: the STS expert is trained on the ASSIN and ASSIN2 train splits, and the benchmark scores the test splits. STS scores should be read with that in mind.
  • Not hash-checked: the Gemini-generated Stage-1 pairs and the synthetic legal QA pairs (checked only against the Quati pool), and PLUE NLI (translated GLUE, not Brazilian-native text).
  • Teacher model: EmbeddingGemma-300m was used as a guide and similarity teacher for the classification/clustering and pair-classification experts.

Limitations

  • Max 128 tokens: long documents are truncated, which limits long-passage retrieval.
  • Development was iterative against the 16-task version of the benchmark (no held-out split), so the choice of soups carries some selection optimism; the soups are uniform and the merge parameters untuned to limit it.
  • Trained and evaluated for Brazilian Portuguese; quality on European Portuguese or other languages is not measured.

Citation

If you use BrazEmbed-PT-BR or the MTEB-BR results, please cite the benchmark:

@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}
}

and BERTimbau (Souza, Nogueira and Lotufo, BRACIS 2020).

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · sentence-transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
BertModel
Ревизия весов
136a9d6

0 моделей