Multilingual BERT for Sentiment Classification

This model is bert-base-multilingual-cased (an encoder-only Transformer pre-trained on 104 languages), fine-tuned on the IMDB movie-review dataset to classify text as POSITIVE or NEGATIVE. It reads the whole input at once, using the words on both the left and the right, and returns a label with a confidence score.

Although it was fine-tuned on English reviews, it can also classify text in other languages, such as Spanish, French and Urdu.

Details

Item Value
Architecture Encoder-only Transformer (BERT)
Base model bert-base-multilingual-cased
Language Multilingual (104 languages)
Dataset IMDB movie reviews
Task Sentiment classification
Labels 0 = NEGATIVE, 1 = POSITIVE

Usage

from transformers import pipeline

clf = pipeline("sentiment-analysis", model="TahiraAbbas/bert-multilingual-imdb-sentiment")
print(clf("The movie was excellent."))
print(clf("Ce film était terrible."))

Limitations

Trained on a small subset of IMDB reviews. Accuracy on other languages and other domains can be lower than on English movie reviews. Reviews longer than 512 tokens are truncated.

Downloads last month
58
Safetensors
Model size
0.2B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for TahiraAbbas/bert-multilingual-imdb-sentiment

Finetuned
(1,039)
this model

Dataset used to train TahiraAbbas/bert-multilingual-imdb-sentiment