Today we are releasing two open-weight models that can be used to detect AI text: Smaug-AI-Text-Detector-35B-A3B and Smaug-AI-Text-Detector-E4B. The first is fine-tuned from Qwen3.6-35B-A3B (34.2B parameters, mixture of experts). The second is fine-tuned from Gemma 4 E4B (7.5B parameters) and runs on a single consumer GPU. Both are under the Apache 2.0 license.
The architecture follows the Pangram 4 Technical Report. This post documents the task definition, the architecture and decoding, the training data and procedure, an evaluation against Pangram's published numbers on the public benchmarks it reports, agreement with Pangram on 1,111 posts from X, and the known failure modes.
Task definition
Detection is posed as sequence labelling with three classes:
- Human. Written by a person. Spelling and grammar correction does not change the class.
- AI-assisted. Written by a person and then rewritten by a model: the content is the person's, the wording is the model's.
- AI-generated. Written by a model from a prompt.
From the labels we compute the fraction of the text in each class and assign a document label: Human if the human fraction is at least 0.90, AI if the AI-generated fraction is at least 0.80, and Mixed otherwise. These are the thresholds Pangram publishes for its detector, so document-level error rates are directly comparable.
Architecture
- Windowing. The text is split into windows of 512 tokens with a stride of 256. The first 12,000 tokens of a text are scored.
- Repeated input. The base models are causal, so a token's hidden state carries no information about the tokens after it. Each window is therefore fed twice in sequence, and hidden states are read from the second copy, where every token has attended to the whole window.
- Token head. A linear layer on the final hidden state gives a three-class distribution for every token.
- Window head. A second linear layer predicts the AI fraction of the whole window as a 15-way classification over fraction buckets.
Decoding
The raw head outputs are turned into labels in three steps.
- Calibration. For every token, the log-probabilities of the token head and of the window head covering it (six features) go through a multinomial logistic regression, fitted on held-out labelled text, which outputs calibrated three-class logits. Tokens in the overlap of two windows are averaged.
- Sentence vote. Each sentence takes the majority class of its tokens. Adjacent sentences with the same class are merged into spans, which the model returns with character offsets.
- Aggregation. Class fractions are computed over characters, and the document label follows from the thresholds above.
For the benchmark rows reported at a fixed false positive rate, each text needs a scalar score. We use the AI-generated fraction plus half of the AI-assisted fraction.
Training data
Stage one uses about 430,000 texts: 197,000 human, 125,000 AI-generated and 108,000 of mixed authorship. The human texts are web pages, news, reviews, forum posts, Wikipedia articles and books, all dated 2021 or earlier.
- Paired AI texts. Every AI-generated text is produced from a human text: a model writes a one-line brief of the human text, and a generator writes a new text from the brief. The pair shares topic, genre and approximate length, which removes topic as a usable feature.
- Token labels for edited text. For AI-edited human text, each output sentence is aligned to the source. A sentence that is nearly unchanged is labelled human, a paraphrase of a source sentence is labelled AI-assisted, and a sentence with no source match is labelled AI-generated. The window head's target is the resulting AI fraction of the window.
The AI text comes from these generators:
| Provider | Smaug-AI-Text-Detector-E4B | Smaug-AI-Text-Detector-35B-A3B |
|---|---|---|
| OpenAI | GPT-6.1 Terra, GPT-6 Luna, GPT-5.6 Luna, GPT-5.4 mini, gpt-oss-120b | GPT-6.1 Terra, GPT-5.6 Terra, GPT-6 Luna, GPT-5.6 Luna, GPT-5.5, GPT-5.4 mini, gpt-oss-120b |
| Anthropic | Claude Sonnet 5.5, Claude Haiku 5.5 | Claude Opus 5.5, Claude Sonnet 5.5, Claude Haiku 5.5 |
| Gemini 3.8 Flash, Gemini 3.5 Flash-Lite, Gemma 4 31B, Gemma 4 12B | Gemini 3.8 Flash, Gemini 3.5 Flash-Lite, Gemini 3.1 Pro, Gemma 4 31B, Gemma 4 12B | |
| Z.ai | GLM-5.3, GLM-5.3 Flash | GLM-5.3, GLM-5.3 Flash |
| DeepSeek | V4.1 Flash | V4.1 Flash |
| MiniMax | M3.1 Flash | M3.1 Flash |
| xAI | - | Grok 4.7 |
| Alibaba | - | Qwen3.8 Max |
Training procedure
The loss is the mean of two cross-entropy terms with equal weight: the per-token three-class loss and the 15-way window loss. Optimisation uses AdamW with weight decay 0.01, and the heads train at ten times the adapter's learning rate.
Stage one. One pass over the data above, at a learning rate of 1e-4 for Smaug-AI-Text-Detector-E4B and 5e-5 for Smaug-AI-Text-Detector-35B-A3B.
Stage two. The stage-one model scores about 500,000 human web pages disjoint from its training data. Pages it labels Mixed or AI, or that fall close to the threshold, are kept, and a paired AI text is generated for each. The model then trains briefly on these pages, their pairs and a sample of the stage-one data, at 0.3 times the stage-one learning rate.
For Smaug-AI-Text-Detector-E4B, stage two more than halves the false positive rate on unseen web pages. Adding the same pages to a single long stage-one run gave no improvement, so the two-stage schedule is what matters.
Evaluation against Pangram
Pangram publishes results in the Pangram 4 Technical Report, the Pangram 4.1 model card and a post on the PERSUADE essays. We scored our models on the same public benchmarks and splits and applied the counting rule each document states. The Pangram column quotes the published number and links to its source; a link to the model card means Pangram 4.1, any other link means Pangram 4. We did not run Pangram.
All numbers are percentages. Lower is better.
False positive rate on human text
A human text is a false positive when its document label is Mixed or AI.
| Benchmark | Texts | Smaug-AI-Text-Detector-E4B | Smaug-AI-Text-Detector-35B-A3B | Pangram (4 or 4.1) |
|---|---|---|---|---|
| FineWeb: web pages, 2015 to 2021 | 132,617 | 0.010 | 0.004 | 0.009 * |
| PERSUADE: student essays | 25,994 | 0.004 | 0.000 | 0.00 |
| PELIC: essays by English learners | 15,000 | 0.23 | 0.08 | 0.01 |
| ELLIPSE: school essays by English learners | 3,909 | 0.00 | 0.00 | 0.00 |
| Liang et al., TOEFL: essays by non-native speakers | 91 | 0.00 | 0.00 | 0.00 |
| UChicago (Jabarian and Imas): human texts | 1,992 | 0.05 | 0.00 | 0.00 |
| Epoch AI Style Imitation: skilled human prose | 495 | 0.00 | 0.00 | 0.00 |
| Saha Peer Review: human reviews | 468 | 0.0 | 0.0 | 0.0 |
| Saha Peer Review, easy: human reviews polished by AI | 915 | 3.0 | 1.4 | 1.4 |
| Saha Peer Review, hard: human reviews polished by AI | 1,887 | 8.7 | 5.9 | 2.5 |
False negative rate on AI text
An AI text is a false negative when its document label is Human or Mixed.
| Benchmark | Texts | Smaug-AI-Text-Detector-E4B | Smaug-AI-Text-Detector-35B-A3B | Pangram (4 or 4.1) |
|---|---|---|---|---|
| MELD-eval, no attack: AI text | 31,448 | 0.00 † | 0.01 † | 0.00 |
| MELD-eval, six attacks: AI text with typos and character tricks | 188,688 | 0.10 † | 0.01 † | 0.01 |
| Sem-Detect: peer reviews written by AI | 6,744 | 0.00 † | 0.00 † | 4.5 |
| UChicago: AI text | 7,968 | 0.29 † | 0.15 † | 0.00 |
| GEDE: essays written by AI | 190 | 0.53 † | 0.00 † | 0.0 |
| Epoch AI Style Imitation: AI that imitates real authors | 594 | 1.68 | 1.18 | 2.86 |
| VUB: academic papers written by AI | 39 | 5.1 | 0.0 | 0.0 |
| Saha Peer Review, easy, AI from a basic prompt | 274 | 0.0 | 0.0 | 1.8 |
| Saha Peer Review, easy, AI from an expert prompt | 274 | 0.0 | 0.0 | 0.0 |
| Saha Peer Review, easy, AI from human key points | 936 | 0.6 | 0.0 | 3.7 |
| Saha Peer Review, hard, AI from a basic prompt | 750 | 0.0 | 0.0 | 0.0 |
| Saha Peer Review, hard, AI from an expert prompt | 600 | 0.0 | 0.0 | 0.0 |
| Saha Peer Review, hard, AI from human key points | 2,000 | 0.3 | 0.0 | 1.1 |
How the numbers are counted:
- † False negative rate at 1% false positive rate (0.1% for Sem-Detect), as Pangram reports these rows. The threshold on the scalar score is set on the benchmark's own human texts. The report states this procedure for MELD-eval; for the other rows it is our reading of the report.
- * Pangram's FineWeb number is on its own sample of pages, which is not public. Ours is on 132,617 other pages of the same crawl.
- Each row is computed on the texts Pangram used. For GEDE this is the public list of 569 essays, for Saha the test partition, for UChicago every text in the four generator files, and for VUB the 39 public papers. Our text counts differ from Pangram's by at most ten texts per benchmark.
For four benchmarks the Pangram 4 Technical Report defines its own counting rule, and we apply the same rule:
- UChicago, human texts. A text is a false positive when its score is 0.5 or higher.
- Saha, human reviews polished by AI. A review is a false positive only when it is labelled AI. A Mixed label is correct.
- Saha, reviews written by AI. A review is a false negative only when it is labelled Human. A Mixed label counts as detected.
- VUB, papers written by AI. A paper is a false negative when its score is below 0.5.
Agreement with Pangram on posts from X
As a check outside the benchmarks, we collected public posts on X where a user had asked Pangram's account to check a post and the account had replied with its label. This gives 1,111 English posts with a Pangram label: 353 Human, 153 Mixed and 605 AI. We scored the same posts. They were used neither for training nor for calibration.
Rows are Pangram's label, columns are ours.
Smaug-AI-Text-Detector-35B-A3B
| Pangram label | Ours: Human | Ours: Mixed | Ours: AI |
|---|---|---|---|
| Human (353) | 313 | 21 | 19 |
| Mixed (153) | 16 | 85 | 52 |
| AI (605) | 11 | 27 | 567 |
Same label on 965 of 1,111 posts (86.9%).
Smaug-AI-Text-Detector-E4B
| Pangram label | Ours: Human | Ours: Mixed | Ours: AI |
|---|---|---|---|
| Human (353) | 326 | 14 | 13 |
| Mixed (153) | 45 | 64 | 44 |
| AI (605) | 33 | 61 | 511 |
Same label on 901 of 1,111 posts (81.1%).
These posts have no ground truth, so the tables measure agreement between detectors and a disagreement is not necessarily our error. Several posts that Pangram labels Human and we flag read like press statements or promotional copy. The gap is still large: on posts Pangram labels Human, our models flag 8% to 11%, far above any benchmark false positive rate, and mostly on posts under 100 words.
The Mixed disagreements show a systematic difference in granularity. Pangram's output on such posts alternates between short human and AI segments, with a median human segment of about 18 words. Our token predictions vary much less within a text, so a post in which authorship alternates every sentence or two usually ends up with a single label.
Limitations
- Humanizer tools. The models were not trained to detect text rewritten by humanizer tools.
- Fine-grained mixing. When human and AI segments alternate inside a document, the models often assign one class to all of it.
- Short texts. Below 50 words the output is unreliable, and the model marks such results.
- Language. English only.
No detector is free of errors. A label from these models is one piece of evidence and should not be the sole basis for an accusation. We are releasing the weights in the hope that they are useful for research on AI text detection.
Usage
Use Smaug-AI-Text-Detector-E4B when speed or hardware matters: it is the faster model and runs on a single consumer GPU. Use Smaug-AI-Text-Detector-35B-A3B when accuracy matters most: its error rate is lower than or equal to that of Smaug-AI-Text-Detector-E4B on every benchmark row above except one.
Demos: Smaug-AI-Text-Detector-35B-A3B and Smaug-AI-Text-Detector-E4B.
Both models load with the Transformers library. Smaug-AI-Text-Detector-35B-A3B also needs the flash-linear-attention package and one 80 GB GPU.
pip install torch "transformers>=5.23" numpy
from transformers import AutoModel, AutoTokenizer
model_id = "abacusai/Smaug-AI-Text-Detector-E4B"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModel.from_pretrained(model_id, trust_remote_code=True).to("cuda").eval()
result = model.analyze(open("essay.txt").read(), tokenizer)
print(result["verdict"]) # document label: 'Human', 'Mixed' or 'AI'
print(result["share"]) # class fractions
print(result["segments"]) # labelled spans with character offsets
Weights and model cards: abacusai/Smaug-AI-Text-Detector-35B-A3B and abacusai/Smaug-AI-Text-Detector-E4B.





