Fine-tuned
xlm-roberta-base for
binary sentiment classification (positive / negative) across
17
languages. Built for the CMPE 346 (Natural Language Processing)
Assignment 02 at İstanbul Bilgi University.
1from transformers import pipeline
2
3clf = pipeline("text-classification", model="Tunahan241/cmpe346-sentiment")
4
5clf("This product changed my life, absolutely love it!")
6# [{'label': 'LABEL_1', 'score': 0.998}] # LABEL_1 = positive
7
8clf("Très déçu, ne fonctionne pas du tout.")
9# [{'label': 'LABEL_0', 'score': 0.995}] # LABEL_0 = negative
10
11clf("非常满意,推荐购买!")
12# [{'label': 'LABEL_1', 'score': 0.992}] # LABEL_1 = positive
xlm-roberta-base — 270 M-parameter
multilingual masked language model pretrained on CC-100 across 100
languages. A single linear classification head is added on top of the
<s> (CLS) token.
Tokenization is handled by the pretrained XLM-R SentencePiece tokenizer
(250 002 subword vocabulary, 100 languages).