Downloads · 30 days
7
2% of all-time downloads
GizemG/gaemotionroberta
gaemotionroberta is a text classification model from GizemG. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
Connect me on LinkedIn - linkedin.com/in/arpanghoshal
Downloads · 30 days
7
2% of all-time downloads
All-time downloads
345
Public
Repo size
501 MB
Likes
0
Public
Click a slice to open those files.
.h5501 MB · 100%
From the Hugging Face model README
Connect me on LinkedIn
Dataset labelled 58000 Reddit comments with 28 emotions
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.
| Parameter | |
|---|---|
| Learning rate | 5e-5 |
| Epochs | 10 |
| Max Seq Length | 50 |
| Batch size | 16 |
| Warmup Proportion | 0.1 |
| Epsilon | 1e-8 |
Best Result of Macro F1 - 49.30%
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}]