File size: 3,211 Bytes
8f0fb28 0ce1daf 8f0fb28 79edaed e05fffc 79edaed 8f0fb28 a056fe2 8f0fb28 9a55d3d 8f0fb28 0ce1daf 9a55d3d 8f0fb28 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
---
license: apache-2.0
language: en
tags:
- generated_from_trainer
metrics:
- accuracy
- f1
- precision
- recall
model-index:
- name: distilroberta-base-finetuned-fake-news-english
results: []
widget:
- text: "Wisconsin has not counted more votes than it has registered voters. This tweet is comparing the vote count from 2020 with the number of registered voters from 2018. When we take a look at Wisconsin’s current total of registered voters, we see that there is nothing fraudulent about the state’s count."
example_title: fake
- text: "Barack Hussein Obama II is an American politician who served as the 44th president of the United States from 2009 to 2017. A member of the Democratic Party, Obama was the first African-American president of the United States."
example_title: real
---
# distilroberta-base-finetuned-fake-news-english
This model is a fine-tuned version of [distilroberta-base](https://huggingface.co/distilroberta-base) on the [fake-and-real news](https://www.kaggle.com/datasets/clmentbisaillon/fake-and-real-news-dataset) dataset.
It achieves the following results on the evaluation set:
- Loss: 0.0020
- Accuracy: 0.9997
- F1: 0.9997
- Precision: 0.9994
- Recall: 1.0
- Auc: 0.9997
## Intended uses & limitations
The model may not work with the articles over 512 tokens after preprocessing as the model's context is restricted to a maximum of 512 tokens in the sequence.
## Training and evaluation data
The [fake-and-real news](https://www.kaggle.com/datasets/clmentbisaillon/fake-and-real-news-dataset) dataset contains a total of 44,898 annotated articles with 21,417 real and 23,481 fake. The dataset was stratified split into train, validation, and test subsets with a proportion of 60:20:20 respectively. The model was fine-tuned on the train subset and evaluated on validation and test subsets.
| Split | # examples |
|:----------:|:----------:|
| train | 17959 |
| validation | 13469 |
| test | 13470 |
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 224
- num_epochs: 2
### Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall | Auc |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:---------:|:------:|:------:|
| 0.251 | 0.36 | 200 | 0.0030 | 0.9996 | 0.9995 | 0.9995 | 0.9995 | 0.9996 |
| 0.0022 | 0.71 | 400 | 0.0012 | 0.9998 | 0.9998 | 0.9995 | 1.0 | 0.9998 |
| 0.0013 | 1.07 | 600 | 0.0001 | 1.0 | 1.0 | 1.0 | 1.0 | 1.0 |
| 0.0004 | 1.43 | 800 | 0.0015 | 0.9997 | 0.9997 | 0.9994 | 1.0 | 0.9997 |
| 0.0013 | 1.78 | 1000 | 0.0020 | 0.9997 | 0.9997 | 0.9994 | 1.0 | 0.9997 |
### Framework versions
- Transformers 4.17.0
- Pytorch 1.10.0+cu111
- Datasets 2.0.0
- Tokenizers 0.12.0
|