Text Classification
Transformers
PyTorch
TensorFlow
JAX
Safetensors
Russian
bert
sentiment-analysis
multi-class-classification
sentiment analysis
rubert
sentiment
tiny
russian
multiclass
classification
text-embeddings-inference
Run this model with HF Jobs
Run seara/rubert-tiny2-russian-sentiment on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/seara/rubert-tiny2-russian-sentiment. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/seara/rubert-tiny2-russian-sentiment on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use seara/rubert-tiny2-russian-sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use seara/rubert-tiny2-russian-sentiment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="seara/rubert-tiny2-russian-sentiment")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("seara/rubert-tiny2-russian-sentiment") model = AutoModelForSequenceClassification.from_pretrained("seara/rubert-tiny2-russian-sentiment", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Create README.md
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980---license: mitlanguage:- rumetrics:- f1- roc_auc- precision- recallpipeline_tag: text-classificationtags:- rubert- sentimentdatasets:- sismetanin/rureviews- RuSentiment- LinisCrowd2015- LinisCrowd2016- KaggleRussianNews---
This is [RuBERT-tiny2](https://huggingface.co/cointegrated/rubert-tiny2) model fine-tuned for __sentiment classification__ of short __Russian__ texts.The task is a __multi-class classification__ with the following labels:
```yaml0: neutral1: positive2: negative```
## Usage
```pythonfrom transformers import pipelinemodel = pipeline(model="seara/rubert-tiny2-russian-sentiment")model("Привет, ты мне нравишься!")# [{'label': 'positive', 'score': 0.9398769736289978}]```
## Dataset
This model was trained on the union of the following datasets:
- Kaggle Russian News Dataset- Linis Crowd 2015- Linis Crowd 2016- RuReviews- RuSentiment
An overview of the training data can be found on [S. Smetanin Github repository](https://github.com/sismetanin/sentiment-analysis-in-russian).
__Download links for all Russian sentiment datasets collected by Smetanin can be found in this [repository](https://github.com/searayeah/russian-sentiment-emotions-datasets).__
## Training
Training were done in this [project](https://github.com/searayeah/vkr-bert) with this parameters:
```yamlmax_length: 512batch_size: 64optimizer: adamlr: 0.00001weight_decay: 0num_epochs: 5```
Train/validation/test splits are 80%/10%/10%.
## Eval results (on test split)
| |neutral|positive|negative|macro avg|weighted avg||---------|-------|--------|--------|---------|------------||precision|0.69 |0.83 |0.74 |0.75 |0.75 ||recall |0.73 |0.82 |0.68 |0.75 |0.75 ||f1-score |0.71 |0.83 |0.71 |0.75 |0.75 ||support |5196 |3831 |3599 |12626 |12626 ||auc-roc |0.84 |0.95 |0.90 |0.90 |0.89 |
README.mdAdded+80