Commit
•
4c4becf
1
Parent(s):
7f08b19
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
thumbnail: https://avatars3.githubusercontent.com/u/32437151?s=460&u=4ec59abc8d21d5feea3dab323d23a5860e6996a4&v=4
|
5 |
+
tags:
|
6 |
+
- text-classification
|
7 |
+
- emotion
|
8 |
+
- pytorch
|
9 |
+
license: apache-2.0
|
10 |
+
datasets:
|
11 |
+
- emotion
|
12 |
+
metrics:
|
13 |
+
- Accuracy, F1 Score
|
14 |
+
---
|
15 |
+
# robert-base-emotion
|
16 |
+
|
17 |
+
## Model description:
|
18 |
+
`robert-base` finetuned on the emotion dataset using HuggingFace Trainer.
|
19 |
+
```
|
20 |
+
learning rate 2e-5,
|
21 |
+
batch size 64,
|
22 |
+
num_train_epochs=8,
|
23 |
+
```
|
24 |
+
|
25 |
+
## How to Use the model:
|
26 |
+
```python
|
27 |
+
from transformers import pipeline
|
28 |
+
classifier = pipeline("sentiment-analysis",model='bhadresh-savani/robert-base-emotion')
|
29 |
+
prediction = classifier("I love using transformers. The best part is wide range of support and its easy to use")
|
30 |
+
```
|
31 |
+
|
32 |
+
## Dataset:
|
33 |
+
[Twitter-Sentiment-Analysis](https://huggingface.co/nlp/viewer/?dataset=emotion).
|
34 |
+
|
35 |
+
## Training procedure
|
36 |
+
[Colab Notebook](https://github.com/bhadreshpsavani/ExploringSentimentalAnalysis/blob/main/SentimentalAnalysisWithDistilbert.ipynb)
|
37 |
+
follow the above notebook by changing the model name to robert
|
38 |
+
|
39 |
+
## Eval results
|
40 |
+
```
|
41 |
+
{
|
42 |
+
'test_accuracy': 0.9395,
|
43 |
+
'test_f1': 0.9397328860104454,
|
44 |
+
'test_loss': 0.14367154240608215,
|
45 |
+
'test_runtime': 10.2229,
|
46 |
+
'test_samples_per_second': 195.639,
|
47 |
+
'test_steps_per_second': 3.13
|
48 |
+
}
|
49 |
+
```
|
50 |
+
|
51 |
+
## Reference:
|
52 |
+
* [Natural Language Processing with Transformer By Lewis Tunstall, Leandro von Werra, Thomas Wolf](https://learning.oreilly.com/library/view/natural-language-processing/9781098103231/)
|