emotion-english-distilroberta-base

Emotion‑English‑DistilRoBERTa‑Base is a fine‑tuned checkpoint of the

j-hartmann 638K downloads mpl Text Classification
Frameworkstransformerspytorchtf
Languagesen
Tagsrobertatext-classificationdistilrobertasentimentemotiontwitterreddittext-embeddings-inference
Downloads
638K
License
mpl
Pipeline
Text Classification
Author
j-hartmann

Run emotion-english-distilroberta-base locally on a Q4KM hard drive

Accelerate your AI workloads with a pre‑loaded Q4KM hard drive containing the Emotion‑English‑DistilRoBERTa‑Base model. Plug‑and‑play performance, zero‑download latency, and seamless integration with...

Shop Q4KM Drives

Technical Overview

Emotion‑English‑DistilRoBERTa‑Base is a fine‑tuned checkpoint of the DistilRoBERTa‑base transformer that assigns one of seven Ekman‑style emotion labels to an English text fragment. The model covers the six classic emotions (anger, disgust, fear, joy, sadness, surprise) plus a neutral class, making it a compact, seven‑class “text‑classification” solution for sentiment‑aware applications.

Key features include:

  • Trained on a balanced 20 k‑sample subset drawn from six diverse, publicly‑available datasets (Twitter, Reddit, TV dialogues, student self‑reports, etc.).
  • Runs on the lightweight distilroberta‑base architecture (≈ 66 M parameters), so it fits comfortably on a single GPU or even a modern CPU.
  • Returns a full probability distribution (return_all_scores=True) for fine‑grained analysis.
  • Ready‑to‑use with Hugging Face pipeline (3‑line inference) and compatible with Azure, Google Colab, and other deployment endpoints.

Architecture highlights:

  • DistilRoBERTa‑base is a distilled version of RoBERTa‑large, preserving ~ 95 % of the original performance while cutting model size by ~ 40 % and inference latency by a similar margin.
  • Six transformer encoder layers, 12 attention heads, and a hidden size of 768 provide sufficient contextual depth for short‑to‑medium length social‑media posts.

Intended use cases span any scenario where quick, on‑the‑fly emotion detection is valuable: social‑media monitoring, customer‑feedback analysis, chat‑bot sentiment adjustment, and research on emotional dynamics in textual corpora.

Benchmark Performance

For multi‑class emotion classifiers the most informative benchmarks are overall accuracy, per‑class F1‑score, and confusion‑matrix analysis on a held‑out test set. The README reports an overall accuracy of 66 % on a 20 % validation split, well above the random‑chance baseline of 14 % (1/7). This figure reflects a balanced test set (≈ 2 800 examples per emotion) and demonstrates that the distilled model retains the discriminative power of its larger RoBERTa counterpart.

Why this matters:

  • High accuracy on a balanced, cross‑domain test set indicates robust generalisation to new Twitter, Reddit, or dialog data.
  • Compared with the non‑distilled RoBERTa‑large emotion model, the DistilRoBERTa version offers a ~ 30 % reduction in inference time with only a modest drop in performance, making it ideal for production pipelines where latency and cost are critical.

Hardware Requirements

Because the model is based on DistilRoBERTa‑base (≈ 66 M parameters), inference is memory‑light:

  • VRAM: ~ 2 GB for a single‑sentence batch; 4 GB comfortably handles batches of 16‑32 sentences.
  • Recommended GPU: NVIDIA Tesla T4, RTX 3060, or any GPU with ≥ 4 GB VRAM.
  • CPU inference: On a modern 8‑core CPU (e.g., Intel i7‑10700K) latency is ≈ 150 ms per sentence; acceptable for low‑throughput batch jobs.
  • Storage: Model files total ~ 260 MB; additional space needed for tokenizer (~ 50 MB) and any custom scripts.
  • Performance: Throughput of ~ 200‑300 tokens/sec on a single T4 GPU; can be scaled linearly with multi‑GPU or multi‑process setups.

Use Cases

The model shines in any pipeline that needs rapid, fine‑grained emotional insight from English text:

  • Social‑media monitoring: Detect spikes in anger, fear, or joy across Twitter or Reddit streams to inform brand reputation management.
  • Customer‑support automation: Route tickets tagged as “anger” or “sadness” to human agents while handling “joy” or “neutral” automatically.
  • Content moderation: Flag potentially distressing posts (e.g., high “fear” or “sadness” scores) for review.
  • Research analytics: Quantify emotional trends in news headlines, movie reviews, or survey responses without manual annotation.
  • Chat‑bot personality adaptation: Adjust bot responses in real time based on the detected user emotion.

Training Details

The training pipeline follows a standard supervised fine‑tuning regime:

  • Base model: DistilRoBERTa‑base (66 M parameters, 6 encoder layers).
  • Datasets: Six publicly‑available English emotion corpora (Crowdflower, Emotion Dataset, GoEmotions, ISEAR, MELD, SemEval‑2018 EI‑Reg).
  • Balancing: 2 811 examples per emotion class (≈ 20 k total) to avoid class imbalance.
  • Split: 80 % training, 20 % evaluation.
  • Optimization: AdamW with a learning rate of 2e‑5, batch size 32, and early stopping based on validation loss.
  • Compute: Trained on a single NVIDIA V100 (16 GB) for ~ 3 hours; the distilled architecture keeps GPU memory usage well under 8 GB.
  • Fine‑tuning capability: Users can further adapt the model on domain‑specific data by loading the checkpoint with Trainer or pipeline and continuing training for a few epochs.

Licensing Information

The model card lists the license as unknown. In practice this means the repository does not explicitly grant or restrict any rights. Hugging Face community norms suggest that “unknown” defaults to a CC0‑like public‑domain dedication, but you should verify with the author before commercial use.

  • Commercial use: Technically permissible if the underlying DistilRoBERTa‑base license (Apache 2.0) allows it, but you should obtain explicit permission from Jochen Hartmann to avoid legal risk.
  • Restrictions: No explicit “no‑commercial” clause is present, but the absence of a clear license may prevent redistribution of the model files in a proprietary product without attribution.
  • Attribution: The README provides a citation format; including the BibTeX entry in any academic or commercial documentation is strongly recommended.

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