Update README.md
Browse files
README.md
CHANGED
@@ -1,48 +1,71 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
The following hyperparameters were used during training:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
Optimizer: AdamW (betas=(0.9, 0.999), epsilon=1e-08)
|
26 |
-
LR Scheduler Type: Linear
|
27 |
-
LR Scheduler Warmup Steps: 500
|
28 |
-
Number of epochs: 3
|
29 |
-
Training results
|
30 |
-
Training Loss Epoch Step Validation Loss Accuracy
|
31 |
-
0.1691 1 17952 0.1464 0.9617
|
32 |
-
0.0892 2 35904 0.1456 0.9617
|
33 |
-
0.0527 3 53856 0.0511 0.9812
|
34 |
-
Framework versions
|
35 |
-
Transformers: 4.47.1
|
36 |
-
PyTorch: 2.5.1+cu121
|
37 |
-
Datasets: 3.2.0
|
38 |
-
Tokenizers: 0.21.0
|
39 |
-
Model metrics
|
40 |
-
Accuracy: 98.12%
|
41 |
-
Loss: 0.0511
|
42 |
-
License
|
43 |
-
This model is licensed under the MIT license.
|
44 |
-
|
45 |
-
Tags
|
46 |
-
Generated from Trainer
|
47 |
-
Text Classification
|
48 |
-
Toxicity Classification
|
|
|
1 |
+
---
|
2 |
+
library_name: transformers
|
3 |
+
license: mit
|
4 |
+
base_model: roberta-base
|
5 |
+
tags:
|
6 |
+
- generated_from_trainer
|
7 |
+
metrics:
|
8 |
+
- accuracy
|
9 |
+
model-index:
|
10 |
+
- name: toxicity-classification-model
|
11 |
+
results: []
|
12 |
+
datasets:
|
13 |
+
- dirtycomputer/Toxic_Comment_Classification_Challenge
|
14 |
+
language:
|
15 |
+
- en
|
16 |
+
pipeline_tag: text-classification
|
17 |
+
---
|
18 |
+
|
19 |
+
# toxicity-classification-model
|
20 |
+
|
21 |
+
This model is a fine-tuned version of [roberta-base](https://huggingface.co/roberta-base) on the dirtycomputer/Toxic_Comment_Classification_Challenge dataset. It achieves the following results on the evaluation set:
|
22 |
+
- Loss: 0.0511
|
23 |
+
- Accuracy: 0.9812
|
24 |
+
|
25 |
+
## Model description
|
26 |
+
|
27 |
+
Fine-tuned roberta-base model for detecting toxicity in comments. It categorizes a comment into different toxicity types, such as "toxic," "obscene," "insult," and "threat."
|
28 |
+
|
29 |
+
## Intended uses & limitations
|
30 |
+
|
31 |
+
### Intended Uses
|
32 |
+
- **Content Moderation**: Automatically flagging or removing toxic comments on social media platforms, forums, and customer support.
|
33 |
+
- **Toxicity Detection**: Classifying comments based on their toxicity level, such as harmful language or insults.
|
34 |
+
|
35 |
+
### Limitations
|
36 |
+
- **False Negatives**: May not always catch subtle toxic behavior.
|
37 |
+
- **Limited Language Support**: Currently, the model is trained on English-only data.
|
38 |
+
- **Context Sensitivity**: May struggle with ambiguous language or sarcasm.
|
39 |
+
|
40 |
+
## Training and evaluation data
|
41 |
+
|
42 |
+
This model was fine-tuned using the **dirtycomputer/Toxic_Comment_Classification_Challenge** dataset, which contains labeled comments for toxicity classification.
|
43 |
+
|
44 |
+
## Training procedure
|
45 |
+
|
46 |
+
### Training hyperparameters
|
47 |
+
|
48 |
The following hyperparameters were used during training:
|
49 |
+
- learning_rate: 5e-05
|
50 |
+
- train_batch_size: 8
|
51 |
+
- eval_batch_size: 16
|
52 |
+
- seed: 42
|
53 |
+
- optimizer: Use adamw_torch with betas=(0.9, 0.999) and epsilon=1e-08
|
54 |
+
- lr_scheduler_type: linear
|
55 |
+
- lr_scheduler_warmup_steps: 500
|
56 |
+
- num_epochs: 3
|
57 |
+
|
58 |
+
### Training results
|
59 |
+
|
60 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
61 |
+
|:-------------:|:-----:|:-----:|:---------------:|:--------:|
|
62 |
+
| 0.1691 | 1.0 | 17952 | 0.1464 | 0.9617 |
|
63 |
+
| 0.0892 | 2.0 | 35904 | 0.1456 | 0.9617 |
|
64 |
+
| 0.0527 | 3.0 | 53856 | 0.0511 | 0.9812 |
|
65 |
+
|
66 |
+
### Framework versions
|
67 |
|
68 |
+
- Transformers 4.47.1
|
69 |
+
- Pytorch 2.5.1+cu121
|
70 |
+
- Datasets 3.2.0
|
71 |
+
- Tokenizers 0.21.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|