Helsinki-NLP/tatoeba
Updated • 3.37k • 56
How to use nikitast/multilang-classifier-roberta with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="nikitast/multilang-classifier-roberta") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("nikitast/multilang-classifier-roberta")
model = AutoModelForSequenceClassification.from_pretrained("nikitast/multilang-classifier-roberta")RoBERTa fine-tuned on small parts of Open Subtitles, Oscar and Tatoeba datasets (~9k samples per language).
Implemented heuristic algorithm for multilingual training data creation - https://github.com/n1kstep/lang-classifier
| data source | language |
|---|---|
| open_subtitles | ka, he, en, de |
| oscar | be, kk, az, hu |
| tatoeba | ru, uk |
The metrics obtained from validation on the another part of dataset (~1k samples per language).
| Training Loss | Validation Loss | F1-Score | Roc Auc | Accuracy | Support |
|---|---|---|---|---|---|
| 0.161500 | 0.110949 | 0.947844 | 0.953939 | 0.762063 | 26858 |