Run this model with HF Jobs

Run blanchefort/rubert-base-cased-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/blanchefort/rubert-base-cased-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/blanchefort/rubert-base-cased-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.

RuBERT for Sentiment Analysis

Short Russian texts sentiment classification

This is a DeepPavlov/rubert-base-cased-conversational model trained on aggregated corpus of 351.797 texts.

Labels

0: NEUTRAL
1: POSITIVE
2: NEGATIVE

How to use


import torch
from transformers import AutoModelForSequenceClassification
from transformers import BertTokenizerFast

tokenizer = BertTokenizerFast.from_pretrained('blanchefort/rubert-base-cased-sentiment')
model = AutoModelForSequenceClassification.from_pretrained('blanchefort/rubert-base-cased-sentiment', return_dict=True)

@torch.no_grad()
def predict(text):
    inputs = tokenizer(text, max_length=512, padding=True, truncation=True, return_tensors='pt')
    outputs = model(**inputs)
    predicted = torch.nn.functional.softmax(outputs.logits, dim=1)
    predicted = torch.argmax(predicted, dim=1).numpy()
    return predicted

Datasets used for model training

RuTweetCorp

Рубцова Ю. Автоматическое построение и анализ корпуса коротких текстов (постов микроблогов) для задачи разработки и тренировки тонового классификатора //Инженерия знаний и технологии семантического веба. – 2012. – Т. 1. – С. 109-116.

RuReviews

RuReviews: An Automatically Annotated Sentiment Analysis Dataset for Product Reviews in Russian.

RuSentiment

A. Rogers A. Romanov A. Rumshisky S. Volkova M. Gronas A. Gribov RuSentiment: An Enriched Sentiment Analysis Dataset for Social Media in Russian. Proceedings of COLING 2018.

Отзывы о медучреждениях

Датасет содержит пользовательские отзывы о медицинских учреждениях. Датасет собран в мае 2019 года с сайта prodoctorov.ru

Downloads last month
19,823
Safetensors
Model size
0.2B params
Tensor type
I64
·
F32
·
Inference Providers NEW

Model tree for blanchefort/rubert-base-cased-sentiment

Finetunes
1 model
Quantizations
1 model

Spaces using blanchefort/rubert-base-cased-sentiment 25