Instructions to use tyaroshko/roberta-base-fake-news-detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tyaroshko/roberta-base-fake-news-detection with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="tyaroshko/roberta-base-fake-news-detection")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("tyaroshko/roberta-base-fake-news-detection") model = AutoModelForSequenceClassification.from_pretrained("tyaroshko/roberta-base-fake-news-detection", device_map="auto") - Notebooks
- Google Colab
- Kaggle
fake_news_model
This model is a fine-tuned version of FacebookAI/roberta-base on the None dataset. It achieves the following results on the evaluation set:
- Loss: 0.0287
- Accuracy: 0.9949
- Precision: 0.9949
- Recall: 0.9949
- F1: 0.9949
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: 2e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- 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
- lr_scheduler_warmup_steps: 500
- num_epochs: 4
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 |
|---|---|---|---|---|---|---|---|
| 0.6615 | 0.0718 | 100 | 0.5282 | 0.7945 | 0.8461 | 0.7945 | 0.7814 |
| 0.0469 | 0.1436 | 200 | 0.0299 | 0.9940 | 0.9940 | 0.9940 | 0.9940 |
| 0.0293 | 0.2154 | 300 | 0.0192 | 0.9962 | 0.9962 | 0.9962 | 0.9962 |
| 0.0344 | 0.2873 | 400 | 0.0141 | 0.9968 | 0.9968 | 0.9968 | 0.9968 |
| 0.0089 | 0.3591 | 500 | 0.0142 | 0.9971 | 0.9971 | 0.9971 | 0.9971 |
| 0.03 | 0.4309 | 600 | 0.0207 | 0.9962 | 0.9962 | 0.9962 | 0.9962 |
| 0.0074 | 0.5027 | 700 | 0.0354 | 0.9941 | 0.9941 | 0.9941 | 0.9941 |
| 0.0375 | 0.5745 | 800 | 0.0287 | 0.9949 | 0.9949 | 0.9949 | 0.9949 |
Framework versions
- Transformers 4.57.3
- Pytorch 2.9.1+cu128
- Datasets 4.4.1
- Tokenizers 0.22.1
- Downloads last month
- 9
Model tree for tyaroshko/roberta-base-fake-news-detection
Base model
FacebookAI/roberta-base