Downloads · 30 days
0
Natlis/rubert-emotion-classification-ru
rubert-emotion-classification-ru is a text classification model from Natlis. Use it when you need a label for a piece of text. It is set up for custom. The card lists the license as apache-2.0.
Четырёхклассовый классификатор эмоционального тона реплики по транскрипту: angry, sad, neutral, positive (маппинг angry=0, sad=1, neutral=2, positive=3).
Downloads · 30 days
0
Access
Public
Updated Sep 1, 2026
Repo size
714 MB
Likes
0
Public
Click a slice to open those files.
.pt714 MB · 99%
From the Hugging Face model README
Четырёхклассовый классификатор эмоционального тона реплики по транскрипту:
angry, sad, neutral, positive (маппинг angry=0, sad=1, neutral=2, positive=3).
DeepPavlov/rubert-base-cased → [CLS] → Linear → GELU → Dropout → Linear.encoder.layer.6–11.dusha_resd_train (69 119 реплик) = Dusha + RESD.AutoTokenizer (папка токенизатора в этом репозитории).Оценка на dusha_resd_test (6616 реплик), усреднение по 5 сидам.
| Split | Corpus | Accuracy | F1-macro |
|---|---|---|---|
| test | dusha_resd | 0.586 | 0.601 |
import torch
from huggingface_hub import hf_hub_download, snapshot_download
from transformers import AutoTokenizer
ckpt_path = hf_hub_download(
"Natlis/rubert-emotion-classification-ru",
"RuBERT_dusha_resd_train_model.pt",
)
tok_dir = snapshot_download(
"Natlis/rubert-emotion-classification-ru",
allow_patterns=["RuBERT_dusha_resd_train_tokenizer/*"],
)
tokenizer = AutoTokenizer.from_pretrained(tok_dir)
# Чекпоинт — единый формат dict (см. utils/model_io.py репозитория проекта):
ckpt = torch.load(ckpt_path, map_location="cpu")
print(ckpt["model_class"], ckpt["model_params"])
Для воспроизведения архитектуры и предсказаний используйте код проекта
(https://github.com/Natl1s/RuIntona), text_models/transformers/RuBERT.py:
модель EmotionClassifier воссоздаётся из ckpt["model_params"].
Полные гиперпараметры — в configs/text/rubert.json проекта
(seed 42, lr 2e-5, warmup 0.1, batch 16, grad-accum 8, max_len 128, label_smoothing 0.05).
Веса лицензированы Apache-2.0 (бэкбон DeepPavlov/rubert-base-cased, Apache-2.0).
Полный текст — LICENSE, обязательства по атрибуции и данные обучения — NOTICE.
Dusha — Kondratenko et al., arXiv:2212.12266. RESD — Aniemore, DOI 10.57967/hf/1272.
Подробности и bibtex — в DUSHA.md / RESD.md кодового репозитория.