RobBERT is a Dutch large language model: an AI model that has examined hundreds of millions of Dutch sentences, enabling it to excel in a wide variety of Dutch language tasks.
You can show RobBERT a new dataset containing some new Dutch sentences and make it perform a particular task on them.
For example, by giving it a dataset of positive and negative book reviews, it can then predict with 95% accuracy whether an unseen book review is positive or negative.
By giving it sentences where the Dutch word “die” or “dat” is missing, it can correctly predict these in more than 99% of the cases.
How often each model was right
Book reviews: positive or negative?
RobBERT
95.1%
BERTje
93.0%
Die or dat? Learned from 10,000 sentences
RobBERT
97.8%
BERTje
93.1%
mBERT
92.2%
Die or dat? Learned from all 1.3 million
RobBERT
99.2%
BERTje
98.3%
mBERT
98.3%
Die or dat? Without any examples
RobBERT
98.8%
BERTje
94.9%
mBERT
90.2%
On sentences the models hadn’t seen before (our paper, Tables 1 and 2; RobBERT’s second version). BERTje is the Dutch BERT model of the University of Groningen, mBERT Google’s multilingual BERT. Without any examples, the models fill in die or dat with what they learned in pretraining alone.
RobBERT is not limited to these tasks: it can compare sentences, label the words in a sentence and classify texts.
When we released it in 2020, it outperformed other models on most Dutch language tasks, especially when a task had little training data, and it remained the best model for most of them for years.
It has been downloaded 5 million times, and many researchers and practitioners have used it to get the best results of their time on a wide range of Dutch language tasks, including:
* These evaluations used RobBERT v1. RobBERT v2, with a Dutch tokenizer instead of an English one, does as well or better on every task we tested.
(Also note that this list is not exhaustive. If you used RobBERT for your application, we are happy to know about it! Send us a mail and we’ll add your application to the list!)
RobBERT is a Dutch version of RoBERTa, Facebook AI’s improved version of Google’s BERT model.
We trained this transformer model on the Dutch part of the OSCAR corpus, text scraped from the web, using Facebook AI’s RoBERTa framework.
Like every transformer, RobBERT works out what a word means from the words around it: while reading a word, it pays attention to the other words in the sentence, before and after it.
It does so in 12 layers, each with 12 attention heads, which each look at the sentence in their own way: some mostly at the previous word, others at the next word or at the word itself.
Pretraining and finetuning
Like BERT, RobBERT learns in two phases:
1 Pretraining
Lots of text without labels: expensive, but done once
Dutch text from the weba word hidden
De hoofdstad van België is <mask>.
“The capital of Belgium is <mask>.”
Hidden word: Brussel Brussels
RobBERTReusable: anyone can download it
2 Finetuning
Fewer examples, with labels: relatively cheap, for each task
A book reviewlabeled by people
Ik kon dit boek niet wegleggen.
“I couldn’t put this book down.”
Label: positive
RobBERT for book reviewsTells positive reviews from negative ones
Pretraining needs no labels: words are hidden in the text, and RobBERT learns to guess them. It took hundreds of millions of sentences and a lot of computing power, but it only had to happen once. Finetuning then teaches RobBERT one task, from a smaller set of examples that people labeled.
RobBERTje and RobBERT-2022
Two later models start from RobBERT:
RobBERTje (2021) is RobBERT distilled: smaller models that learned to give the same answers as RobBERT. Most have 74 million parameters, against RobBERT’s 116 million, which makes them quicker to finetune and lighter to run. For longer texts, such as book reviews, the version that learned from merged consecutive sentences works best.
RobBERT-2022 brings RobBERT, trained in 2019, up to date with how Dutch is used: we added words that had become common since, such as words about COVID-19, to its vocabulary, and trained it further on the 2022 version of the same web corpus. That made it better at some tasks, and worse at others.
In 2023, Pieter Delobelle and François Remy followed with RobBERT-2023, which also comes in a large version.
How to use
RobBERT uses the RoBERTa architecture and pre-training but with a Dutch tokenizer and training data.
With the same architecture, RobBERT works with any code for RoBERTa models and most code for BERT models, such as the Hugging Face Transformers library.
To use RobBERT in Python, add the 🤗 transformers library as a dependency and load the model:
from transformers import RobertaTokenizer, RobertaForSequenceClassificationtokenizer = RobertaTokenizer.from_pretrained("pdelobelle/robbert-v2-dutch-base")model = RobertaForSequenceClassification.from_pretrained("pdelobelle/robbert-v2-dutch-base")
By default, RobBERT has the masked language model head used in training, so it can fill in a hidden word in a sentence without any finetuning.
You can try that for free on RobBERT’s page on HuggingFace.
You can also create a new prediction head for your own task with HuggingFace’s guide to finetuning, their notebooks or any RoBERTa-specific classes, by changing the model name to pdelobelle/robbert-v2-dutch-base.
RobBERTje and RobBERT-2022 work the same way, under their own names on HuggingFace, such as DTAI-KULeuven/robbert-2022-dutch-base.
Happy to announce that we released RobBERT v2! Achieving SOTA results for many different Dutch NLP tasks, especially when dealing with small datasets (accepted at EMNLP Findings, w @thomas_wint)
Skimmed through the paper. Good stuff. I especially appreciate that you evaluated against the recent Dutch BERT models (both of them), as well as open sourcing it all and making the models available through @huggingface 's hub. Nice to see Dutch getting some "attention" too! #pun
Sebastian Ruder
@seb_ruder
Transfer learning is increasingly going multilingual with language-specific BERT models:
So happy to see that RobBERT can help researchers tackle important social issues, like cyberbullying!
UGentNLP@ugentnlpNew publications on cyberbullying: 1. cambridge.org/core/journals/…, on detecting bullies, victims and defenders in social media text, 2. link.springer.com/article/10.100… sets out a cross-domain evaluation framework for cyberbullying detection research to overcome data scarcity.
Peter Vandenabeele 🇺🇦
@peter_v
Interesting! I got blocked in reaching in 100% validation accuracy on BERTje, so I tried RobBERT, a _RoBERTa_ based model. Got to 100% validation accuracy and 95% accuracy for "dt"-mistakes on _untrained_ verbs. gitlab.com/spelfouten/dut…@pieterdelobelle@Wietsedv#NLP#AI#BERT
Maarten van Gompel
@proycon
I released some fine-tuned transformer models for Dutch #NLProc: NER & PoS (CGN tagset), built on BERTje (@wietsedv et al) or RobBERT (@pieterdelobelle et al). Usable with @huggingface's transformers, rust-bert, and later with the upcoming DeepFrog! https://t.co/n2i85p7KIN
Suzan Verberne 🤹♀️
@suzan
Zhenyu Guo presenting his master thesis "When can BERT beat SVM? Replication of four text classification papers and fine-tuning RobBERT on Dutch language datasets", co-supervised by @PetervanderP
On benchmark data, RobBERT is much better than SVM with tf-idf features. But...
@inproceedings{delobelle2020robbert,
title = "{R}ob{BERT}: a {D}utch {R}o{BERT}a-based {L}anguage {M}odel",
author = "Delobelle, Pieter and
Winters, Thomas and
Berendt, Bettina",
booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2020",
month = nov,
year = "2020",
address = "Online",
publisher = "Association for Computational Linguistics",
url = "https://www.aclweb.org/anthology/2020.findings-emnlp.292",
doi = "10.18653/v1/2020.findings-emnlp.292",
pages = "3255--3265",
abstract = "Pre-trained language models have been dominating the field of natural language processing in recent years, and have led to significant performance gains for various complex natural language tasks. One of the most prominent pre-trained language models is BERT, which was released as an English as well as a multilingual version. Although multilingual BERT performs well on many tasks, recent studies show that BERT models trained on a single language significantly outperform the multilingual version. Training a Dutch BERT model thus has a lot of potential for a wide range of Dutch NLP tasks. While previous approaches have used earlier implementations of BERT to train a Dutch version of BERT, we used RoBERTa, a robustly optimized BERT approach, to train a Dutch language model called RobBERT. We measured its performance on various tasks as well as the importance of the fine-tuning dataset size. We also evaluated the importance of language-specific tokenizers and the model{'}s fairness. We found that RobBERT improves state-of-the-art results for various tasks, and especially significantly outperforms other models when dealing with smaller datasets. These results indicate that it is a powerful pre-trained model for a large variety of Dutch language tasks. The pre-trained and fine-tuned models are publicly available to support further downstream Dutch NLP applications.",
}
Delobelle, P., Winters, T., & Berendt, B. (2020). RobBERT: a Dutch RoBERTa-based Language Model. Findings of the Association for Computational Linguistics: EMNLP 2020, 3255–3265. https://doi.org/10.18653/v1/2020.findings-emnlp.292
Delobelle, P., Winters, T. and Berendt, B. (2020) “RobBERT: a Dutch RoBERTa-based Language Model,” in Findings of the Association for Computational Linguistics: EMNLP 2020. Online: Association for Computational Linguistics, pp. 3255–3265. doi:10.18653/v1/2020.findings-emnlp.292.
1.
Delobelle P, Winters T, Berendt B. RobBERT: a Dutch RoBERTa-based Language Model. In: Findings of the Association for Computational Linguistics: EMNLP 2020 [Internet]. Online: Association for Computational Linguistics; 2020. p. 3255–65. Available from: https://www.aclweb.org/anthology/2020.findings-emnlp.292