/ Модель

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

Контекст
8 192 токена
Параметры
307 млн
Лицензия
Apache 2.0
Архитектура
modernbert · dense
Библиотека
transformers
Опубликована
23 дек 2025

MrBERT

Заполнение пропусковТекст → текст10 профессий

MrBERT — многоязычный энкодер ModernBERT для masked language modeling и создания основы для поиска, классификации и кросс-языкового понимания текста.

950скачиваний за 30 дней10лайковвеса обновлены26 мар 2026

Бенчмарки

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

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

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

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

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

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

MrBERT — многоязычная модель-энкодер от BSC-LT на архитектуре ModernBERT, предварительно обученная с нуля на корпусе объёмом 6,1 трлн токенов. Она использует двунаправленный masked language modeling и предназначена для получения контекстных представлений текста на 35 европейских языках и кода. Модель содержит около 307 млн параметров, использует токенизатор SentencePiece с словарём на 256 тысяч токенов и поддерживает контекст до 8192 токенов.

MrBERT подходит как основа для последующей настройки на поиск и извлечение информации, классификацию, семантический поиск и кросс-языковые задачи понимания текста. В карточке приведены оценки на XTREME и других многоязычных тестах, включая XNLI, PAWS-X и UDPOS; результаты различаются по задачам и языкам. Для получения эмбеддингов или прикладного предсказания потребуется соответствующая downstream-настройка.

Модель распространяется под лицензией Apache-2.0. Хотя в обучающем корпусе присутствуют код и 35 языков, основная доля данных — английская (67,4%); результаты и качество могут быть неодинаковыми для разных языков и задач.

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

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

Ограничения

Это базовый энкодер, поэтому для прикладных задач вроде классификации или поиска может потребоваться дообучение. Английский составляет 67,4% обучающих данных, а качество может различаться между языками и задачами.

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

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

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

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

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

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

Открыть на Hugging Face

MrBERT Model Card

MrBERT is a multilingual foundational encoder model based on the ModernBERT architecture. It is pre-trained from scratch on a large-scale corpus of 6.1 trillion tokens covering 35 European languages as well as code. By building on ModernBERT’s modernized BERT-style design, MrBERT combines strong bidirectional representations with efficient long-context modeling.

Designed as a general-purpose multilingual encoder, MrBERT is well suited for a wide range of downstream tasks such as retrieval, classification, semantic search, and cross-lingual understanding across diverse languages.

Technical Description

Technical details of the MrBERT model.

DescriptionValue
Model Parameters308M
Tokenizer TypeSPM
Vocabulary size256,000
Precisionbfloat16
Context length8192

Training Hyperparemeters

HyperparameterValue
Pretraining ObjectiveMasked Language Modeling
Learning Rate1E-03
Learning Rate SchedulerWSD
Warmup3,000,000,000 tokens
Optimizerdecoupled_stableadamw
Optimizer HyperparametersAdamW (β1=0.9,β2=0.98,ε =1e-06 )
Weight Decay1E-05
Global Batch Size4096 (Short Context) / 512 (Long Context)
Dropout1E-01
Activation FunctionGeLU

How to use

You can use the pipeline for masked language modeling:

>>> from transformers import pipeline
>>> from pprint import pprint
>>> unmasker = pipeline('fill-mask', model='BSC-LT/MrBERT')

>>> pprint(unmasker("I love the<mask>of Barcelona.",top_k=3))
[{'score': 0.29333314299583435,
  'sequence': 'I love the city of Barcelona.',
  'token': 31489,
  'token_str': 'city'},
 {'score': 0.06682543456554413,
  'sequence': 'I love the capital of Barcelona.',
  'token': 10859,
  'token_str': 'capital'},
 {'score': 0.05594080686569214,
  'sequence': 'I love the streets of Barcelona.',
  'token': 178738,
  'token_str': 'streets'}]
>>> pprint(unmasker("Me encanta la<mask>de Barcelona.",top_k=3))
[{'score': 0.4422685205936432,
  'sequence': 'Me encanta la ciudad de Barcelona.',
  'token': 19587,
  'token_str': 'ciudad'},
 {'score': 0.059732843190431595,
  'sequence': 'Me encanta la capital de Barcelona.',
  'token': 10859,
  'token_str': 'capital'},
 {'score': 0.03484857454895973,
  'sequence': 'Me encanta la arquitectura de Barcelona.',
  'token': 83374,
  'token_str': 'arquitectura'}]
>>> pprint(unmasker("M'encanta la<mask>de Barcelona.",top_k=3))
[{'score': 0.45476993918418884,
  'sequence': "M'encanta la ciutat de Barcelona.",
  'token': 17128,
  'token_str': 'ciutat'},
 {'score': 0.05597861483693123,
  'sequence': "M'encanta la capital de Barcelona.",
  'token': 10859,
  'token_str': 'capital'},
 {'score': 0.04105329513549805,
  'sequence': "M'encanta la música de Barcelona.",
  'token': 16051,
  'token_str': 'música'}]

Alternatively, you can also extract the logits associated with the sequences and perform the calculations by hand:

from transformers import AutoTokenizer, AutoModelForMaskedLM
import torch

model = AutoModelForMaskedLM.from_pretrained("BSC-LT/MrBERT")
tokenizer = AutoTokenizer.from_pretrained("BSC-LT/MrBERT")

outputs = model(**tokenizer("The capital of Spain is<mask>", return_tensors="pt")).logits

# The index of "<mask>" token is -2 given that the -1 position is the EOS token "</s>".
predicted_token = tokenizer.decode(torch.argmax(outputs[0,-2,:])) 

print(f"The decoded element is \"{predicted_token}\"." ) # This will give "Madrid"

Data

Pretraining Corpus

The pretraining corpus comprises 6.1 trillion tokens, covering 35 European languages and code. Training was conducted in three distinct phases to balance broad knowledge acquisition with long-context performance:

PhaseContext LengthToken Count
Short Context1,024 tokens5.5T
Long Context8,192 tokens500B
Annealing8,192 tokens100B

Language Distribution & Sources

While English constitutes 67.4% of the total data, the remaining distribution spans a diverse set of European languages as shown below:

The full list of datasets used will be published soon.

Multilingual Evaluation and Performance

Evaluation is done using multilingual benchmarks in order to assess the multilingual capabilities of the models.

The following multilingual benchmarks have been considered:

BenchmarkDescriptionLanguagesSource
XTREMEBenchmark for the evaluation of the cross-lingual generalization ability of pre-trained multilingual modelsbg,ca,de,el,en,es,et,eu,fi,fr,hu,it,lt,nl,pl,pt,ro,ru,ukLINK
EvalESSpanish benchmark for evaluating language understanding across multiple NLP tasksesLINK
CLUBHuman-Annotated Catalan BenchmarkcaLINK
Biomedical BenchmarkNER Spanish tasks and Multilingual Text Embedding Benchmark for evaluating sentence and document embedding quality across retrieval tasks using ColBERTen, esLINK
Legal BenchmarkText Classification tasks and Multilingual Text Embedding Benchmark for evaluating sentence and document embedding quality across retrieval tasks using ColBERTen, esLINK

In addition to the MrBERT family, the following base foundation models were considered:

Multilingual Foundational ModelNumber of ParametersVocab SizeDescription
RoBERTa-ca125M50KRoBERTa-ca is a Catalan-specific language model obtained by using vocabulary adaptation from mRoBERTa.
xlm-roberta-base279M250KFoundational RoBERTa model pretrained with CommonCrawl data containing 100 languages.
mRoBERTa283M256KRoBERTa base model pretrained with 35 European languages and a larger vocabulary size.
mmBERT308M250KMultilingual ModernBERT pre-trained with staged language learning.
mGTE306M250KMultilingual encoder also adapted for retrieval tasks.
Clinical ModernBERT137M50KPre-trained model on biomedical data using ModernBERT architecture
BioClinical-ModernBERT150M50KDomain adaptation from ModernBERT to bioclinical data
legal-bert-base-uncased110M31kBERT-base model pre-trained on legal corpora

RESULTS

This section presents results across various multilingual benchmarks, with the maximum values highlighted in bold and the second-highest values underlined.

XTREME Benchmark

The Cross-lingual TRansfer Evaluation of Multilingual Encoders (XTREME) benchmark is designed to assess the cross-lingual generalization capabilities of pre-trained multilingual models. It comprises nine tasks that collectively test reasoning across various levels of syntax and semantics. The results reported here are from the test set, using the learning rate chosen based on the best-performing model on the validation set.

Given that retrieval tasks generally achieve higher performance with multi-vector methods such as ColBERT, we evaluate these tasks separately using m-TEB.

In the table below we just show the average results across languages:

taskxlm-roberta-base (279M)mRoBERTa (283M)mmBERT (308M)mGTE (306M)MrBERT (308M)
xnli (TC)78.2579.0980.5477.9081.26
pawsx (TC)89.5090.3692.3489.5591.32
udpos (POS)85.5585.3684.3382.0783.74
panx (NER)73.6975.6573.8973.0572.06
tydiqa (QA)56.4153.9663.9551.0756.34
mlqa (QA)68.9168.6771.4868.0570.67
xquad (QA)75.6175.4577.7974.3777.91
average75.4275.5077.7673.7276.19

For a detailed description for each language, we provide the full table description:

🔵 Sentence Classification

🔵 XNLI

Metric used: Accuracy.

langsxlm-roberta-base (279M)mRoBERTa (283M)mmBERT (308M)mGTE (306M)MrBERT (308M)
bg77.6078.2079.2476.7980.04
de77.0577.6880.1676.0380.16
el75.6376.5377.1774.9779.74
en84.4985.6386.7384.8788.02
es79.0080.3281.8879.0882.53
fr78.0478.9480.7678.6880.78
ru75.9176.3177.8874.8777.56
🔵 PAWS-X

Metric used: Accuracy.

langsxlm-roberta-base (279M)mRoBERTa (283M)mmBERT (308M)mGTE (306M)MrBERT (308M)
de87.2588.5090.9586.5589.05
en94.1094.5095.5093.7095.60
es87.9088.9591.4089.5089.95
fr88.7589.5091.5088.4590.70

🟣 Structured Prediction: POS

🟣 POS (UDPOS)

Metric used: F1.

langsxlm-roberta-base (279M)mRoBERTa (283M)mmBERT (308M)mGTE (306M)MrBERT (308M)
bg88.3188.1087.4886.3386.90
de88.3587.5486.9485.5286.82
el87.5283.9081.8083.3983.95
en95.8995.8095.9695.6595.84
es87.4987.4587.7086.0387.84
et84.6085.5581.0879.5277.43
eu66.9867.4364.6764.3264.22
fi84.7783.5882.3879.0177.05
fr85.9386.8486.5582.7685.86
hu83.1282.1580.0077.7281.69
it86.9589.0289.1485.7387.42
lt83.1081.0382.0075.8180.42
nl89.1689.3689.1786.6689.02
pl83.9084.3382.8081.2285.00
pt86.7587.7887.3585.0787.28
ro83.4781.3982.5476.2177.47
ru88.9289.5987.8485.4888.75
uk84.7285.5582.5480.7784.44
🟣 NER (PANX)

Metric used: F1.

langsxlm-roberta-base (279M)mRoBERTa (283M)mmBERT (308M)mGTE (306M)MrBERT (308M)
bg76.4277.9274.2973.7974.97
de74.6078.3675.9875.5976.11
el73.3276.3168.6268.9570.88
en82.3983.4382.8283.9982.05
es71.0481.1979.9378.1477.46
et71.8572.8770.3269.9267.04
eu59.5856.5251.7059.4655.84
fi75.8076.0774.6774.7870.54
fr77.6177.6581.1578.1477.63
hu76.6673.4273.0374.1473.26
it76.7380.0280.4979.6576.98
lt72.0473.5270.1468.7966.40
nl79.8581.9180.1078.8779.37
pl77.4580.3377.8178.0377.75
pt75.9379.2180.3678.8677.36
ro71.7871.4975.3769.4766.02
ru63.3967.3164.1361.7360.89
uk70.0074.2069.1762.5466.49

⚫ Question Answering

⚫ TyDiQA

Metric used: F1.

langsxlm-roberta-base (279M)mRoBERTa (283M)mmBERT (308M)mGTE (306M)MrBERT (308M)
en62.4260.3971.7357.9468.50
fi54.1949.5160.8944.8548.08
ru52.6151.9859.2450.4252.45
⚫ MLQA

Metric used: F1.

langsxlm-roberta-base (279M)mRoBERTa (283M)mmBERT (308M)mGTE (306M)MrBERT (308M)
de61.5761.4965.1959.9664.38
en78.6876.3779.0976.2477.45
es66.4868.1570.1767.9570.17
⚫ XQUAD

Metric used: F1.

langsxlm-roberta-base (279M)mRoBERTa (283M)mmBERT (308M)mGTE (306M)MrBERT (308M)
de74.3172.9377.6870.6275.94
el71.6871.7068.8171.9374.92
en82.2682.3785.6782.2984.44
es75.2078.1879.5876.0879.23
ru74.5872.0877.2070.9375.02

EvalES Benchmark

The EvalES benchmark consists of 7 tasks: Named Entity Recognition and Classification (CoNLL-NERC), Part-of-Speech Tagging (UD-POS), Text Classification (MLDoc), Paraphrase Identification (PAWS-X), Semantic Textual Similarity (STS), Question Answering (SQAC), and Textual Entailment (XNLI). This benchmark evaluates the model's capabilities in the Spanish language.

tasksxlm-roberta-base (279M)mRoBERTa (283M)mmBERT (308M)mGTE (306M)MrBERT (308M)MrBERT-es (150M)
pos (f1)99.0199.0399.0998.9299.0699.08
ner (f1)86.9187.7787.0186.9687.4287.77
sts (person)80.8879.6982.8884.5284.1885.23
tc - paws-x (acc)90.3591.3091.3589.7091.2591.90
tc - mldoc (acc)47.6791.2895.1096.1395.2895.55
tc - massivenew (acc)21.8986.4586.7987.1987.4687.05
qa (f1)74.4877.0379.7976.7881.9682.19
Average71.6087.5188.8688.6089.5289.83

CLUB Benchmark

The Catalan Language Understanding Benchmark consists of 6 tasks: Named Entity Recognition (NER), Part-of-Speech Tagging (POS), Semantic Textual Similarity (STS), Text Classification (TC), Textual Entailment (TE), and Question Answering (QA). This benchmark evaluates the model's capabilities in the Catalan language.

This comparison also includes RoBERTa-ca, a model derived from mRoBERTa by applying vocabulary adaptation and performing continual pre-training on a 95GB Catalan-only corpus. For further details, visit here.

tasksxlm-roberta-base (279M)mRoBERTa (283M)roberta-ca (125M)mmBERT (308M)mGTE (306M)MrBERT (308M)MrBERT-ca (150M)
ner (F1)87.6188.3389.7088.1487.2087.3288.04
pos (F1)98.9198.9899.0099.0198.6799.0199.03
sts (Person)74.6779.5282.9983.1678.6583.0085.42
tc (Acc.)72.5772.4172.8174.1174.6873.7974.97
te (Acc.)79.5982.3882.1483.1879.4084.0386.92
viquiquad (F1)86.9387.8687.3189.8686.7889.2589.59
xquad (F1)69.6969.4070.5373.8869.2773.9674.47
Average81.4282.7083.5084.4882.0984.3485.49

MTEB Benchmark

Models are trained on 810k MS-Marco samples using teacher scores from BGE-M3, with a batch size of 16 and a learning rate of 8e-5, leveraging the PyLate library. Evaluations are conducted separately across the legal, scientific, and medical domains.

🩺 Biomedical

Task NameTask TypemmBERT (308M)MrBERT (308M)MrBERT-es (150M)BioClinical-MdnBERT (150M)Clinical MdnBERT (137M)MrBERT-biomed (308M)
bsc-bio-distemist-ner (ES)NER78.0077.8478.0775.4570.2277.93
cantemist (ES)NER78.0368.7373.4066.6830.9170.78
pharmaconer (ES)NER89.6688.5888.9787.6681.6989.92
AbSanitas (ES)Retrieval34.6834.1653.4930.4118.0851.01
r2med (EN)Retrieval10.8710.158.659.975.919.76
SciDocs (EN)Retrieval10.009.759.909.333.6410.05
SciFact (EN)Retrieval32.3531.0831.4632.0720.3430.25
TREC-COVID (EN)Retrieval30.7749.5337.5146.0823.8848.76
Average (EN)All Tasks21.0025.1321.8824.3613.4424.71
Average (EN + ES)All Tasks45.5546.2347.6844.7131.8348.56

⚖️ Legal

Task NameTask TypemmBERT(308M)MrBERT(308M)MrBERT-es(150M)legal-bert-base-uncased(110M)MrBERT-legal(308M)
LexBOE (ES)Text Classification96.8497.0297.2895.3696.80
small-spanish-legal-dataset (ES)Retrieval42.5840.7846.9219.7938.75
EURLEX (EN)Text Classification97.4397.4097.4197.4297.33
AILAStatutes (EN)Retrieval14.3113.9012.2813.4916.33
legal_summarization (EN)Retrieval53.3353.8446.4152.4055.05
LegalBench (EN)Retrieval60.1558.8858.2663.4258.04
NanoTouche2020 (EN)Retrieval34.0344.1531.1834.4844.74
Average (EN)All Tasks51.8553.6349.1152.2454.30
Average (EN + ES)All Tasks56.9558.0055.6853.7758.15

Additional information

Author

The Language Technologies Lab from Barcelona Supercomputing Center.

Contact

For further information, please send an email to langtech@bsc.es.

Copyright

Copyright(c) 2026 by Language Technologies Lab, Barcelona Supercomputing Center.

Funding

This work has been supported and funded by the Ministerio para la Transformación Digital y de la Función Pública and the Plan de Recuperación, Transformación y Resiliencia – funded by the EU through NextGenerationEU, within the framework of the Modelos del Lenguaje project, as well as by the European Union – NextGenerationEU. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or European Commission. Neither the European Union nor the European Commission can be held responsible for them.

Acknowledgements

This project has benefited from the contributions of numerous teams and institutions through data contributions.

In Catalonia, many institutions have been involved in the project. Our thanks to Òmnium Cultural, Parlament de Catalunya, Institut d'Estudis Aranesos, Racó Català, Vilaweb, ACN, Nació Digital, El món and Aquí Berguedà.

At national level, we are especially grateful to our ILENIA project partners: CENID, HiTZ and CiTIUS for their participation. We also extend our genuine gratitude to the Spanish Senate and Congress, Fundación Dialnet, Fundación Elcano, the "Instituto de Ingenieria del Conocimiento" and the ‘Instituto Universitario de Sistemas Inteligentes y Aplicaciones Numéricas en Ingeniería (SIANI)’ of the University of Las Palmas de Gran Canaria.

At the international level, we thank the Welsh government, DFKI, Occiglot project, especially Malte Ostendorff, and The Common Crawl Foundation, especially Pedro Ortiz, for their collaboration.

Their valuable efforts have been instrumental in the development of this work.

Disclaimer

Be aware that the model may contain biases or other unintended distortions. When third parties deploy systems or provide services based on this model, or use the model themselves, they bear the responsibility for mitigating any associated risks and ensuring compliance with applicable regulations, including those governing the use of Artificial Intelligence.

The Barcelona Supercomputing Center, as the owner and creator of the model, shall not be held liable for any outcomes resulting from third-party use.

Citation

@article{tamayo2026mrbert,
  title={MrBERT: Modern Multilingual Encoders via Vocabulary, Domain, and Dimensional Adaptation},
  author={Tamayo, Daniel and Lacunza, I{\~n}aki and Rivera-Hidalgo, Paula and Da Dalt, Severino and Aula-Blasco, Javier and Gonzalez-Agirre, Aitor and Villegas, Marta},
  journal={arXiv preprint arXiv:2602.21379},
  year={2026}
}

License

Apache License, Version 2.0

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
ModernBertForMaskedLM
Ревизия весов
efb6516

0 моделей