Pretrained model on Romanian language using a masked language modeling (MLM) and next sentence prediction (NSP) objective.
It was introduced in this
paper. Three BERT models were released:
RoBERT-small, RoBERT-base and RoBERT-large, all versions uncased.
1# tensorflow
2from transformers import AutoModel, AutoTokenizer, TFAutoModel
3tokenizer = AutoTokenizer.from_pretrained("readerbench/RoBERT-small")
4model = TFAutoModel.from_pretrained("readerbench/RoBERT-small")
5inputs = tokenizer("exemplu de propoziție", return_tensors="tf")
6outputs = model(inputs)
7
8# pytorch
9from transformers import AutoModel, AutoTokenizer, AutoModel
10tokenizer = AutoTokenizer.from_pretrained("readerbench/RoBERT-small")
11model = AutoModel.from_pretrained("readerbench/RoBERT-small")
12inputs = tokenizer("exemplu de propoziție", return_tensors="pt")
13outputs = model(**inputs)
The model is trained on the following compilation of corpora. Note that we present the statistics after the cleaning process.
We report results on
VarDial 2019 Moldavian vs. Romanian Cross-dialect Topic identification Challenge, as Macro-averaged F1 score (in %).
Challenge can be found
here. We report results on the official test set, as accuracies in %.
1@inproceedings{masala2020robert,
2 title={RoBERT--A Romanian BERT Model},
3 author={Masala, Mihai and Ruseti, Stefan and Dascalu, Mihai},
4 booktitle={Proceedings of the 28th International Conference on Computational Linguistics},
5 pages={6626--6637},
6 year={2020}
7}