Token Classification
Transformers
Safetensors
English
ai_text_detector
feature-extraction
abacusai
ai-text-detection
ai-generated-text
gemma4
custom_code
Instructions to use abacusai/Smaug-AI-Text-Detector-E4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use abacusai/Smaug-AI-Text-Detector-E4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="abacusai/Smaug-AI-Text-Detector-E4B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("abacusai/Smaug-AI-Text-Detector-E4B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
minor fix
Browse files
README.md
CHANGED
|
@@ -79,32 +79,32 @@ All numbers are percentages, and lower is better.
|
|
| 79 |
|:---|---:|---:|---:|
|
| 80 |
| FineWeb: web pages, 2015 to 2021 | 132,617 | 0.010 | [0.009](https://www.pangram.com/research/model-card/pangram-4-1)<sup>*</sup> |
|
| 81 |
| PERSUADE: student essays | 25,994 | 0.004 | [0.00](https://www.pangram.com/blog/pangram-performance-diverse-student-essays) |
|
| 82 |
-
| PELIC: essays by English learners | 15,000 | 0.23 | [0.01](https://
|
| 83 |
-
| ELLIPSE: school essays by English learners | 3,909 | 0.00 | [0.00](https://
|
| 84 |
| Liang et al., TOEFL: essays by non-native speakers | 91 | 0.00 | [0.00](https://www.pangram.com/research/model-card/pangram-4-1) |
|
| 85 |
-
| UChicago (Jabarian and Imas): human texts | 1,992 | 0.05<sup>‡</sup> | [0.00](https://
|
| 86 |
-
| Epoch AI Style Imitation: skilled human prose | 495 | 0.00 | [0.00](https://
|
| 87 |
-
| Saha Peer Review: human reviews | 468 | 0.0 | [0.0](https://
|
| 88 |
-
| Saha Peer Review, easy: human reviews polished by AI | 915 | 3.0<sup>‡</sup> | [1.4](https://
|
| 89 |
-
| Saha Peer Review, hard: human reviews polished by AI | 1,887 | 8.7<sup>‡</sup> | [2.5](https://
|
| 90 |
|
| 91 |
**False negative rate (FNR): AI text wrongly labelled**
|
| 92 |
|
| 93 |
| Benchmark | Texts | Smaug-AI-Text-Detector-E4B | Pangram (4 or 4.1) |
|
| 94 |
|:---|---:|---:|---:|
|
| 95 |
-
| MELD-eval, no attack: AI text | 31,448 | 0.00<sup>†</sup> | [0.00](https://
|
| 96 |
-
| MELD-eval, six attacks: AI text with character and word substitutions | 188,688 | 0.10<sup>†</sup> | [0.01](https://
|
| 97 |
-
| Sem-Detect: peer reviews written by AI | 6,744 | 0.00<sup>†</sup> | [4.5](https://
|
| 98 |
-
| UChicago: AI text | 7,968 | 0.29<sup>†</sup> | [0.00](https://
|
| 99 |
-
| GEDE: essays written by AI | 190 | 0.53<sup>†</sup> | [0.0](https://
|
| 100 |
-
| Epoch AI Style Imitation: AI that imitates real authors | 594 | 1.68 | [2.86](https://
|
| 101 |
-
| VUB: academic papers written by AI | 39 | 5.1<sup>‡</sup> | [0.0](https://
|
| 102 |
-
| Saha Peer Review, easy, AI from a basic prompt | 274 | 0.0<sup>‡</sup> | [1.8](https://
|
| 103 |
-
| Saha Peer Review, easy, AI from an expert prompt | 274 | 0.0<sup>‡</sup> | [0.0](https://
|
| 104 |
-
| Saha Peer Review, easy, AI from human key points | 936 | 0.6<sup>‡</sup> | [3.7](https://
|
| 105 |
-
| Saha Peer Review, hard, AI from a basic prompt | 750 | 0.0<sup>‡</sup> | [0.0](https://
|
| 106 |
-
| Saha Peer Review, hard, AI from an expert prompt | 600 | 0.0<sup>‡</sup> | [0.0](https://
|
| 107 |
-
| Saha Peer Review, hard, AI from human key points | 2,000 | 0.3<sup>‡</sup> | [1.1](https://
|
| 108 |
|
| 109 |
<sup>†</sup> FNR at 1% FPR (0.1% FPR for Sem-Detect).
|
| 110 |
|
|
@@ -121,7 +121,7 @@ All numbers are percentages, and lower is better.
|
|
| 121 |
| **Precision** | bfloat16 |
|
| 122 |
| **Training data** | Human text from the web, news, reviews, forums, Wikipedia and books. AI text from models of OpenAI, Anthropic, Google, Z.ai, DeepSeek, MiniMax. The technical blog lists the models |
|
| 123 |
|
| 124 |
-
The design follows the [Pangram 4 Technical Report](https://
|
| 125 |
|
| 126 |
<p align="center">
|
| 127 |
<img src="figures/architecture.svg" width="720" alt="Architecture: a text is cut into 512-token windows; each window is written twice and passed through the language model with a LoRA adapter; a token head labels each token of the second copy and a window head estimates the AI share of the window; each sentence takes the label of most of its tokens; the shares of the text under each label give one label for the whole text.">
|
|
|
|
| 79 |
|:---|---:|---:|---:|
|
| 80 |
| FineWeb: web pages, 2015 to 2021 | 132,617 | 0.010 | [0.009](https://www.pangram.com/research/model-card/pangram-4-1)<sup>*</sup> |
|
| 81 |
| PERSUADE: student essays | 25,994 | 0.004 | [0.00](https://www.pangram.com/blog/pangram-performance-diverse-student-essays) |
|
| 82 |
+
| PELIC: essays by English learners | 15,000 | 0.23 | [0.01](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 83 |
+
| ELLIPSE: school essays by English learners | 3,909 | 0.00 | [0.00](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 84 |
| Liang et al., TOEFL: essays by non-native speakers | 91 | 0.00 | [0.00](https://www.pangram.com/research/model-card/pangram-4-1) |
|
| 85 |
+
| UChicago (Jabarian and Imas): human texts | 1,992 | 0.05<sup>‡</sup> | [0.00](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 86 |
+
| Epoch AI Style Imitation: skilled human prose | 495 | 0.00 | [0.00](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 87 |
+
| Saha Peer Review: human reviews | 468 | 0.0 | [0.0](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 88 |
+
| Saha Peer Review, easy: human reviews polished by AI | 915 | 3.0<sup>‡</sup> | [1.4](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 89 |
+
| Saha Peer Review, hard: human reviews polished by AI | 1,887 | 8.7<sup>‡</sup> | [2.5](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 90 |
|
| 91 |
**False negative rate (FNR): AI text wrongly labelled**
|
| 92 |
|
| 93 |
| Benchmark | Texts | Smaug-AI-Text-Detector-E4B | Pangram (4 or 4.1) |
|
| 94 |
|:---|---:|---:|---:|
|
| 95 |
+
| MELD-eval, no attack: AI text | 31,448 | 0.00<sup>†</sup> | [0.00](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 96 |
+
| MELD-eval, six attacks: AI text with character and word substitutions | 188,688 | 0.10<sup>†</sup> | [0.01](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 97 |
+
| Sem-Detect: peer reviews written by AI | 6,744 | 0.00<sup>†</sup> | [4.5](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 98 |
+
| UChicago: AI text | 7,968 | 0.29<sup>†</sup> | [0.00](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 99 |
+
| GEDE: essays written by AI | 190 | 0.53<sup>†</sup> | [0.0](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 100 |
+
| Epoch AI Style Imitation: AI that imitates real authors | 594 | 1.68 | [2.86](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 101 |
+
| VUB: academic papers written by AI | 39 | 5.1<sup>‡</sup> | [0.0](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 102 |
+
| Saha Peer Review, easy, AI from a basic prompt | 274 | 0.0<sup>‡</sup> | [1.8](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 103 |
+
| Saha Peer Review, easy, AI from an expert prompt | 274 | 0.0<sup>‡</sup> | [0.0](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 104 |
+
| Saha Peer Review, easy, AI from human key points | 936 | 0.6<sup>‡</sup> | [3.7](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 105 |
+
| Saha Peer Review, hard, AI from a basic prompt | 750 | 0.0<sup>‡</sup> | [0.0](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 106 |
+
| Saha Peer Review, hard, AI from an expert prompt | 600 | 0.0<sup>‡</sup> | [0.0](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 107 |
+
| Saha Peer Review, hard, AI from human key points | 2,000 | 0.3<sup>‡</sup> | [1.1](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf) |
|
| 108 |
|
| 109 |
<sup>†</sup> FNR at 1% FPR (0.1% FPR for Sem-Detect).
|
| 110 |
|
|
|
|
| 121 |
| **Precision** | bfloat16 |
|
| 122 |
| **Training data** | Human text from the web, news, reviews, forums, Wikipedia and books. AI text from models of OpenAI, Anthropic, Google, Z.ai, DeepSeek, MiniMax. The technical blog lists the models |
|
| 123 |
|
| 124 |
+
The design follows the [Pangram 4 Technical Report](https://pangram-public.s3.us-east-1.amazonaws.com/pdf/pangram_4_technical_report.pdf). The [technical blog](https://blog.abacus.ai/blog/2026/11/24/smaug-ai-text-detector) covers the architecture, the training data and how each benchmark is counted.
|
| 125 |
|
| 126 |
<p align="center">
|
| 127 |
<img src="figures/architecture.svg" width="720" alt="Architecture: a text is cut into 512-token windows; each window is written twice and passed through the language model with a LoRA adapter; a token head labels each token of the second copy and a window head estimates the AI share of the window; each sentence takes the label of most of its tokens; the shares of the text under each label give one label for the whole text.">
|