Downloads · 30 days
9
1% of all-time downloads
konstantindobler/xlm-roberta-base-focus-german
xlm-roberta-base-focus-german is a fill-mask model from konstantindobler. Use it when you need the model to fill a missing word. It is set up for transformers. The card lists the license as mit.
XLM-R adapted to German using "FOCUS: Effective Embedding Initialization for Monolingual Specialization of Multilingual Models".
Downloads · 30 days
9
1% of all-time downloads
All-time downloads
605
Public
Parameters
124M
996 MB on disk
Likes
1
Public
Click a slice to open those files.
.bin498 MB · 50%
From the Hugging Face model README
XLM-R adapted to German using "FOCUS: Effective Embedding Initialization for Monolingual Specialization of Multilingual Models".
Code: https://github.com/konstantinjdobler/focus
Paper: https://arxiv.org/abs/2305.14481
from transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained("konstantindobler/xlm-roberta-base-focus-german")
model = AutoModelForMaskedLM.from_pretrained("konstantindobler/xlm-roberta-base-focus-german")
# Use model and tokenizer as usual
The model is based on xlm-roberta-base and was adapted to German. The original multilingual tokenizer was replaced by a language-specific German tokenizer with a vocabulary of 50k tokens. The new embeddings were initialized with FOCUS. The model was then trained on data from CC100 for 390k optimizer steps. More details and hyperparameters can be found in the paper.
The web-scale dataset used for pretraining and tokenizer training (CC100) might contain personal and sensitive information.
Such behavior needs to be assessed carefully before any real-world deployment of the models. Also, the tokenizer training was conducted using a sentencepiece character_coverage of 100%. As a result, the vocabulary contains characters which are usually not used in German.
Please cite FOCUS as follows:
@misc{dobler-demelo-2023-focus,
title={FOCUS: Effective Embedding Initialization for Monolingual Specialization of Multilingual Models},
author={Konstantin Dobler and Gerard de Melo},
year={2023},
eprint={2305.14481},
archivePrefix={arXiv},
primaryClass={cs.CL}
}