This model is a distilled version of the
BERT base multilingual model
. The code for the distillation process can be found
here
. This model is cased: it does make a difference between english and English.
The model is trained on the concatenation of Wikipedia in 104 different languages listed
here
.
The model has 6 layers, 768 dimension and 12 heads, totalizing 134M parameters (compared to 177M parameters for mBERT-base).
On average, this model, referred to as DistilmBERT, is twice as fast as mBERT-base.
We encourage potential users of this model to check out the
BERT base multilingual model card
to learn more about usage, limitations and potential biases.
Developed by:
Victor Sanh, Lysandre Debut, Julien Chaumond, Thomas Wolf (Hugging Face)
Model type:
Transformer-based language model
Language(s) (NLP):
104 languages; see full list
here
You can use the raw model for either masked language modeling or next sentence prediction, but it's mostly intended to be fine-tuned on a downstream task. See the
model hub
to look for fine-tuned versions on a task that interests you.
Note that this model is primarily aimed at being fine-tuned on tasks that use the whole sentence (potentially masked) to make decisions, such as sequence classification, token classification or question answering. For tasks such as text generation you should look at model like GPT2.
Out of Scope Use
The model should not be used to intentionally create hostile or alienating environments for people. The model was not trained to be factual or true representations of people or events, and therefore using the models to generate such content is out-of-scope for the abilities of this model.
Bias, Risks, and Limitations
Significant research has explored bias and fairness issues with language models (see, e.g.,
Sheng et al. (2021)
and
Bender et al. (2021)
). Predictions generated by the model may include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups.
Recommendations
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.
Training Details
The model was pretrained with the supervision of
bert-base-multilingual-cased
on the concatenation of Wikipedia in 104 different languages
The model has 6 layers, 768 dimension and 12 heads, totalizing 134M parameters.
The model developers report the following accuracy results for DistilmBERT (see
GitHub Repo
):
Here are the results on the test sets for 6 of the languages available in XNLI. The results are computed in the zero shot setting (trained on the English portion and evaluated on the target language portion):
@article{Sanh2019DistilBERTAD,
title={DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter},
author={Victor Sanh and Lysandre Debut and Julien Chaumond and Thomas Wolf},
journal={ArXiv},
year={2019},
volume={abs/1910.01108}
}
APA
Sanh, V., Debut, L., Chaumond, J., & Wolf, T. (2019). DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108.
How to Get Started With the Model
You can use the model directly with a pipeline for masked language modeling:
>>> from transformers import pipeline
>>> unmasker = pipeline('fill-mask', model='distilbert-base-multilingual-cased')
>>> unmasker("Hello I'm a [MASK] model.")
[{'score': 0.040800247341394424,
'sequence': "Hello I'm a virtual model.",
'token': 37859,
'token_str': 'virtual'},
{'score': 0.020015988498926163,
'sequence': "Hello I'm a big model.",
'token': 22185,
'token_str': 'big'},
{'score': 0.018680453300476074,
'sequence': "Hello I'm a Hello model.",
'token': 31178,
'token_str': 'Hello'},
{'score': 0.017396586015820503,
'sequence': "Hello I'm a model model.",
'token': 13192,
'token_str': 'model'},
{'score': 0.014229810796678066,
'sequence': "Hello I'm a perfect model.",
'token': 43477,
'token_str': 'perfect'}]
Runs of distilbert distilbert-base-multilingual-cased on huggingface.co
649.1K
Total runs
14.6K
24-hour runs
31.3K
3-day runs
22.5K
7-day runs
151.4K
30-day runs
More Information About distilbert-base-multilingual-cased huggingface.co Model
More distilbert-base-multilingual-cased license Visit here:
distilbert-base-multilingual-cased huggingface.co is an AI model on huggingface.co that provides distilbert-base-multilingual-cased's model effect (), which can be used instantly with this distilbert distilbert-base-multilingual-cased model. huggingface.co supports a free trial of the distilbert-base-multilingual-cased model, and also provides paid use of the distilbert-base-multilingual-cased. Support call distilbert-base-multilingual-cased model through api, including Node.js, Python, http.
distilbert-base-multilingual-cased huggingface.co is an online trial and call api platform, which integrates distilbert-base-multilingual-cased's modeling effects, including api services, and provides a free online trial of distilbert-base-multilingual-cased, you can try distilbert-base-multilingual-cased online for free by clicking the link below.
distilbert distilbert-base-multilingual-cased online free url in huggingface.co:
distilbert-base-multilingual-cased is an open source model from GitHub that offers a free installation service, and any user can find distilbert-base-multilingual-cased on GitHub to install. At the same time, huggingface.co provides the effect of distilbert-base-multilingual-cased install, users can directly use distilbert-base-multilingual-cased installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
distilbert-base-multilingual-cased install url in huggingface.co: