Downloads · 30 days
197
9% of all-time downloads
Detecting-ai/pt-ai-detector
pt-ai-detector is a text classification model from Detecting-ai. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as cc-by-nc-4.0.
pt-ai-detector is a BERT-base model fine-tuned to decide whether a Portuguese sentence or paragraph was written by a human (label = 0) or generated by AI (label = 1).
Downloads · 30 days
197
9% of all-time downloads
All-time downloads
2.1K
Public
Parameters
109M
3.1 GB on disk
Likes
3
Public
Click a slice to open those files.
.pt1.7 GB · 50%
From the Hugging Face model README
pt-ai-detector is a BERT-base model fine-tuned to decide whether a Portuguese sentence or paragraph was written by a human (label = 0) or generated by AI (label = 1).
| Metric | Value |
|---|---|
| Train data | 1 000 000 human + 1 000 000 AI |
| Balanced test set | 1 954 190 (½ human, ½ AI) |
| Accuracy | ≈ 99 % |
| F1 (macro) | ≈ 0.99 |
| Model size | 434 M parameters (≈ 430 MB) |
Try it live at detecting-ai.com – our team at Detecting-ai built this model and demo so you can instantly test any Portuguese text online.
from transformers import pipeline
clf = pipeline(
"text-classification",
model="Detecting-ai/pt-ai-detector",
tokenizer="Detecting-ai/pt-ai-detector",
device=0 # set -1 for CPU
)
text = "A inteligência artificial está transformando a educação."
print(clf(text)) # → [{'label': 'AI', 'score': 0.987}]
| id | label |
|---|---|
| 0 | Human |
| 1 | AI |
neuralmind/bert-base-portuguese-cased| Corpus | Lines used | Notes |
|---|---|---|
| Human corpus (wiki40b-pt, oscar-pt, cc100-pt, europarl-pt, opus-books-pt) | 1 M sampled | Diverse Portuguese web/news/books |
AI corpus (Detecting-ai/ai_pt_corpus) | 1 M | Generated with OpenAI models (various GPT-4 / GPT-3.5 variants); prompts cover essays, news, tweets, dialogs, paraphrases, T = 0.6–1.0 |
Datasets were balanced 1 : 1 and shuffled before training.
Detect AI-generated Portuguese text in essays, articles, chats, support tickets, etc.
@misc{abdurazzoqov2025ptaidetector,
title = {pt-ai-detector: Detecting AI-generated Portuguese Text},
author = {Abdulla Abdurazzoqov},
year = {2025},
howpublished = {Hugging Face hub},
url = {https://huggingface.co/Detecting-ai/pt-ai-detector}
}
Creative Commons CC-BY-NC-4.0 — free for research & personal use; commercial use requires written permission.