top of page

๐„๐ฆ๐จ๐‘๐จ๐๐„๐‘๐“๐š ๐ฉ๐ซ๐ž๐๐ข๐œ๐ญ๐ฌ ๐Ÿ๐Ÿ• ๐ž๐ฆ๐จ๐ญ๐ข๐จ๐ง๐ฌ ๐จ๐ซ ๐ง๐ž๐ฎ๐ญ๐ซ๐š๐ฅ ๐Ÿ๐ซ๐จ๐ฆ ๐ญ๐ก๐ž ๐ญ๐ž๐ฑ๐ญ.

Itโ€™s now around 160k downloads per month :โ€™)


RoBERTa + go_emotions = ๐„๐ฆ๐จ๐‘๐จ๐๐„๐‘๐“๐š


My first model on Hugging Face (An open-source AI platform). ๐Ÿค—


Have a try on this link! (Interactive-link)

https://huggingface.co/arpanghoshal/EmoRoBERTa


Check out how your text feels. ๐Ÿ‘ป


Want me to write on how I created this model? Like this post!





Description

What is GoEmotions?

Dataset labelled 58000 Reddit comments with 28 emotions

  • 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

What is RoBERTa?

  • RoBERTa builds on BERTโ€™s language masking strategy and modifies key hyperparameters in BERT, including removing BERTโ€™s next-sentence pretraining objective, and training with much larger mini-batches and learning rates. RoBERTa was also trained on an order of magnitude more data than BERT, for a longer amount of time. This allows RoBERTa representations to generalize even better to downstream tasks compared to BERT.

Hyperparameters

  • ParameterLearning rate: 5e-5

  • Epochs: 10

  • Max Seq Length: 50

  • Batch size: 16

  • Warmup Proportion: 0.1

  • Epsilon: 1e-8

Results

Best Result of Macro F1 - 49.30%


Usage

from transformers import RobertaTokenizerFast, TFRobertaForSequenceClassification, pipeline

tokenizer = RobertaTokenizerFast.from_pretrained("arpanghoshal/EmoRoBERTa")
model = TFRobertaForSequenceClassification.from_pretrained("arpanghoshal/EmoRoBERTa")

emotion = pipeline('sentiment-analysis', 
                    model='arpanghoshal/EmoRoBERTa')

emotion_labels = emotion("Thanks for using it.")
print(emotion_labels)

Output

[{'label': 'gratitude', 'score': 0.9964383244514465}]    



173 views

Recent Posts

See All
bottom of page