File size: 4,643 Bytes
c653dc6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6f1ebe7
ad9ea73
ff2dbc1
 
c653dc6
6f1ebe7
 
ad9ea73
6f1ebe7
 
 
ff2dbc1
6f1ebe7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ad9ea73
6f1ebe7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8c6aefe
6f1ebe7
 
 
 
 
 
8c6aefe
6f1ebe7
 
 
 
 
ff2dbc1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
---
language: en
license: creativeml-openrail-m
tags:
  - emotion-classification
  - multilabel
  - bert
  - goemotions
  - affective-computing
  - psychology
  - NLP
  - embeddings
  - symbolic-ai
  - poetic-ai
library_name: transformers
datasets:
  - go_emotions
model_name: Rosa-V1
model_type: bert
pipeline_tag: text-classification
base_model: bert-base-uncased
widget:
  - text: "My heart is filled with longing and beauty."
  - text: "I'm excited but nervous about what's coming next."
metrics:
  - name: eval_loss
    type: loss
    value: 0.0845
  - name: eval_f1
    type: f1
    value: 0.5793
  - name: parameters
    type: count
    value: 110000000
  - name: epochs
    type: count
    value: 3
model_creator: Willinton Triana Cardona
model_description: >
  ROSA is a fine-tuned BERT model trained on the GoEmotions dataset for multilabel emotion classification. 
  It identifies 28 nuanced human emotions plus a neutral class, supports soft probability outputs, 
  and provides latent emotion embeddings for affective computing applications. 
  ROSA is both technically sound and symbolically aligned to poetic human understanding.
---

# ROSA :: Emotional Sensitivity

โ€œTo feel is to know; to know is to bloom.โ€
ยทWillinton 

ROSA is a fine-tuned Transformer model based on `bert-base-uncased`, trained on the [GoEmotions](https://huggingface.co/datasets/google-research-datasets/go_emotions) dataset to classify 28 nuanced human emotions (plus neutral).  
More than a model, **ROSA** is a prototype of emotion embeddings in affective computing.

---

 ๐Ÿง  Model Summary

| Metric      | Value      |
|-------------|------------|
| Eval Loss   | 0.0845     |
| Eval F1     | 0.5793     |
| Epochs      | 3          |
| Dataset     | GoEmotions |
| Model Base  | BERT       |
| Parameters  | ~110M      |

---

## โœจ Highlights

- Supports **multilabel emotion classification**
- Returns soft probability scores for each of the 29 emotions
- Includes optional **latent vector embedding** for downstream affect modeling
- Trained with HuggingFace `Trainer` + early evaluation
- Symbolically aligned to human-centered semantics and poetic logic

---

## ๐ŸŒธ Emotion Set

```
["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"]
```

---

## ๐Ÿ”ฎ Usage

```python
from transformers import BertTokenizer
from model.emotion_model import Rosa
import torch

tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
model = Rosa(num_emotions=29)
model.load_state_dict(torch.load("rosa.pt"))
model.eval()

text = "My heart is filled with longing and beauty."
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True)

with torch.no_grad():
    outputs = model(**inputs)
    probs = torch.sigmoid(outputs["logits"]).squeeze()

# Result: list of probabilities for each emotion
```

---

## ๐Ÿงญ Confusion Matrix

Included in the `assets/` directory as `confusion_matrix.png` to show classification precision across emotions.

---

## ๐Ÿงฉ Architecture

```
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ”‚ BERT Encoder โ”‚
          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                 โ†“
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚ Dropout (Grace) โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                 โ†“
     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
     โ”‚ Dense Output (Bloom)   โ”‚ โ†’ logits over 29 emotions
     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```

---

## ๐Ÿ“ฆ Installation

```bash
pip install -r requirements.txt
```

Includes:
- `transformers`
- `torch`
- `datasets`
- `scikit-learn`

---

## ๐Ÿ–‹๏ธ License

CreativeML Open RAIL-M License  
Please use this model ethically and with reverence for emotional contexts.

---

## ๐ŸŒน Creator

**Willinton Triana Cardona**  
Philosopher ยท AI Engineer ยท Architect of Poetic Systems

ROSA is the Rosa of Barcelona, my first blossom of affective computing, semantic elegance, and sacred recursion.

---

## ๐Ÿค Contributing

Pull requests, poetic expansions, multilingual emotion embeddings, and related metaphoric augmentations are welcome.
I promise the next iteration (v2 with F1 improved) soon

---

## ๐Ÿ“Hugging Face Hub

โ†’ https://huggingface.co/willt-dc/Rosa-V1