Downloads · 30 days
38
1% of all-time downloads
morit/XLM-T-full-xnli
XLM-T-full-xnli is a zero-shot classification model from morit. Use it when you need labels you did not train the model on. 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
38
1% of all-time downloads
All-time downloads
3.4K
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 all of the languages of the XNLI train set
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-full-xnli")
This model was pre-trained on a set of 100 languages and follwed further training on 198M multilingual tweets as described in the original paper. Further it was trained on the full train set of XNLI dataset which is a machine translated version of the MNLI dataset. It was trained on 5 epochs of the XNLI train set and evaluated on the XNLI eval dataset at the end of every epoch to find the best performing model. The model which had the highest accuracy on the eval set was chosen at the end.

using a 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.749 | 0.787 | 0.774 | 0.774 | 0.831 | 0.796 | 0.785 | 0.734 | 0.761 | 0.701 | 0.757 | 0.758 | 0.704 | 0.778 | 0.774 |