CoolFace
Modelpublic

DunnBC22/bert-base-uncased-Hate_Offensive_or_Normal_Speech

sourceHugging Faceapache-2.0updated 6mo agoView on Hugging Face
1likes14downloads
Model Card

bert-base-uncased-HateOffensiveorNormalSpeech

This model is a fine-tuned version of bert-base-uncased on the None dataset. It achieves the following results on the evaluation set:

  • Loss: 0.1750
  • Accuracy: 0.9213
  • Weighted f1: 0.9196
  • Micro f1: 0.9213
  • Macro f1: 0.9161
  • Weighted recall: 0.9213
  • Micro recall: 0.9213
  • Macro recall: 0.9144
  • Weighted precision: 0.9237
  • Micro precision: 0.9213
  • Macro precision: 0.9241

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-%20BERT.ipynb

Associated Models

This project is part of a comparison that included the following models:

  • https://huggingface.co/DunnBC22/bert-large-uncased-HateOffensiveorNormalSpeech
  • https://huggingface.co/DunnBC22/distilbert-base-uncased-HateOffensiveorNormalSpeech
  • https://huggingface.co/DunnBC22/fBERT-HateOffensiveorNormalSpeech
  • https://huggingface.co/DunnBC22/hateBERT-HateOffensiveorNormalSpeech

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
  • trainbatchsize: 64
  • evalbatchsize: 64
  • seed: 42
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lrschedulertype: linear
  • num_epochs: 3

Training results

Training LossEpochStepValidation LossAccuracyWeighted f1Micro f1Macro f1Weighted recallMicro recallMacro recallWeighted precisionMicro precisionMacro precision
0.84011.0390.55100.66560.55210.66560.52330.66560.66560.63190.47400.66560.4487
0.39512.0780.27240.84590.83600.84590.82740.84590.84590.83050.87430.84590.8765
0.213.01170.17500.92130.91960.92130.91610.92130.92130.91440.92370.92130.9241

Framework versions

  • Transformers 4.26.1
  • Pytorch 1.12.1
  • Datasets 2.9.0
  • Tokenizers 0.12.1

License Notice

This model is a fine-tuned derivative of a pretrained model. Users must comply with the original model license.

Dataset Notice

This model was fine-tuned on third-party datasets which may have separate licenses or usage restrictions.