Barcelona Supercomputing Center releases open MrBERT text encoders
In short
- On 23 December 2025 the Language Technologies group of the Barcelona Supercomputing Center (BSC) published MrBERT on Hugging Face: a 308-million-parameter model that turns text in 35 European languages, and code, into numbers a computer can search and sort.
- It was trained from scratch on 6.1 trillion tokens (pieces of words) and reads up to 8,192 tokens at a time.
- Five variants came with it or soon after: smaller Spanish and Catalan models of about 150 million parameters, and 308M models for biomedical, legal and scientific text.
- All six are free to download, with no access form, under Apache 2.0, a licence that also allows commercial use.
- In a paper first posted on 24 February 2026, BSC reports top scores on Spanish and Catalan test suites. These are BSC's own measurements.
How does a small model turn text into numbers for search?
Chatbots such as the ones most people know are decoders: they write text one word at a time. An encoder does the opposite job. It reads a whole passage at once and turns it into a list of numbers that captures its meaning. Those numbers drive the quiet machinery behind search boxes, spam filters, document sorting and the retrieval step that feeds a chatbot the right pages. Encoders are small enough to run cheaply over millions of documents, which is why companies and public bodies still rely on them.
The catch is language. Big multilingual models learn mostly from English web text, and languages such as Catalan get a sliver. MrBERT's own training data shows this: English is 67.4% of the 6.1 trillion tokens, Spanish 8.57% and Catalan 0.44%, about 26.7 billion tokens. Basque and Galician are about 0.11% and 0.08%.
BSC's answer is to train one broad model and then build narrower, cheaper ones from it.

How MrBERT's 6.1 trillion training tokens split by language. The scale is logarithmic: each step up the axis is ten times more text. Tamayo, Lacunza, Rivera-Hidalgo et al., arXiv 2602.21379 (2026), Fig. 1, CC BY 4.0.
What to notice: English alone is about two-thirds of the data; Catalan, the language BSC most wants to serve, is under half a percent.
Is MrBERT open source?
308M parameters in the base model (Hugging Face count: 307,884,672); 6.1T tokens used to pre-train it; 35 European languages, plus code; 8,192 tokens it can read at once
Every repository lists the Apache 2.0 licence and none asks for a sign-up form. In plain words (our reading): anyone may use, change, fine-tune and sell products built on these models, as long as the licence and copyright notice travel with them. The paper says the training used only openly licensed data, and its appendix lists the sources; the main model card says the full dataset list "will be published soon".
These are small files. At 16-bit precision, 308 million parameters come to roughly 0.6 GB (our arithmetic), so the models run on an ordinary laptop or a single modest graphics card.
How the family was built
The base model uses the ModernBERT design, an updated take on Google's BERT encoder that handles long passages efficiently. Training ran in three stages: 5.5 trillion tokens with short passages of 1,024 tokens, 500 billion tokens stretching it to long passages, and a final 100 billion tokens of higher-quality text at 8,192 tokens.
The language versions swap the base model's vocabulary of about 256,000 word pieces for a dedicated one of about 50,000, which is why they are half the size. MrBERT-es was trained further on 615 billion tokens, half Spanish and half English. MrBERT-ca started from the Spanish model rather than the base, because the shared Romance word forms helped, the paper says, and was trained on 47.4 billion tokens, half Catalan and half English.
The domain versions keep the full size and vocabulary and carry on training on specialist text: 24 billion tokens of biomedical text (84.7% English, 14.8% Spanish) and a legal set the paper puts at 9 billion tokens and the model card at 8 billion, about four-fifths English. MrBERT-science, trained on 3.6 billion tokens of scientific text, is on Hugging Face but not in the paper.
What BSC's tests show
All the scores below are from BSC's paper and model cards; we found no independent measurement.
- Catalan. On CLUB, a Catalan test suite, MrBERT-ca averages 85.49, ahead of every model BSC compared, including the larger MrBERT (84.34) and mmBERT (84.48), a similar open multilingual encoder from Johns Hopkins University.
- Spanish. On EvalES, MrBERT-es averages 89.83, against 89.52 for MrBERT and 88.86 for mmBERT.
- Across languages, the picture is less flattering: on the XTREME benchmark mmBERT averages 77.76 and MrBERT 76.19, and MrBERT trails on several tasks such as naming people and places.
- Specialist text. MrBERT-biomed has the best combined English and Spanish biomedical average (48.56), and MrBERT-legal the best legal one (58.15). The margins are small, and on English-only biomedical tasks the general MrBERT scores slightly higher than its biomedical sibling.
The headline result is that the 150M language models beat their 308M parent on their own languages with half the parameters, which makes them cheaper to run.
The "Matryoshka" trick
The paper also tests Matryoshka training, named after Russian nesting dolls: the model is trained so that a slimmed-down part of it still works, letting users trade a little accuracy for speed. BSC slimmed the model by switching off some of its attention heads, the parts that decide which words to look at. Using only a quarter of them, the models ran up to 2.4 times faster, the paper reports, and the biomedical and legal versions kept most of their gains. The language versions coped worse, Catalan most of all: MrBERT-ca lost 3.06 points at that setting.
The Hugging Face model cards do not mention Matryoshka training, so we could not confirm which of the downloadable files, if any, can be slimmed this way. The speed and accuracy figures are from BSC's paper only.
Limits
The paper warns that the models should not replace expert judgement in medical or legal work, may carry biases from their training data, including under-representation of Latin American Spanish, and could be misused for mass document surveillance. BSC recommends human oversight for high-stakes uses. The work was paid for by Spain's Ministry for Digital Transformation with EU NextGenerationEU funds and by the Government of Catalonia's Aina project.
Terms in plain English
- Token: a word or piece of a word, the unit models read.
- Parameters: the adjustable numbers inside a model; more usually means more capable but slower.
- Open weights: the trained model files are free to download and run.
Sources
- MrBERT, model card and files, BSC Language Technologies on Hugging Face
- MrBERT-es, MrBERT-ca, MrBERT-biomed, MrBERT-legal, MrBERT-science, model cards, Hugging Face
- Tamayo, Lacunza, Rivera-Hidalgo et al., MrBERT: Modern Multilingual Encoders via Vocabulary, Domain, and Dimensional Adaptation, arXiv preprint, v1 24 February 2026, v2 7 March 2026 (not peer reviewed)
Sources
- MrBERT model card
- MrBERT: Modern Multilingual Encoders via Vocabulary, Domain, and Dimensional Adaptation
- MrBERT-es model card
- MrBERT-ca model card
- MrBERT-biomed model card
- MrBERT-legal model card
- MrBERT-science model card
Related stories
- Alibaba's Qwen releases open Qwen4-35B-A3B with 3B active
- Ai2 releases Molmo 3, an open model that judges depth in photos
- MiniMax releases M4, a 2.74T-parameter model; weights to follow
- Recension releases Coatl-1, an open model for DNA, proteins and text
- Google DeepMind releases CellGemma, an open cell-response model
- Stability AI opens weights for three of four new audio models