Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
datasets:
|
3 |
+
- go_emotions
|
4 |
+
language:
|
5 |
+
- en
|
6 |
+
---
|
7 |
+
|
8 |
+
# Text Classification GoEmotions
|
9 |
+
|
10 |
+
This model is a fined-tuned version of [nreimers/MiniLMv2-L6-H384-distilled-from-BERT-Large](https://huggingface.co/nreimers/MiniLMv2-L6-H384-distilled-from-BERT-Large) on the on the [Jigsaw 1st Kaggle competition](https://www.kaggle.com/competitions/jigsaw-toxic-comment-classification-challenge) dataset using [tasinho/text-classification-goemotions](https://huggingface.co/tasinhoque/text-classification-goemotions) as teacher model.
|
11 |
+
|
12 |
+
# Load the Model
|
13 |
+
|
14 |
+
```py
|
15 |
+
from transformers import pipeline
|
16 |
+
|
17 |
+
pipe = pipeline(model='Ngit/MiniLM-L6-toxic-all-labels', task='text-classification')
|
18 |
+
pipe("This is pure trash")
|
19 |
+
# [{'label': 'toxic', 'score': 0.9383478164672852}]
|
20 |
+
```
|
21 |
+
|
22 |
+
# Training hyperparameters
|
23 |
+
|
24 |
+
The following hyperparameters were used during training:
|
25 |
+
- learning_rate: 6e-05
|
26 |
+
- train_batch_size: 48
|
27 |
+
- eval_batch_size: 48
|
28 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
29 |
+
- lr_scheduler_type: linear
|
30 |
+
- num_epochs: 10
|
31 |
+
- warmup-ratio: 0.1
|
32 |
+
|
33 |
+
|
34 |
+
# Metrics (comparison with teacher model)
|
35 |
+
|
36 |
+
| Teacher (params) | Student (params) | Set (metric) | Score (teacher) | Score (student) |
|
37 |
+
|--------------------|-------------|----------|--------| --------|
|
38 |
+
| unitary/toxic-bert (110M) | MiniLMv2-L6-H384-goemotions-v2 (33M) | Test (ROC_AUC) | 0.98636 | 0.98600 |
|
39 |
+
|
40 |
+
# Training Code, Evaluation & Deployment
|
41 |
+
|
42 |
+
Check
|
43 |
+
|