Instructions to use Geotrend/distilbert-base-25lang-cased with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Geotrend/distilbert-base-25lang-cased with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="Geotrend/distilbert-base-25lang-cased")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("Geotrend/distilbert-base-25lang-cased") model = AutoModelForMaskedLM.from_pretrained("Geotrend/distilbert-base-25lang-cased", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from Geotrend/distilbert-base-25lang-cased: direct link, hf CLI and curl.
- Browser
- Download file 1.96 kB
-
https://huggingface.co/Geotrend/distilbert-base-25lang-cased/resolve/b0416cc7e6c45e80307d5d01c9337d6b056dcc94/README.md
- Command line
-
hf download hf://Geotrend/distilbert-base-25lang-cased@b0416cc7e6c45e80307d5d01c9337d6b056dcc94/README.md
-
curl -L -o README.md https://huggingface.co/Geotrend/distilbert-base-25lang-cased/resolve/b0416cc7e6c45e80307d5d01c9337d6b056dcc94/README.md
1.96 kB
metadata
language:
- multilingual
- en
- fr
- es
- de
- zh
- ar
- ru
- vi
- el
- bg
- th
- tr
- hi
- ur
- sw
- nl
- uk
- ro
- pt
- it
- lt
- 'no'
- pl
- da
- ja
datasets: wikipedia
license: apache-2.0
widget:
- text: Google generated 46 billion [MASK] in revenue.
- text: Paris is the capital of [MASK].
- text: Algiers is the largest city in [MASK].
- text: Paris est la [MASK] de la France.
- text: Paris est la capitale de la [MASK].
- text: L'élection américaine a eu [MASK] en novembre 2020.
- text: تقع سويسرا في [MASK] أوروبا
- text: إسمي محمد وأسكن في [MASK].
distilbert-base-25lang-cased
We are sharing smaller versions of distilbert-base-multilingual-cased that handle a custom number of languages.
Our versions give exactly the same representations produced by the original model which preserves the original accuracy.
Handled languages: en, fr, es, de, zh, ar, ru, vi, el, bg, th, tr, hi, ur, sw, nl, uk, ro, pt, it, lt, no, pl, da and ja.
For more information please visit our paper: Load What You Need: Smaller Versions of Multilingual BERT.
How to use
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("Geotrend/distilbert-base-25lang-cased")
model = AutoModel.from_pretrained("Geotrend/distilbert-base-25lang-cased")
To generate other smaller versions of multilingual transformers please visit our Github repo.
How to cite
@inproceedings{smallermbert,
title={Load What You Need: Smaller Versions of Multilingual BERT},
author={Abdaoui, Amine and Pradel, Camille and Sigel, Grégoire},
booktitle={SustaiNLP / EMNLP},
year={2020}
}
Contact
Please contact amine@geotrend.fr for any question, feedback or request.