Run this model with HF Jobs
Run Sami92/XLM-R-Large-Sensationalism-Classifier on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Sami92/XLM-R-Large-Sensationalism-Classifier. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Sami92/XLM-R-Large-Sensationalism-Classifier on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Sami92/XLM-R-Large-Sensationalism-Classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sami92/XLM-R-Large-Sensationalism-Classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Sami92/XLM-R-Large-Sensationalism-Classifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Sami92/XLM-R-Large-Sensationalism-Classifier") model = AutoModelForSequenceClassification.from_pretrained("Sami92/XLM-R-Large-Sensationalism-Classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Model Card for Model ID
Fine-tuned XLM-R Large for task of classifying sentences as sensationalistic or not. The taxonomy for sensationalistic claims follows Ashraf et al. 2024 and was trained on their annotated Twitter data.
Model Details
Bias, Risks, and Limitations
[More Information Needed]
How to Get Started with the Model
from transformers import pipeline
texts = [
'Afghanistan - Warum die Taliban Frauenrechte immer mehr einschränken\nhttps://t.co/rhwOdNoJUx',
'#Münster #G7 oder "Ab jetzt außen rumfahren". https://t.co/Goj5vtrnst',
'Interessantes Trio.\nDie eine hat eine Wahl vergeigt, die andere kungelt mit Putin und die Dritte hat die Hilfe nach der Flutkatastrophe nicht auf die Reihe bekommen. \nMehr Frauen an die Macht!',
'Wie kann man sich #AnneWill betrachten ohne das übertragende Gerät zu zerschmettern. Eben 20 sec. dem #FDP Watschengesicht beim Quaken zugehört. Du lieber Himmel, wie weltfremd geht´s denn noch.'
]
checkpoint = "Sami92/XLM-R-Large-Sensationalism-Classifier"
tokenizer_kwargs = {'padding':True,'truncation':True,'max_length':512}
sensational_classifier = pipeline("text-classification", model = checkpoint, tokenizer =checkpoint, **tokenizer_kwargs, device="cuda")
sensational_classifier(texts)
Training Details
Training Data
Training Hyperparameters
- Epochs: 10
- Batch size: 16
- learning_rate: 2e-5
- weight_decay: 0.01
- fp16: True
Evaluation
Testing Data
Evaluation was performed on the test split (30%) from Ashraf et al. 2024.
Results
| Precision | Recall | F1-Score | Support | |
|---|---|---|---|---|
| Non-Sensational | 0.89 | 0.92 | 0.91 | 1800 |
| Sensational | 0.75 | 0.67 | 0.71 | 617 |
| Accuracy | 0.86 | 2417 | ||
| Macro Avg | 0.82 | 0.80 | 0.81 | 2417 |
| Weighted Avg | 0.86 | 0.86 | 0.86 | 2417 |
BibTeX:
@inproceedings{ashraf_defakts_2024,
address = {Torino, Italia},
title = {{DeFaktS}: {A} {German} {Dataset} for {Fine}-{Grained} {Disinformation} {Detection} through {Social} {Media} {Framing}},
shorttitle = {{DeFaktS}},
url = {https://aclanthology.org/2024.lrec-main.409},
booktitle = {Proceedings of the 2024 {Joint} {International} {Conference} on {Computational} {Linguistics}, {Language} {Resources} and {Evaluation} ({LREC}-{COLING} 2024)},
publisher = {ELRA and ICCL},
author = {Ashraf, Shaina and Bezzaoui, Isabel and Andone, Ionut and Markowetz, Alexander and Fegert, Jonas and Flek, Lucie},
editor = {Calzolari, Nicoletta and Kan, Min-Yen and Hoste, Veronique and Lenci, Alessandro and Sakti, Sakriani and Xue, Nianwen},
year = {2024},
}
- Downloads last month
- 20
Model tree for Sami92/XLM-R-Large-Sensationalism-Classifier
Base model
FacebookAI/xlm-roberta-large