Instructions to use MatteoFasulo/twitter-roberta-base-hate with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MatteoFasulo/twitter-roberta-base-hate with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="MatteoFasulo/twitter-roberta-base-hate")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("MatteoFasulo/twitter-roberta-base-hate") model = AutoModelForSequenceClassification.from_pretrained("MatteoFasulo/twitter-roberta-base-hate") - Notebooks
- Google Colab
- Kaggle
| library_name: transformers | |
| base_model: cardiffnlp/twitter-roberta-base-hate | |
| tags: | |
| - generated_from_trainer | |
| metrics: | |
| - accuracy | |
| - precision | |
| - recall | |
| model-index: | |
| - name: twitter-roberta-base-hate_42 | |
| results: [] | |
| <!-- This model card has been generated automatically according to the information the Trainer had access to. You | |
| should probably proofread and complete it, then remove this comment. --> | |
| # twitter-roberta-base-hate_42 | |
| This model is a fine-tuned version of [cardiffnlp/twitter-roberta-base-hate](https://huggingface.co/cardiffnlp/twitter-roberta-base-hate) on the None dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 0.4071 | |
| - F1-score: 0.8447 | |
| - Accuracy: 0.8462 | |
| - Precision: 0.8436 | |
| - Recall: 0.8465 | |
| ## 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-06 | |
| - train_batch_size: 16 | |
| - eval_batch_size: 16 | |
| - seed: 42 | |
| - optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments | |
| - lr_scheduler_type: linear | |
| - num_epochs: 6 | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | F1-score | Accuracy | Precision | Recall | | |
| |:-------------:|:-----:|:----:|:---------------:|:--------:|:--------:|:---------:|:------:| | |
| | No log | 1.0 | 180 | 0.3830 | 0.8243 | 0.8252 | 0.8241 | 0.8286 | | |
| | No log | 2.0 | 360 | 0.3669 | 0.8312 | 0.8322 | 0.8305 | 0.8348 | | |
| | 0.3605 | 3.0 | 540 | 0.3820 | 0.8246 | 0.8252 | 0.8256 | 0.8303 | | |
| | 0.3605 | 4.0 | 720 | 0.3968 | 0.8410 | 0.8427 | 0.8401 | 0.8425 | | |
| | 0.3605 | 5.0 | 900 | 0.4079 | 0.8408 | 0.8427 | 0.8401 | 0.8417 | | |
| | 0.2446 | 6.0 | 1080 | 0.4071 | 0.8447 | 0.8462 | 0.8436 | 0.8465 | | |
| ### Framework versions | |
| - Transformers 4.47.1 | |
| - Pytorch 2.5.1+cu124 | |
| - Datasets 3.2.0 | |
| - Tokenizers 0.21.0 | |