← Latest papers
💬 NLP

moBERTo: A Modern Encoder for Portuguese via Continued Pretraining of ModernBERT

The paper introduces moBERTo, a high-performance Portuguese encoder-only model created by continuing the pretraining of ModernBERT on 60 billion tokens, which achieves state-of-the-art results in retrieval, classification, and NER tasks while demonstrating the superiority of continued pretraining over training from scratch for preserving long-context capabilities.

Original authors: Thiago Laitz, Thales Sales Almeida, João Guilherme Alves Santos, Giovana Kerche Bonás

Published 2026-06-23
📖 4 min read☕ Coffee break read

Original authors: Thiago Laitz, Thales Sales Almeida, João Guilherme Alves Santos, Giovana Kerche Bonás

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a brilliant, highly educated librarian who speaks perfect English and has read 2 trillion books. This librarian is incredibly fast, remembers long stories without getting confused, and is great at finding specific facts or sorting books by topic. However, they don't speak a word of Portuguese.

The paper introduces moBERTo, a project that takes this English-speaking librarian and gives them a crash course in Portuguese so they can work effectively in a Brazilian library.

Here is how they did it and what they found, explained simply:

1. The Strategy: "Continued Pretraining" (Don't Start Over)

Instead of hiring a new librarian and teaching them everything from scratch (which would take forever and cost a fortune), the team took the existing English expert and fed them 60 billion Portuguese words (about 5 years' worth of reading material).

  • The Analogy: Think of it like taking a master chef who knows French cuisine perfectly and giving them a massive stack of Portuguese cookbooks to study. They don't forget how to cook; they just learn how to apply their skills to new ingredients.
  • The Result: This was much better than training a new model from scratch. The "old" librarian kept their superpowers (like remembering long stories) while learning the new language.

2. The Toolkit: Modern Upgrades

The librarian they started with wasn't just any old model; they used ModernBERT. This is a "next-generation" version of the classic library assistant.

  • Old Librarians (like BERTimbau): Could only read 512 words at a time before getting confused. They used old, clunky methods to remember where they were in a sentence.
  • moBERTo: Can read up to 8,192 words in one go without losing its place. It uses "flash" speed and smart attention spans to handle long documents effortlessly.

3. The Experiments: Trying Different Teaching Methods

The researchers tried a few different ways to teach the librarian Portuguese to see what worked best:

  • Method A: The "Original Dictionary" (Original Tokenizer)
    They taught the librarian using the original English dictionary, just swapping in Portuguese words where they fit.

    • Result: This worked surprisingly well for reading long documents because the librarian's "memory map" stayed intact.
  • Method B: The "New Dictionary" (Portuguese Tokenizer)
    They gave the librarian a brand-new dictionary built specifically for Portuguese.

    • Result: This was great for small tasks like spotting names in a sentence (Named Entity Recognition) or understanding short sentences. However, it confused the librarian when reading very long texts, causing them to lose their place.
  • Method C: The "Hybrid Bridge" (Subword-Matching)
    This was the winning strategy. They built a new Portuguese dictionary but used a special "bridge" to connect the new words to the librarian's old English memory.

    • Result: This gave them the best of both worlds. The librarian could understand Portuguese nuances and keep their long-memory superpowers.

4. The Results: Who Won?

The team tested moBERTo on various tasks, like finding specific documents, sorting news articles, and spotting names in text.

  • The Champion: The moBERTo-SWM-8k model (the one with the "Hybrid Bridge" and extra long-story training) was the clear winner.
    • It beat the previous champion (BERTimbau) in finding relevant documents.
    • It was the best at understanding the meaning of Portuguese text.
    • It was excellent at spotting names and places in sentences.
  • The Long-Story Surprise: Even though the librarian was mostly trained on short stories (1,024 words), they could still read and understand massive 8,000-word documents better than any other Portuguese model. This proved that the "modern" architecture is very powerful.

5. The Takeaway

The paper concludes that you don't need to build a giant, expensive model from scratch to get great results in Portuguese. By taking a modern, efficient English model and "fine-tuning" it with a lot of good Portuguese data, you get a model that is:

  1. Faster and cheaper to run than massive chatbots.
  2. Smarter at finding information and understanding text than older Portuguese models.
  3. Capable of reading very long documents without getting lost.

The team has shared their "librarian" (the model weights) and their "library books" (the training data) for anyone to use, hoping to help everyone in the Portuguese-speaking world build better AI tools.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →