Downloads · 30 days
124
11% of all-time downloads
morit/xlm-t-roberta-base-mnli-xnli
xlm-t-roberta-base-mnli-xnli is a text classification model from morit. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
This model takes the XLM-Roberta-base model which has been continued to pre-traine on a large corpus of Twitter in multiple languages. It was developed following a similar strategy as introduced as part of the Tweet E…
Downloads · 30 days
124
11% of all-time downloads
All-time downloads
1.2K
Public
Repo size
4.5 GB
Likes
2
Public
Click a slice to open those files.
.pt2.2 GB · 66%
From the Hugging Face model README
This model takes the XLM-Roberta-base model which has been continued to pre-traine on a large corpus of Twitter in multiple languages.
It was developed following a similar strategy as introduced as part of the Tweet Eval framework.
The model is further finetuned on the MNLI dataset and also on the xnli dataset.
This model was developed to do Zero-Shot Text Classification in the realm of Hate Speech Detection. It is finetuned on the whole xnli train set containing 15 different languages like:
ar, bg ,de , en, el , es, fr, hi, ru, sw, th, tr, ur, vi, zh
Since the base model was pre-trained on 100 different languages it has shown some effectiveness in other languages. Please refer to the list of languages in the XLM Roberta paper
from transformers import pipeline
classifier = pipeline("zero-shot-classification",
model="morit/xlm-t-roberta-base-mnli-xnli")
This model was pre-trained on set of 100 languages, as described in the original paper. It was then fine-tuned on the task of NLI on the concatenated MNLI train set. Finally, it was trained for one additional epoch on only XNLI data where the translations for the premise and hypothesis are shuffled such that the premise and hypothesis for each example come from the same original English example but the premise and hypothesis are of different languages. The following hyper-parameters were chosen:
using one GPU (NVIDIA GeForce RTX 3090)
The model was evaluated on all the test sets of the xnli dataset resulting in the following accuracies:
| ar | bg | de | el | en | es | fr | hi | ru | sw | th | tr | ur | vi | zh |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0.776 | 0.804 | 0.796 | 0.791 | 0.851 | 0.813 | 0.806 | 0.757 | 0.783 | 0.716 | 0.765 | 0.780 | 0.705 | 0.795 | 0.782 |