Downloads · 30 days
11
6% of all-time downloads
hancheolp/ambiguity-aware-roberta-emotion
ambiguity-aware-roberta-emotion is a machine learning model from hancheolp. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This model is trained on SemEval2007 Task 14 Affective Text dataset and is capable of representing the ambiguity occurring in emotion analysis tasks as an accurate distribution (i.e., softmax output). It was introduce…
Downloads · 30 days
11
6% of all-time downloads
All-time downloads
185
Public
Parameters
118M
941 MB on disk
Likes
0
Public
Click a slice to open those files.
.bin470 MB · 50%
How the weights are stored.
F32118M · 100%
From the Hugging Face model README
This model is trained on SemEval2007 Task 14 Affective Text dataset and is capable of representing the ambiguity occurring in emotion analysis tasks as an accurate distribution (i.e., softmax output). It was introduced in the following paper: "Deep Model Compression Also Helps Models Capture Ambiguity" (ACL 2023).
from transformers import RobertaTokenizer, RobertaForSequenceClassification
tokenizer = RobertaTokenizer.from_pretrained('hancheolp/ambiguity-aware-roberta-emotion')
model = RobertaForSequenceClassification.from_pretrained('hancheolp/ambiguity-aware-roberta-emotion')
news_headline = "Amateur rocket scientists reach for space."
encoded_input = tokenizer(news_headline, return_tensors='pt')
output = model(**encoded_input)
distribution = output.logits.softmax(dim=-1)
Each index of the output vector represents the following: