roberta base go_emotions

SamLowe

Introduction

The roberta-base-go_emotions model, developed by SamLowe, is a text classification model designed for multi-label classification tasks. It is based on the RoBERTa architecture and trained using the GoEmotions dataset, which consists of Reddit data labeled with 28 emotion categories.

Architecture

The model utilizes the RoBERTa base architecture, a transformer-based model known for its robust performance in natural language processing tasks. The model is trained for multi-label classification, allowing it to predict multiple emotions for a given input text.

Training

The model was trained using the AutoModelForSequenceClassification.from_pretrained method with a focus on multi-label classification. Training was conducted over 3 epochs with a learning rate of 2e-5 and a weight decay of 0.01. The GoEmotions dataset, containing 28 labels, was employed, making the model capable of producing 28 probability outputs for each input text.

Guide: Running Locally

  1. Install Hugging Face Transformers: Ensure you have the transformers library installed using pip install transformers.
  2. Load the Model: Use the following code snippet to load and run the model:
    from transformers import pipeline
    
    classifier = pipeline(task="text-classification", model="SamLowe/roberta-base-go_emotions", top_k=None)
    sentences = ["I am not having a great day"]
    model_outputs = classifier(sentences)
    print(model_outputs[0])
    
  3. Cloud GPUs: For faster inference, especially with larger datasets, consider using cloud GPUs provided by services such as AWS, Google Cloud, or Azure.

License

The roberta-base-go_emotions model is distributed under the MIT License, allowing for open use, modification, and distribution under its terms.

More Related APIs in Text Classification