/ Модель

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

Контекст
514 токенов
Параметры
152 млн
Лицензия
Apache 2.0
Архитектура
emoaxis · dense
Библиотека
transformers
Опубликована
25 дек 2025

roberta-base-goemotions

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

Дообученная RoBERTa-base определяет несколько тонких категорий эмоций в англоязычном тексте по таксономии GoEmotions.

68скачиваний за 30 дней2лайкавеса обновлены1 фев 2026

Бенчмарки

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

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

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

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

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

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

Модель Hidden-States/roberta-base-goemotions разработана Subinoy Bera и Arnab Karmakar и дообучена на базе RoBERTa-base для многометочной классификации эмоций в англоязычном тексте. Она предсказывает категории таксономии GoEmotions: 27 эмоций и нейтральную метку. Гибридная цель обучения сочетает контрастивное обучение на сходстве с классификационной функцией потерь; размер модели — 151,8 млн параметров, контекст — до 514 токенов.

Модель предназначена для анализа коротких и средних текстов: публикаций в соцсетях, комментариев, обсуждений, отзывов и реплик диалога. Её можно запускать локально, в том числе на CPU; для текстового анализа она выдаёт оценки по категориям эмоций. В README приведены Macro-F1 0,56 и Micro-F1 0,62 на тестовой выборке GoEmotions.

Модель поддерживает английский язык и распространяется по лицензии Apache-2.0. Она не предназначена для мультиязычных или мультимодальных данных и не предсказывает эмоции за пределами 28 категорий GoEmotions. Результаты могут отражать смещения датасета и субъективность разметки; модель не проверена для критически важных применений, а её предсказания следует считать приблизительными сигналами.

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

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

Ограничения

Модель предназначена только для английского текста и категорий GoEmotions; она не поддерживает мультиязычные и мультимодальные входы. Предсказания приблизительны и могут отражать смещения датасета и субъективность разметки; модель не валидирована для критически важных применений.

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

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

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

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

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

Открыть на Hugging Face

🏷️ Model Details

This model is finetuned and optimized for fine-grained multi-label emotion classification task from text. The model employs a hybrid training objective that integrates similarity-based contrastive learning with a classification objective, instead of using the conventional binary cross-entropy (BCE) loss alone. This approach enables the model to capture both semantic alignment between text and emotion concepts and label-specific decision boundaries, resulting in improved performance on the imbalanced GoEmotions dataset.

This model is the Model II (Classifier-based) variant accounding in our paper, which has achieved the best performance. Please read your work for more details of the model architecture and training objectives used.

🎯 Also checkout our other models trained on EmoPillars and SemEval-18-Task-1C datasets.

✅ Intended Usage

The model is specifically intended for fine-grained multi-label emotion classification from text in both practical and research settings. It can be used to detect emotions from short to medium-length textual content such as social media posts, user comments, online discussions, reviews, and conversational text, where identifying fine-grained emotion categories give better insights.

The model is suitable for local and offline deployment for tasks such as emotion-aware text analysis, affective computing research, and downstream NLP applications that benefit from fine-grained emotion signals.

📊 Dataset Used

GoEmotions(Google Research, 2021): A large-scale multi-label emotion classification dataset, consisting of 58K English Reddit comments, manually annotated with 27 emotion categories plus a neutral label. The dataset is diverse and representative of real-world emotional language, consisting of informal grammar, sarcasm, and ambiguous or context-dependent cues. We have utilized the full 28-label GoEmotions taxonomy to train and evaluate the model.

📌 Model Performance (on Test)

The model is evaluated using standard multi-label metrics, with a focus on Macro-F1, which is widely regarded as the most informative metric for such imbalanced, multi-label emotion classification tasks.

  • Macro-F1 : 0.56
  • Micro-F1: 0.62
  • Precision: 0.57
  • Recall: 0.57
  • Accuracy (Hamming): 0.97

The table given below highlights the performance comparison of some existing benchmark models on the GoEmotions dataset :-

ModelMacro-PrecisionMacro-RecallMacro-F1
GPT-4 (Kok-Shun at et. 2023)0.100.170.13
BERT-base (GoEmotions Original)0.400.630.46
RoBERTa-base (SamLowe)0.570.390.45
BERT-base (Gargi et al. 2021)0.520.530.52
RoBERTa-large (Lakshya Kumar)--0.52
BERT-base (Ramakrishnan)0.540.560.54
RoBERTa-large (alex-shvets)0.580.580.55
RoBERTa-base (ours) (Model II)0.570.570.56

🏆 Therefore, our model outperformes existing baselines and achieves state-of-the-art performance among existing open-source models! 🥇

🚀 Get Started with the Model

import torch
from transformers import AutoTokenizer, AutoModel
from transformers import logging as transformers_logging
import warnings
warnings.filterwarnings("ignore")
transformers_logging.set_verbosity_error()

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

model_id = "Hidden-States/roberta-base-goemotions"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModel.from_pretrained(model_id, trust_remote_code=True)
model.to(device).eval()

emotion_labels = [
        "admiration", "amusement", "anger", "annoyance", "approval", "caring", 
        "confusion", "curiosity", "desire", "disappointment", "disapproval", 
        "disgust", "embarrassment", "excitement", "fear", "gratitude", "grief", 
        "joy", "love", "nervousness", "optimism", "pride", "realization", 
        "relief", "remorse", "sadness", "surprise", "neutral"
]

def predict_emotions(text):
  inputs = tokenizer(text, truncation=True, max_length=128,
                  padding=True, return_attention_mask=True, return_tensors="pt"
                ).to(device)
  _, logits = model(**inputs)

  probs = torch.sigmoid(logits)
  preds = (probs >= 0.5).int()[0]

  predicted_emotions = [
    emotion_labels[i]
    for i, v in enumerate(preds)
    if v.item() == 1
  ]
  print(predicted_emotions)

text = "Honestly, same. I was miserable at my admin asst job."
predict_emotions(text)

#output: ['disappointment', 'sadness']

🛠️ Training Hyperparameters and Details

ParameterValue
encoder lr-rate2.5e-5
classifier lr-rate1.5e-4
lr-schedulercosine with warmup
optimizerAdamW
weight decay0.001
warmup ratio0.1
temperature0.05
clipping constant0.04
batch size64
epochs10
threshold0.5 (fixed)

Check out our paper for complete training details and objectives used: Visit ↗️

💻 Compute Infrastructure

  • Inference: Any modern x86 CPU with minimum 8 GB RAM. GPU is optional, not required for inference.

  • Training/ Fine-Tuning: Must use GPU with at least 12 GB of VRAM. This model has been trained in Google Colab environment with single T4 GPU.

  • Libraries/ Modules

    1. Transformers : 4.57.3
    2. Pytorch : 2.8.0+cu129
    3. Datasets : 4.4.1
    4. Scikit-learn : 1.8.0
    5. Numpy : 2.3.5

⚠️ Out-of-Scope Use

The model cannot be directly used for detecting emotions from multi-lingual or multi-modal data/text, and cannot predict emotions beyond the 28-label GoEmotions-taxonomy. While the proposed approach demonstrates strong empirical performance on benchmark datasets, it is not designed, evaluated, or validated for deployment in high-stakes or safety-critical applications. The model may reflect dataset-specific biases, annotation subjectivity, and cultural limitations inherent in emotion datasets. Predictions should therefore be interpreted as approximate signals rather than definitive emotional states.

Users are responsible for ensuring that any downstream application complies with relevant ethical guidelines, legal regulations, and domain-specific standards.

🎗️ Community Support & Citation

If you find this model useful, please consider liking this repository and also give a star to our GitHub repository. Your support helps us improve and maintain this work! ⭐

📝 If you use our work in academic or research settings, please cite our work accordingly. 🙏😃

THANK YOU!! 🧡🤍💚 - with regards: Hidden States AI Labs

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

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

GPU в ailist

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

Нельзя запустить

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
EmoAxis
Ревизия весов
f93dd97

0 моделей