/ Модель

Характеристики

Контекст
514 токенов
Параметры
659 млн
Лицензия
OpenRAIL++
Архитектура
xlm-roberta · dense
Базовая модель
multilingual-e5-large
Библиотека
transformers
Опубликована
26 мая 2025

ukr-emotions-classifier

Классификация текстаТекст → label4 профессии

Модель классифицирует украинские тексты по шести базовым эмоциям и определяет отсутствие эмоций.

447скачиваний за 30 дней2лайкавеса обновлены5 авг 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

ukr-detect/ukr-emotions-classifier — модель классификации текста, разработанная ukr-detect для распознавания эмоций в украинских текстах. Она дообучена на intfloat/multilingual-e5-large на обучающей части набора ukr-detect/ukr-emotions-binary и использует архитектуру XLM-RoBERTa с классификационной головой. Модель содержит 658,7 млн параметров, принимает текст с контекстом до 514 токенов и для каждой эмоции выдаёт метку 0 или 1.

Классификатор определяет радость, гнев, страх, отвращение, удивление, грусть и отсутствие этих эмоций. Он допускает несколько эмоций одновременно и подходит для анализа сообщений и других коротких украинских текстов. В отчёте на тестовой части датасета F1 для радости составил 0,73, для страха — 0,81, для гнева — 0,31; качество зависит от класса, а низкий recall для гнева указывает на частые пропуски этой эмоции. Лицензия модели — OpenRAIL++; перед использованием следует учитывать её условия.

Сценарии применения

  • определение радости в украинских сообщениях
  • поиск гнева и раздражения в отзывах
  • выявление страха и тревоги в текстах
  • анализ эмоциональной тональности украинских публикаций
  • разметка текстов несколькими эмоциями одновременно

Ограничения

Модель обучена на конкретном украинском датасете, поэтому качество на других жанрах и типах текстов может отличаться. На тестовой выборке recall для гнева составил 0,25, что указывает на риск пропуска этой эмоции.

Для каких профессий подходит4

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

EmoBench-UA: Emotions Detection in Ukrainian Texts

Model Details

We provide the first of its kind emotions detector in Ukrainian texts. We cover six basic emotions: Joy, Anger, Fear, Disgust, Surprise, Sadness -- and None. Any text can contain any amount of emotion -- only one, several, or none at all. The texts with None emotions are the ones where the labels per emotions classes are 0.

The base model intfloat/multilingual-e5-large was fine-tuned for multi-label emotions classification task on the train part of ukr-emotions-binary dataset.

Usage: The model outputs 0 or 1 indicating the presence of the emotion in the text. Thus, this model can be used to detect any basic emotions presence or their absence in the Ukrainian texts.

Evaluation Results

General classification report of our model on the test part of ukr-emotions-binary:

precisionrecallf1-scoresupport
Joy0.690.780.73368
Fear0.800.810.81151
Anger0.410.250.3199
Sadness0.670.710.69298
Disgust0.630.240.3579
Surprise0.520.720.60175
None0.820.800.811108
micro avg0.730.740.732278
macro avg0.650.620.622278
weighted avg0.730.740.732278
samples avg0.720.740.722278

How to Get Started with the Model

We provide the code to get started with the model:

import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification

# 1. Set up model & tokenizer (update model_name as needed)
model_name = "ukr-detect/emotions_classifier"  # Or path to local dir
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
model.eval()  # For inference

# 2. Define thresholds (must match the order of model's id2label)
thresholds = {
    "Joy": 0.35,
    "Fear": 0.5,
    "Anger": 0.25,
    "Sadness": 0.5,
    "Disgust": 0.3,
    "Surprise": 0.25,
    "None": 0.35
}

# 3. Prepare a function for prediction
def predict_emotions(texts):
    # Tokenize
    enc = tokenizer(texts, padding=True, truncation=True, return_tensors="pt")
    with torch.no_grad():
        outputs = model(**enc)
        logits = outputs.logits
        probs = torch.sigmoid(logits)
    
    # Get label mapping in correct order
    id2label = model.config.id2label
    label_order = [id2label[i] for i in range(len(id2label))]
    
    # Threshold and get predictions
    predictions = []
    for prob_row in probs:
        single_pred = [
            label for label, prob in zip(label_order, prob_row.tolist())
            if prob > thresholds[label]
        ]
        predictions.append(single_pred)
    return predictions

# 4. Example usage
texts = [
    "Я щойно отримав підвищення на роботі!",
    "Я хвилююся за майбутнє.",
    "я не буду заради тебе, Гані і Каті терпіти того пйоса",
    "Сьогодні нічого не сталося.",
    "всі чомусь плутають, а мені то дивно так )))",
    " ого, то зовсім не приємно(("
]

results = predict_emotions(texts)
for t, r in zip(texts, results):
    print(f"Text: {t}\nEmotions: {r}\n")

# Expected output

Text: Я щойно отримав підвищення на роботі!
Emotions: ['Joy', 'Surprise']

Text: Я хвилююся за майбутнє.
Emotions: ['Fear']

Text: я не буду заради тебе, Гані і Каті терпіти того пйоса
Emotions: ['Anger', 'Disgust']

Text: Сьогодні нічого не сталося.
Emotions: ['None']

Text:  всі чомусь плутають, а мені то дивно так )))
Emotions: ['Surprise']

Text:  ого, то зовсім не приємно((
Emotions: ['Sadness']

Citation

If you would like to acknowledge our work, please, cite the following manuscript:

@inproceedings{dementieva-etal-2025-emobench,
    title = "{E}mo{B}ench-{UA}: A Benchmark Dataset for Emotion Detection in {U}krainian",
    author = "Dementieva, Daryna  and
      Babakov, Nikolay  and
      Fraser, Alexander",
    editor = "Christodoulopoulos, Christos  and
      Chakraborty, Tanmoy  and
      Rose, Carolyn  and
      Peng, Violet",
    booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2025",
    month = nov,
    year = "2025",
    address = "Suzhou, China",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2025.findings-emnlp.107/",
    doi = "10.18653/v1/2025.findings-emnlp.107",
    pages = "2025--2048",
    ISBN = "979-8-89176-335-7",
    abstract = "While Ukrainian NLP has seen progress in many texts processing tasks, emotion classification remains an underexplored area with no publicly available benchmark to date. In this work, we introduce \textbf{EmoBench-UA}, the first annotated dataset for emotion detection in Ukrainian texts. Our annotation schema is adapted from the previous English-centric works on emotion detection (Mohammad et al., 2018; Mohammad, 2022) guidelines. The dataset was created through crowdsourcing using the Toloka.ai platform ensuring high-quality of the annotation process. Then, we evaluate a range of approaches on the collected dataset, starting from linguistic-based baselines, synthetic data translated from English, to large language models (LLMs). Our findings highlight the challenges of emotion classification in non-mainstream languages like Ukrainian and emphasize the need for further development of Ukrainian-specific models and training resources."
}

Contacts

Nikolay Babakov, Daryna Dementieva

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers · text-classification

Можно запустить

Подбираем GPU…

Класс архитектуры
XLMRobertaForSequenceClassification
Ревизия весов
8cf6200

0 моделей