Instructions to use jhonalevc1995/longformer-political_bias-finetune with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jhonalevc1995/longformer-political_bias-finetune with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="jhonalevc1995/longformer-political_bias-finetune")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("jhonalevc1995/longformer-political_bias-finetune") model = AutoModelForSequenceClassification.from_pretrained("jhonalevc1995/longformer-political_bias-finetune", device_map="auto") - Notebooks
- Google Colab
- Kaggle
longformer-political_bias-finetune
This model is a fine-tuned version of allenai/longformer-base-4096 on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 0.1045
- Accuracy: 0.9846
- Precision: 0.9819
- Recall: 0.9957
- F1: 0.9888
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-05
- train_batch_size: 4
- eval_batch_size: 4
- seed: 0
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 3
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | Precision | Recall | F1 |
|---|---|---|---|---|---|---|---|
| 0.2992 | 0.1834 | 500 | 0.1363 | 0.9688 | 0.9831 | 0.9709 | 0.9769 |
| 0.1736 | 0.3668 | 1000 | 0.0897 | 0.9809 | 0.9834 | 0.9887 | 0.9860 |
| 0.2231 | 0.5503 | 1500 | 0.1072 | 0.9839 | 0.9908 | 0.9854 | 0.9881 |
| 0.1045 | 0.7337 | 2000 | 0.0966 | 0.9795 | 0.9934 | 0.9763 | 0.9848 |
| 0.1372 | 0.9171 | 2500 | 0.1045 | 0.9846 | 0.9819 | 0.9957 | 0.9888 |
Framework versions
- Transformers 4.44.2
- Pytorch 2.4.1+cu121
- Datasets 3.0.1
- Tokenizers 0.19.1
- Downloads last month
- 3
Model tree for jhonalevc1995/longformer-political_bias-finetune
Base model
allenai/longformer-base-4096