Loading…
Loading…
Estimates whether an English text was written by a person or generated by a language model. It's ELECTRA-small with mean pooling over tokens and a two-layer classification head (13.5M parameters). Try it in the AI Text Analyzer Space.
This is a probability, not proof. Don't use it on its own to decide whether someone used AI.
model.safetensors: the weights (encoder.* for ELECTRA, head.* for the classifier)config.json: the base model, labels (0 = AI, 1 = human) and scoring settingstokenizer.json, tokenizer_config.json: the ELECTRA WordPiece tokenizerThe text is split into chunks of 200 words. Each chunk is truncated to 256 subwords and
scored, and the document's P(human) is the mean over its chunks. Below 0.5 it reads as AI.
The model class and scoring code are in the Space's
detector.py.
| Label | Sources |
|---|---|
| AI | Claude conversations (Havoc999/The-Claude-Dataset); Reddit-style replies generated with DeepSeek, Dolphin, Llama 3.2 and Phi-4 |
| Human | Reddit comments, ConvoKit subreddit corpora, 20 Newsgroups (via scikit-learn), Wikipedia (2023-11 dump, before most AI-written edits) |
Each class was balanced within a casual and a formal register (86,672 training documents), and trained for 2 epochs. The train/test split is by author, article or prompt, so none of them appears on both sides.
google/electra-small-discriminator