Downloads · 30 days
18
14% of all-time downloads
HenriqueLz/debertinha-ptbr-xsmall-fakerecogna2-extrativa-elections
debertinha-ptbr-xsmall-fakerecogna2-extrativa-elections is a text classification model from HenriqueLz. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
Este modelo é uma versão fine-tuned do sagui-nlp/debertinha-ptbr-xsmall para a tarefa de Detecção de Notícias Falsas (Fake News) em português brasileiro, treinado no dataset HenriqueLz/fakerecogna2-extrativa-elections.
Downloads · 30 days
18
14% of all-time downloads
All-time downloads
133
Public
Parameters
40.9M
164 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors164 MB · 98%
From the Hugging Face model README
Este modelo é uma versão fine-tuned do sagui-nlp/debertinha-ptbr-xsmall para a tarefa de Detecção de Notícias Falsas (Fake News) em português brasileiro, treinado no dataset HenriqueLz/fakerecogna2-extrativa-elections.
0.9877| ID | Label | Descrição |
|---|---|---|
0 | VERDADEIRA | Notícia factual / verdadeira |
1 | FALSA | Notícia falsa / desinformação |
pipeline:from transformers import pipeline
classifier = pipeline(
"text-classification",
model="HenriqueLz/debertinha-ptbr-xsmall-fakerecogna2-extrativa-elections",
tokenizer="HenriqueLz/debertinha-ptbr-xsmall-fakerecogna2-extrativa-elections",
)
texto = "Ministério da Saúde divulga calendário oficial de vacinação para o próximo ano."
resultado = classifier(texto)
print(resultado)
# Output: [{'label': 'VERDADEIRA', 'score': 0.99...}]
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("HenriqueLz/debertinha-ptbr-xsmall-fakerecogna2-extrativa-elections")
model = AutoModelForSequenceClassification.from_pretrained("HenriqueLz/debertinha-ptbr-xsmall-fakerecogna2-extrativa-elections")
texto = "Texto da notícia para classificação..."
inputs = tokenizer(texto, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
logits = model(**inputs).logits
predicted_class_id = logits.argmax().item()
label = model.config.id2label[predicted_class_id]
print(f"Classe predita: {label}")
HenriqueLz/fakerecogna2-extrativa-elections (split temporal com data de corte em 30/10/2021).1e-5 com otimizador AdamW e decaimento de peso (weight decay) de 0.01.DataCollatorWithPadding).Caso utilize este modelo em sua pesquisa, cite o dataset base FakeRecogna 2.0 e o artigo original da arquitetura correspondente:
@inproceedings{garcia-etal-2024-text,
title = "Text Summarization and Temporal Learning Models Applied to {P}ortuguese Fake News Detection in a Novel {B}razilian Corpus Dataset",
author = "Garcia, Gabriel Lino and Paiola, Pedro Henrique and Jodas, Danilo Samuel and Sugi, Luis Afonso and Papa, Jo{\~a}o Paulo",
booktitle = "Proceedings of the 16th International Conference on Computational Processing of Portuguese - Vol. 1",
month = mar,
year = "2024",
address = "Santiago de Compostela, Galicia/Spain",
publisher = "Association for Computational Lingustics",
url = "https://aclanthology.org/2024.propor-1.9/",
pages = "86--96"
}
@misc{campiotti2023debertinha,
title={DeBERTinha: A Multistep Approach to Adapt DebertaV3 XSmall for Brazilian Portuguese Natural Language Processing Task},
author={Israel Campiotti and Matheus Rodrigues and Yuri Albuquerque and Rafael Azevedo and Alyson Andrade},
year={2023},
eprint={2309.16844},
archivePrefix={arXiv},
primaryClass={cs.CL}
}