hateBERT-Hate_Offensive_or_Normal_Speech
This model is a fine-tuned version of GroNLP/hateBERT on the None dataset. It achieves the following results on the evaluation set:
- Loss: 0.1655
- Accuracy: 0.9410
- F1
- Weighted: 0.9395
- Micro: 0.9410
- Macro: 0.9351
- Recall
- Weighted: 0.9410
- Micro: 0.9410
- Macro: 0.9273
- Precision
- Weighted: 0.9447
- Micro: 0.9410
- Macro: 0.9510
Model description
For more information on how it was created, check out the following link: https://github.com/DunnBC22/NLP_Projects/blob/main/Multiclass%20Classification/Transformer%20Comparison/Hate%20%26%20Offensive%20Speech%20-%20hateBERT.ipynb
Associated Models
This project is part of a comparison that included the following models:
- https://huggingface.co/DunnBC22/bert-large-uncased-Hate_Offensive_or_Normal_Speech
- https://huggingface.co/DunnBC22/bert-base-uncased-Hate_Offensive_or_Normal_Speech
- https://huggingface.co/DunnBC22/distilbert-base-uncased-Hate_Offensive_or_Normal_Speech
- https://huggingface.co/DunnBC22/fBERT-Hate_Offensive_or_Normal_Speech
Intended uses & limitations
This model is intended to demonstrate my ability to solve a complex problem using technology.
The main limitation is the quality of the data source.
Training and evaluation data
Dataset Source: https://www.kaggle.com/datasets/subhajournal/normal-hate-and-offensive-speeches
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 64
- eval_batch_size: 64
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 3
Training results
Training Loss | Epoch | Step | Validation Loss | Accuracy | Weighted F1 | Micro F1 | Macro F1 | Weighted Recall | Micro Recall | Macro Recall | Weighted Precision | Micro Precision | Macro Precision |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0.8958 | 1.0 | 39 | 0.6817 | 0.5508 | 0.4792 | 0.5508 | 0.4395 | 0.5508 | 0.5508 | 0.4853 | 0.7547 | 0.5508 | 0.7906 |
0.4625 | 2.0 | 78 | 0.2448 | 0.9246 | 0.9230 | 0.9246 | 0.9170 | 0.9246 | 0.9246 | 0.9103 | 0.9263 | 0.9246 | 0.9296 |
0.2071 | 3.0 | 117 | 0.1655 | 0.9410 | 0.9395 | 0.9410 | 0.9351 | 0.9410 | 0.9410 | 0.9273 | 0.9447 | 0.9410 | 0.9510 |
Framework versions
- Transformers 4.26.1
- Pytorch 1.12.1
- Datasets 2.9.0
- Tokenizers 0.12.1