yeshpanovrustem/100k_movie_reviews_from_kz
Viewer • Updated • 212k • 198 • 1
How to use yeshpanovrustem/rembert-sentiment-analysis-polarity-classification with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="yeshpanovrustem/rembert-sentiment-analysis-polarity-classification") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("yeshpanovrustem/rembert-sentiment-analysis-polarity-classification")
model = AutoModelForSequenceClassification.from_pretrained("yeshpanovrustem/rembert-sentiment-analysis-polarity-classification", device_map="auto")This is a RemBERT model fine-tuned for sentiment analysis on movie reviews in Russian and/or Kazakh. It predicts the polarity of a review as positive, negative, or neutral. The model was fine-tuned on 100,000+ Movie Reviews from Kazakhstan.
| Model | Accuracy | Precision | Recall | F1 | Kappa |
|---|---|---|---|---|---|
| RemBERT | 0.95 | 0.84 | 0.81 | 0.82 | 0.88 |
You can use this model with the Transformers pipeline for text classification.
from transformers import AutoModelForSequenceClassification
from transformers import AutoTokenizer
from transformers import TextClassificationPipeline
model = AutoModelForSequenceClassification.from_pretrained("yeshpanovrustem/rembert-sentiment-analysis-polarity-classification")
tokenizer = AutoTokenizer.from_pretrained("yeshpanovrustem/rembert-sentiment-analysis-polarity-classification")
pipe = TextClassificationPipeline(model = model, tokenizer = tokenizer)
reviews = ["Довольно интересное кино.", "Бұл фильмнің мағынасын түсінбедім."]
for review in reviews:
print(pipe(review))
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Macro | Kappa |
|---|---|---|---|---|---|---|
| 0.1789 | 1.0 | 4001 | 0.2144 | 0.9340 | 0.7629 | 0.8529 |
| 0.1307 | 2.0 | 8002 | 0.1944 | 0.9414 | 0.8051 | 0.8699 |
Base model
google/rembert