roberta-base-go_emotions

SamLowe/roberta-base-go_emotions

SamLowe 461K downloads mit Text Classification
Frameworkstransformerspytorchsafetensors
Languagesen
Datasetsgo_emotions
Tagsrobertatext-classificationemotionsmulti-class-classificationmulti-label-classificationdoi:10.57967/hf/3548text-embeddings-inference
Downloads
461K
License
mit
Pipeline
Text Classification
Author
SamLowe

Run roberta-base-go_emotions locally on a Q4KM hard drive

Boost your AI workflow with a pre‑loaded Q4KM hard drive that ships roberta‑base‑go_emotions ready for instant deployment. Enjoy ultra‑fast local inference, zero‑download latency, and seamless...

Shop Q4KM Drives

Technical Overview

Model ID: SamLowe/roberta-base-go_emotions
Model Name: roberta-base-go_emotions
Author: SamLowe

The roberta-base-go_emotions model is a fine‑tuned version of the Hugging Face roberta‑base transformer, repurposed for multi‑label emotion detection on English text. It ingests a sentence or paragraph and returns a 28‑dimensional vector of probabilities, each dimension corresponding to one of the emotion categories defined in the GoEmotions dataset (e.g., joy, anger, gratitude). Because the task is multi‑label, a single input can be associated with any combination of emotions, making the model suitable for nuanced sentiment analysis where more than one feeling may be present.

Key Features & Capabilities

  • Multi‑label classification with 28 emotion tags.
  • Outputs probability scores (float) for each label; a default threshold of 0.5 is recommended for binary decisions.
  • Supports the Hugging Face pipeline API for rapid prototyping.
  • Available in ONNX and INT8‑quantized ONNX formats for low‑latency, cross‑platform inference.
  • Fully compatible with model card, files repository, and community discussions.

Architecture Highlights

  • Base architecture: RoBERTa‑base (12 transformer layers, 768 hidden size, 12 attention heads).
  • Fine‑tuned head: AutoModelForSequenceClassification with problem_type="multi_label_classification".
  • Training hyper‑parameters: 3 epochs, learning rate 2e‑5, weight decay 0.01.
  • Inference‑optimized ONNX variants reduce model size by up to 75 % while preserving accuracy.

Intended Use Cases

  • Customer‑service sentiment monitoring.
  • Social‑media emotion analytics.
  • Content moderation systems that need to detect toxic or distressing emotions.
  • Human‑computer interaction where nuanced affective feedback improves user experience.

Benchmark Performance

The model was evaluated on the official GoEmotions test split using a 0.5 probability threshold to binarize each label. Overall metrics are:

  • Accuracy: 0.474
  • Precision: 0.575
  • Recall: 0.396
  • F1‑Score: 0.450

Per‑label results show strong performance on high‑frequency emotions such as gratitude (F1 = 0.919) and love (F1 = 0.802), while rare categories like grief suffer from low support. These benchmarks matter because multi‑label emotion detection requires balanced precision‑recall trade‑offs across heterogeneous classes. Compared to other RoBERTa‑based emotion classifiers, the roberta‑base‑go_emotions model offers competitive F1 scores while maintaining a relatively small footprint (≈ 125 M parameters) and benefiting from the ONNX quantized variant for faster inference.

Hardware Requirements

Inference with the standard PyTorch checkpoint typically needs ≈ 4 GB VRAM for a batch size of 1 on a modern GPU (e.g., NVIDIA RTX 3060 or higher). The INT8‑quantized ONNX version can run comfortably on 2 GB VRAM, making it ideal for edge devices or CPU‑only deployments.

  • GPU recommendation: NVIDIA GeForce RTX 2070 + (8 GB VRAM) for batch processing; RTX 3060 + for real‑time low‑latency pipelines.
  • CPU: 8‑core x86‑64 with AVX2 support; inference speed ~30 ms per sentence on a 2.6 GHz Intel i7.
  • Storage: Model files total ≈ 500 MB (PyTorch) or ≈ 125 MB (INT8‑ONNX). Additional space needed for tokenizer (~30 MB).
  • Performance characteristics: ONNX INT8 version reduces latency by up to 3× for single‑sentence inference, while maintaining > 95 % of the original F1 score.

Use Cases

The roberta‑base‑go_emotions model excels in any scenario where detecting multiple emotions from short‑to‑medium length English text is valuable.

  • Customer experience analytics: Automatically tag support tickets with emotions (e.g., frustration, gratitude) to prioritize responses.
  • Social‑media monitoring: Track public sentiment across campaigns by tagging tweets, Reddit posts, or Facebook comments with nuanced emotions.
  • Content moderation: Flag potentially harmful content that conveys anger, disgust, or fear for human review.
  • Therapeutic chatbots: Enable virtual agents to recognize user affect and adapt responses empathetically.
  • Market research: Analyze product reviews for mixed emotions (e.g., love for features but annoyance about price).

Training Details

The model was fine‑tuned from the Hugging Face roberta-base checkpoint using the AutoModelForSequenceClassification API with problem_type="multi_label_classification". Training ran for 3 epochs on the full GoEmotions dataset, employing a learning rate of 2 × 10⁻⁵ and weight decay of 0.01. The optimizer was AdamW, and the loss function was binary cross‑entropy with logits (BCEWithLogitsLoss). No data augmentation or oversampling was applied; the model relies on the natural class imbalance present in the dataset.

  • Compute: Trained on a single NVIDIA V100 (16 GB) GPU; total training time ≈ 2 hours.
  • Fine‑tuning: Users can further fine‑tune on domain‑specific corpora by loading the checkpoint with AutoModelForSequenceClassification and adjusting the problem_type if needed.
  • Tokenizer: Uses the RoBERTa WordPiece tokenizer; no additional vocab changes required.

Licensing Information

The model is released under the MIT license (as indicated in the README tags), which is a permissive open‑source license. The “unknown” entry in the metadata refers to the Hugging Face repo’s default placeholder; the explicit license: mit tag overrides it.

  • Commercial use: Allowed. You may embed the model in SaaS products, mobile apps, or any commercial service without paying royalties.
  • Restrictions: None beyond the standard MIT clause that the software is provided “as is” without warranty.
  • Attribution: Required. Include the original copyright notice and license text in any distribution or documentation.
  • Derivative works: You may modify, fine‑tune, or re‑package the model, provided you retain the MIT notice.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives