Text Classification
Transformers
PyTorch
TensorBoard
distilbert
Generated from Trainer
text-embeddings-inference
Instructions to use ovillan/distilbert-finetuning-fakenews with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ovillan/distilbert-finetuning-fakenews with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="ovillan/distilbert-finetuning-fakenews")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("ovillan/distilbert-finetuning-fakenews") model = AutoModelForSequenceClassification.from_pretrained("ovillan/distilbert-finetuning-fakenews", device_map="auto") - Notebooks
- Google Colab
- Kaggle
distilbert-finetuning-fakenews
This model is a fine-tuned version of distilbert-base-uncased on an external dataset. It achieves the following results on the evaluation set:
- Loss: 0.2804
- Accuracy: 0.8833
- F1: 0.9014
Model description
More information needed
Intended uses & limitations
A DistilBERT model is trained on an external dataset (Spanish Fake and Real News) to detect fake news in spanish.
Training and evaluation data
Dataset obtained from: https://www.kaggle.com/datasets/zulanac/fake-and-real-news, under a CC BY-SA 4.0 license. Author: Fabricio A. Zules.
For compatibility reasons with the model, it was necessary to change 'texto' and 'clase' headers to 'text' and 'label'; and 'fake' and 'true' values (from class/label), were replaced by '0' and '1' values.
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
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 3
Training results
Framework versions
- Transformers 4.24.0
- Pytorch 1.12.1+cu113
- Datasets 2.7.1
- Tokenizers 0.13.2
- Downloads last month
- 8