Fine-tuned BERTabaporu-large-uncased (pablocosta/bertabaporu-large-uncased) for
3-class sentiment classification of Brazilian Portuguese social-media text:
POSITIVE / NEUTRAL / NEGATIVE.
Trained on 1,000 Reddit comments annotated by Sabiá-4 (Maritaca AI) used as ground truth, selected from a 5-fold cross-validation (best fold by F1-macro).
Sentiment analysis of informal Brazilian Portuguese text (social media, comments, short-form). Handles irony-adjacent and colloquial language better than models trained on formal corpora, due to the Reddit training domain.
Out of scope: formal document classification, long documents (> 256 tokens), non-Portuguese text.
| metric | value |
|---|---|
| accuracy | 0.820 |
| F1-macro | 0.8286 |
| F1-micro | 0.820 |
| precision-macro | 0.8244 |
| recall-macro | 0.8340 |
| AUC-macro-OvR | 0.9204 |
Per-fold F1-macro across the 5-fold CV: 0.748 / 0.711 / 0.829 / 0.774 / 0.688.
==================================================================
ABLATION - bertabaporu fold-3 (class-weighted, GT1) vs Sabia-4
Sample 3: 1000 comments, random sweep seed 42, no train overlap
Model: models/bertabaporu_sabia4 (champion fold 3, seed 42)
==================================================================
n = 1000
accuracy = 0.7620
f1-macro = 0.7207
f1-micro = 0.7620
Cohen's kappa = 0.5733
per-class (Sabia-4 as reference):
class precision recall f1
POSITIVE 0.5140 0.7971 0.6250
NEUTRAL 0.8173 0.7827 0.7996
NEGATIVE 0.7521 0.7233 0.7374
confusion matrix (rows = Sabia-4 truth, cols = bertabaporu):
POS NEU NEG
POS 55 13 1
NEU 37 443 86
NEG 15 86 264
distribution comparison:
Sabia-4: {'NEUTRAL': 566, 'NEGATIVE': 365, 'POSITIVE': 69}
bertabaporu: {'NEUTRAL': 542, 'NEGATIVE': 351, 'POSITIVE': 107}
pablocosta/bertabaporu-large-uncased (335M params)from transformers import pipeline
clf = pipeline(
"text-classification",
model="KretliJ/bertabaporu-sabia4-sentiment",
tokenizer="KretliJ/bertabaporu-sabia4-sentiment",
)
texts = [
"gostei demais do resultado, melhorou muito!",
"o jogo foi ontem as 21h no estadio municipal",
"que raiva disso, uma falta de respeito absoluto",
]
for t in texts:
print(t, "->", clf(t, truncation=True)[0])
See example.py in this repo for a batched/PyTorch version.
If you use this model, please credit:
@misc{bertabaporu_sabia4_2026,
title = {bertabaporu-sabia4-sentiment: BERTabaporu fine-tuned on Sabi\'a-4 labels for PT-BR Reddit sentiment},
author = {Kretli, Jonas},
year = {2026},
url = {https://huggingface.co/KretliJ/bertabaporu-sabia4-sentiment}
}
Base model credit: pablocosta/bertabaporu-large-uncased. Ground-truth labels: Sabiá-4 (Maritaca AI).
model.safetensors 1.5 GBtraining_args.bin 4.9 kB