seara commited on
Commit
39c2469
1 Parent(s): 9c70ecb

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +67 -0
README.md ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - ru
5
+ metrics:
6
+ - f1
7
+ - roc_auc
8
+ - precision
9
+ - recall
10
+ pipeline_tag: text-classification
11
+ tags:
12
+ - rubert
13
+ - emotion
14
+ - emotion-classification
15
+ datasets:
16
+ - cedr
17
+ ---
18
+
19
+ This is [RuBERT-tiny2](https://huggingface.co/cointegrated/rubert-tiny2) model fine-tuned for __emotion classification__ of short __Russian__ texts.
20
+ The task is a __multi-label classification__ with the following labels:
21
+
22
+ ```yaml
23
+ 0: no_emotion
24
+ 1: joy
25
+ 2: sadness
26
+ 3: surprise
27
+ 4: fear
28
+ 5: anger
29
+ ```
30
+
31
+ ## Usage
32
+
33
+ ```python
34
+ from transformers import pipeline
35
+ model = pipeline(model="seara/rubert-tiny2-cedr")
36
+ model("Привет, ты мне нравишься!")
37
+ # [{'label': 'joy', 'score': 0.9605025053024292}]
38
+ ```
39
+
40
+ ## Dataset
41
+
42
+ This model was trained on the [CEDR dataset](https://huggingface.co/datasets/cedr).
43
+
44
+ An overview of the training data can be found in the source [article](https://www.sciencedirect.com/science/article/pii/S1877050921013247).
45
+
46
+ ## Training
47
+
48
+ Training were done in this [project](https://github.com/searayeah/vkr-bert) with this parameters:
49
+
50
+ ```yaml
51
+ tokenizer.max_length: null
52
+ batch_size: 64
53
+ optimizer: adam
54
+ lr: 0.00001
55
+ weight_decay: 0
56
+ num_epochs: 30
57
+ ```
58
+
59
+ ## Eval results (on test split)
60
+
61
+ | |no_emotion|joy |sadness|surprise|fear |anger |micro avg|macro avg|weighted avg|samples avg|
62
+ |---------|----------|------|-------|--------|-------|------|---------|---------|------------|-----------|
63
+ |precision|0.8176 |0.8371|0.8425 |0.7902 |0.7833 |0.5467|0.811 |0.7696 |0.8034 |0.7811 |
64
+ |recall |0.8365 |0.83 |0.847 |0.6647 |0.6667 |0.328 |0.776 |0.6955 |0.776 |0.7792 |
65
+ |f1-score |0.8269 |0.8336|0.8447 |0.722 |0.7203 |0.41 |0.7931 |0.7263 |0.787 |0.7788 |
66
+ |support |734.0 |353.0 |379.0 |170.0 |141.0 |125.0 |1902.0 |1902.0 |1902.0 |1902.0 |
67
+ |auc-roc |0.9241 |0.9649|0.9557 |0.913 |0.9118 |0.7732|0.9355 |0.9071 |0.9261 | |