transformers safetensors roberta text-classification single_label_classification dataset_size:2270482 generated_from_trainer en dataset:EPFL dataset:tweet dataset:sentiment dataset:classification base_model:cardiffnlp/twitter-roberta-base-sentiment-latest base_model:finetune:cardiffnlp/twitter-roberta-base-sentiment-latest license:apache-2.0 autotrain_compatible endpoints_compatible region:us
---
base_model: cardiffnlp/twitter-roberta-base-sentiment-latest
datasets:
- EPFL
- tweet
- sentiment
- classification
language:
- en
library_name: transformers
license: apache-2.0
metrics:
- accuracy
- f1
- precision
- recall
tags:
- single_label_classification
- dataset_size:2270482
- generated_from_trainer
model-index:
- name: roberta-base-twitter
  results: []
---

# roberta-base-twitter-sentiment-binary

This model is a fine-tuned version of [cardiffnlp/twitter-roberta-base-sentiment-latest](https://huggingface.co/cardiffnlp/twitter-roberta-base-sentiment-latest) on the EPFL CS-433 Text Classification dataset.
It achieves the following results on the evaluation set:
- Loss: 0.2325
- Accuracy: 0.9094
- F1: 0.9094
- Precision: 0.9094
- Recall: 0.9094

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 3e-05
- train_batch_size: 128
- eval_batch_size: 128
- 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
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 2.0

### Training results

| Training Loss | Epoch  | Step  | Validation Loss | Accuracy | F1     | Precision | Recall |
|:-------------:|:------:|:-----:|:---------------:|:--------:|:------:|:---------:|:------:|
| 0.3992        | 0.0400 | 707   | 0.2936          | 0.8757   | 0.8757 | 0.8758    | 0.8757 |
| 0.2978        | 0.0801 | 1414  | 0.2776          | 0.8817   | 0.8817 | 0.8818    | 0.8817 |
| 0.2859        | 0.1201 | 2121  | 0.2761          | 0.8833   | 0.8833 | 0.8839    | 0.8833 |
| 0.282         | 0.1601 | 2828  | 0.2666          | 0.8871   | 0.8870 | 0.8888    | 0.8871 |
| 0.2781        | 0.2002 | 3535  | 0.2687          | 0.8894   | 0.8894 | 0.8897    | 0.8894 |
| 0.2712        | 0.2402 | 4242  | 0.2621          | 0.8902   | 0.8902 | 0.8904    | 0.8902 |
| 0.267         | 0.2802 | 4949  | 0.2570          | 0.8933   | 0.8933 | 0.8933    | 0.8933 |
| 0.268         | 0.3203 | 5656  | 0.2574          | 0.8951   | 0.8951 | 0.8953    | 0.8951 |
| 0.2636        | 0.3603 | 6363  | 0.2520          | 0.8945   | 0.8944 | 0.8953    | 0.8945 |
| 0.2614        | 0.4003 | 7070  | 0.2603          | 0.8968   | 0.8968 | 0.8968    | 0.8968 |
| 0.2558        | 0.4403 | 7777  | 0.2552          | 0.8959   | 0.8959 | 0.8962    | 0.8959 |
| 0.2526        | 0.4804 | 8484  | 0.2480          | 0.8973   | 0.8973 | 0.8974    | 0.8973 |
| 0.2507        | 0.5204 | 9191  | 0.2509          | 0.8994   | 0.8994 | 0.8995    | 0.8994 |
| 0.2494        | 0.5604 | 9898  | 0.2543          | 0.8991   | 0.8991 | 0.8994    | 0.8991 |
| 0.25          | 0.6005 | 10605 | 0.2520          | 0.9004   | 0.9004 | 0.9006    | 0.9004 |
| 0.2486        | 0.6405 | 11312 | 0.2460          | 0.902    | 0.9020 | 0.9021    | 0.902  |
| 0.2472        | 0.6805 | 12019 | 0.2456          | 0.9009   | 0.9009 | 0.9011    | 0.9009 |
| 0.2455        | 0.7206 | 12726 | 0.2461          | 0.9038   | 0.9038 | 0.9038    | 0.9038 |
| 0.2458        | 0.7606 | 13433 | 0.2396          | 0.9018   | 0.9018 | 0.9020    | 0.9018 |
| 0.2471        | 0.8006 | 14140 | 0.2398          | 0.9035   | 0.9035 | 0.9035    | 0.9035 |
| 0.2452        | 0.8407 | 14847 | 0.2362          | 0.9046   | 0.9046 | 0.9049    | 0.9046 |
| 0.2449        | 0.8807 | 15554 | 0.2378          | 0.9017   | 0.9017 | 0.9021    | 0.9017 |
| 0.2401        | 0.9207 | 16261 | 0.2372          | 0.9055   | 0.9055 | 0.9055    | 0.9055 |
| 0.2422        | 0.9608 | 16968 | 0.2392          | 0.9031   | 0.9030 | 0.9050    | 0.9031 |
| 0.2407        | 1.0008 | 17675 | 0.2447          | 0.9043   | 0.9043 | 0.9044    | 0.9043 |
| 0.2114        | 1.0408 | 18382 | 0.2373          | 0.9052   | 0.9052 | 0.9052    | 0.9052 |
| 0.2117        | 1.0809 | 19089 | 0.2473          | 0.9038   | 0.9038 | 0.9039    | 0.9038 |
| 0.2124        | 1.1209 | 19796 | 0.2426          | 0.9048   | 0.9048 | 0.9050    | 0.9048 |
| 0.2111        | 1.1609 | 20503 | 0.2441          | 0.9021   | 0.9021 | 0.9021    | 0.9021 |
| 0.211         | 1.2010 | 21210 | 0.2421          | 0.9049   | 0.9049 | 0.9049    | 0.9049 |
| 0.2112        | 1.2410 | 21917 | 0.2384          | 0.9059   | 0.9059 | 0.9059    | 0.9059 |
| 0.2096        | 1.2810 | 22624 | 0.2395          | 0.9064   | 0.9064 | 0.9066    | 0.9064 |
| 0.2126        | 1.3210 | 23331 | 0.2382          | 0.9056   | 0.9056 | 0.9056    | 0.9056 |
| 0.2083        | 1.3611 | 24038 | 0.2353          | 0.9073   | 0.9073 | 0.9073    | 0.9073 |
| 0.2083        | 1.4011 | 24745 | 0.2371          | 0.9069   | 0.9069 | 0.9069    | 0.9069 |
| 0.2091        | 1.4411 | 25452 | 0.2400          | 0.9069   | 0.9069 | 0.9071    | 0.9069 |
| 0.2085        | 1.4812 | 26159 | 0.2360          | 0.9079   | 0.9079 | 0.9079    | 0.9079 |
| 0.2102        | 1.5212 | 26866 | 0.2311          | 0.9079   | 0.9079 | 0.9081    | 0.9079 |
| 0.2102        | 1.5612 | 27573 | 0.2391          | 0.9067   | 0.9067 | 0.9070    | 0.9067 |
| 0.2083        | 1.6013 | 28280 | 0.2363          | 0.9076   | 0.9076 | 0.9076    | 0.9076 |
| 0.2047        | 1.6413 | 28987 | 0.2345          | 0.9074   | 0.9074 | 0.9074    | 0.9074 |
| 0.2031        | 1.6813 | 29694 | 0.2340          | 0.9083   | 0.9083 | 0.9083    | 0.9083 |
| 0.205         | 1.7214 | 30401 | 0.2309          | 0.9079   | 0.9079 | 0.9079    | 0.9079 |
| 0.2089        | 1.7614 | 31108 | 0.2322          | 0.9084   | 0.9084 | 0.9084    | 0.9084 |
| 0.2063        | 1.8014 | 31815 | 0.2337          | 0.9083   | 0.9083 | 0.9083    | 0.9083 |
| 0.2061        | 1.8415 | 32522 | 0.2351          | 0.9088   | 0.9088 | 0.9088    | 0.9088 |
| 0.2044        | 1.8815 | 33229 | 0.2340          | 0.9101   | 0.9101 | 0.9101    | 0.9101 |
| 0.2047        | 1.9215 | 33936 | 0.2335          | 0.9093   | 0.9093 | 0.9093    | 0.9093 |
| 0.2056        | 1.9616 | 34643 | 0.2325          | 0.9094   | 0.9094 | 0.9094    | 0.9094 |


### Framework versions

- Transformers 4.47.0
- Pytorch 2.5.1+cu124
- Datasets 3.1.0
- Tokenizers 0.21.0
