Instructions to use gabriel-hf/bert-hate-speech-ptbr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gabriel-hf/bert-hate-speech-ptbr with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="gabriel-hf/bert-hate-speech-ptbr")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("gabriel-hf/bert-hate-speech-ptbr") model = AutoModelForSequenceClassification.from_pretrained("gabriel-hf/bert-hate-speech-ptbr", device_map="auto") - Notebooks
- Google Colab
- Kaggle
gabriel-hf/bert-hate-speech-ptbr
This model is a fine-tuned version of bert-base-uncased on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 0.0646
- Accuracy: 0.9896
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 5
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 0.0894 | 0.2312 | 200 | 0.0639 | 0.9890 |
| 0.0665 | 0.4624 | 400 | 0.0747 | 0.9890 |
| 0.034 | 0.6936 | 600 | 0.0763 | 0.9890 |
| 0.1097 | 0.9249 | 800 | 0.0671 | 0.9890 |
| 0.0478 | 1.1561 | 1000 | 0.0716 | 0.9890 |
| 0.1024 | 1.3873 | 1200 | 0.0604 | 0.9890 |
| 0.0702 | 1.6185 | 1400 | 0.0669 | 0.9890 |
| 0.0614 | 1.8497 | 1600 | 0.0708 | 0.9890 |
| 0.0526 | 2.0809 | 1800 | 0.0720 | 0.9890 |
| 0.0628 | 2.3121 | 2000 | 0.0696 | 0.9890 |
| 0.0702 | 2.5434 | 2200 | 0.0660 | 0.9890 |
| 0.0633 | 2.7746 | 2400 | 0.0696 | 0.9890 |
| 0.104 | 3.0058 | 2600 | 0.0624 | 0.9890 |
| 0.0543 | 3.2370 | 2800 | 0.0684 | 0.9890 |
| 0.0763 | 3.4682 | 3000 | 0.0671 | 0.9890 |
| 0.0911 | 3.6994 | 3200 | 0.0638 | 0.9890 |
| 0.0805 | 3.9306 | 3400 | 0.0677 | 0.9890 |
| 0.0875 | 4.1618 | 3600 | 0.0751 | 0.9861 |
| 0.0392 | 4.3931 | 3800 | 0.0752 | 0.9890 |
| 0.0516 | 4.6243 | 4000 | 0.0607 | 0.9890 |
| 0.0609 | 4.8555 | 4200 | 0.0646 | 0.9896 |
Framework versions
- Transformers 4.57.1
- Pytorch 2.9.0+cu126
- Datasets 4.0.0
- Tokenizers 0.22.1
- Downloads last month
- 10
Model tree for gabriel-hf/bert-hate-speech-ptbr
Base model
google-bert/bert-base-uncased