Downloads · 30 days
12
9% of all-time downloads
vulonviing/roberta-babe-baseline
roberta-babe-baseline is a text classification model from vulonviing. Use it when you need a label for a piece of text. It is set up for transformers.
Best-fold checkpoint from a 5-fold RoBERTa-base reproduction of BABE sentence-level media bias classification.
Downloads · 30 days
12
9% of all-time downloads
All-time downloads
129
Public
Parameters
125M
499 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors499 MB · 99%
From the Hugging Face model README
Best-fold checkpoint from a 5-fold RoBERTa-base reproduction of BABE sentence-level media bias classification.
models/fold_0/checkpoint-532fold_0 with macro-F1 0.8760.857 +- 0.012| Item | Value |
|---|---|
| Base model | roberta-base |
| Task | Sentence-level media bias classification |
| Labels | non-biased, biased |
| Max sequence length | 128 |
| Epochs | 4 |
| Learning rate | 2e-05 |
| Batch size | 16 train / 32 eval |
| Weight decay | 0.01 |
| Warmup ratio | 0.1 |
| Random seed | 42 |
| Metric | Mean +- Std |
|---|---|
| Macro-F1 | 0.857 +- 0.012 |
| Accuracy | 0.858 +- 0.012 |
| Precision (macro) | 0.856 +- 0.011 |
| Recall (macro) | 0.859 +- 0.012 |
| Biased F1 | 0.869 +- 0.011 |
Per-fold macro-F1 values in the repo: 0.876, 0.854, 0.845, 0.852, 0.856.
| Metric | Score |
|---|---|
| Macro-F1 | 0.870 |
| Accuracy | 0.872 |
| Precision (macro) | 0.870 |
| Recall (macro) | 0.872 |
| Biased F1 | 0.884 |
Confusion matrix from the held-out quick run (n=468):
| Pred non-biased | Pred biased | |
|---|---|---|
| True non-biased (207) | 180 | 27 |
| True biased (261) | 33 | 228 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
repo_id = 'vulonviing/roberta-babe-baseline'
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForSequenceClassification.from_pretrained(repo_id)