Instructions to use abacusai/Smaug-AI-Text-Detector-35B-A3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use abacusai/Smaug-AI-Text-Detector-35B-A3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="abacusai/Smaug-AI-Text-Detector-35B-A3B", 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-35B-A3B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Smaug-AI-Text-Detector-35B-A3B is an open-weight AI text detector. It labels every sentence of a text as human, AI-generated, or AI-assisted (written by a person, then edited by an AI), and gives one label for the whole text. A smaller, faster model is also available: Smaug-AI-Text-Detector-E4B.
- A label for every sentence. You get which parts of the text carry which label, and how much of the text falls under each label.
- One label for the whole text. Human if at least 90% of the text is labelled human, AI if at least 80% is labelled AI-generated, Mixed otherwise.
Usage
sudo apt-get install python3-dev # Python headers: flash-linear-attention compiles its GPU kernels on first use
pip install torch "transformers>=5.22" numpy flash-linear-attention
from transformers import AutoModel, AutoTokenizer
model_id = "abacusai/Smaug-AI-Text-Detector-35B-A3B"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModel.from_pretrained(model_id, trust_remote_code=True).to("cuda").eval()
text = """I took a pail of water that stood near the rail, and, leaning far out, poured it over my head and shoulders. As I turned, dripping, Jones, relieved of the wheel, touched me on the arm. "Go back to sleep, boy," he said kindly. "We need you, and we're goin' to need you more when we get ashore. You've been talkin' in your sleep till you plumb scared me." But I was wide awake by that time, and he had had as little sleep as I had.
Remote work has fundamentally transformed the modern workplace, offering both significant advantages and notable challenges for organizations and employees alike. One of the most compelling benefits is the flexibility it provides, allowing individuals to design their schedules around personal commitments and peak productivity hours. This autonomy often leads to improved work-life balance and higher overall job satisfaction."""
result = model.analyze(text, tokenizer)
print(result["verdict"]) # 'Human', 'Mixed' or 'AI'
print(result["share"])
for part in result["segments"]:
print(part["label"], "|", result["text_scored"][part["start"]:part["end"]].strip())
Output:
Mixed
{'human': 0.5006, 'ai_assisted': 0.0, 'ai_generated': 0.4994}
human | I took a pail of water that stood near the rail, and, leaning far out, poured it over my head and shoulders. As I turned, dripping, Jones, relieved of the wheel, touched me on the arm. "Go back to sleep, boy," he said kindly. "We need you, and we're goin' to need you more when we get ashore. You've been talkin' in your sleep till you plumb scared me." But I was wide awake by that time, and he had had as little sleep as I had.
ai_generated | Remote work has fundamentally transformed the modern workplace, offering both significant advantages and notable challenges for organizations and employees alike. One of the most compelling benefits is the flexibility it provides, allowing individuals to design their schedules around personal commitments and peak productivity hours. This autonomy often leads to improved work-life balance and higher overall job satisfaction.
start and end count characters in result["text_scored"]. That is your input after a light clean-up: line breaks and repeated spaces become one space, and curly quotes and long dashes become plain ones. The model reads the first 12,000 tokens of a text. Under 50 words the label is unreliable, and result["short"] is set to true.
Benchmarks
All numbers are percentages, and lower is better.
False positive rate (FPR): human text wrongly labelled
| Benchmark | Texts | Smaug-AI-Text-Detector-35B-A3B | Pangram (4 or 4.1) |
|---|---|---|---|
| FineWeb: web pages, 2015 to 2021 | 132,617 | 0.004 | 0.009* |
| PERSUADE: student essays | 25,994 | 0.000 | 0.00 |
| PELIC: essays by English learners | 15,000 | 0.08 | 0.01 |
| ELLIPSE: school essays by English learners | 3,909 | 0.00 | 0.00 |
| Liang et al., TOEFL: essays by non-native speakers | 91 | 0.00 | 0.00 |
| UChicago (Jabarian and Imas): human texts | 1,992 | 0.00โก | 0.00 |
| Epoch AI Style Imitation: skilled human prose | 495 | 0.00 | 0.00 |
| Saha Peer Review: human reviews | 468 | 0.0 | 0.0 |
| Saha Peer Review, easy: human reviews polished by AI | 915 | 1.4โก | 1.4 |
| Saha Peer Review, hard: human reviews polished by AI | 1,887 | 5.9โก | 2.5 |
False negative rate (FNR): AI text wrongly labelled
| Benchmark | Texts | Smaug-AI-Text-Detector-35B-A3B | Pangram (4 or 4.1) |
|---|---|---|---|
| MELD-eval, no attack: AI text | 31,448 | 0.01โ | 0.00 |
| MELD-eval, six attacks: AI text with character and word substitutions | 188,688 | 0.01โ | 0.01 |
| Sem-Detect: peer reviews written by AI | 6,744 | 0.00โ | 4.5 |
| UChicago: AI text | 7,968 | 0.15โ | 0.00 |
| GEDE: essays written by AI | 190 | 0.00โ | 0.0 |
| Epoch AI Style Imitation: AI that imitates real authors | 594 | 1.18 | 2.86 |
| VUB: academic papers written by AI | 39 | 0.0โก | 0.0 |
| Saha Peer Review, easy, AI from a basic prompt | 274 | 0.0โก | 1.8 |
| Saha Peer Review, easy, AI from an expert prompt | 274 | 0.0โก | 0.0 |
| Saha Peer Review, easy, AI from human key points | 936 | 0.0โก | 3.7 |
| Saha Peer Review, hard, AI from a basic prompt | 750 | 0.0โก | 0.0 |
| Saha Peer Review, hard, AI from an expert prompt | 600 | 0.0โก | 0.0 |
| Saha Peer Review, hard, AI from human key points | 2,000 | 0.0โก | 1.1 |
โ FNR at 1% FPR (0.1% FPR for Sem-Detect).
โก Counted by the rule the Pangram 4 report uses for this benchmark.
* Pangram's number is on its own sample of web pages, which is not public.
Model
| Base model | Qwen/Qwen3.6-35B-A3B, language model only (no vision part), with our LoRA adapter merged into the weights |
| Parameters | 34.2B, of which about 3B are active for each token (mixture of experts) |
| Precision | bfloat16 |
| Training data | Human text from the web, news, reviews, forums, Wikipedia, books and learner essays. AI text from models of OpenAI, Anthropic, Google, Z.ai, DeepSeek, MiniMax, xAI, Alibaba. The technical blog lists the models |
The design follows the Pangram 4 Technical Report. The technical blog covers the architecture, the training data and how each benchmark is counted.
- Windows. The text is split into windows of 512 tokens with a stride of 256.
- Two copies. The base model reads left to right, so a token cannot see what comes after it. Each window is therefore written twice, and the labels are read from the second copy, where every token has seen the whole window.
- Token head. A linear layer gives every token one of three labels: human, AI-assisted or AI-generated.
- Window head. A second linear layer estimates the AI share of the whole window, in 15 buckets from 0% to 100%.
- Sentences and the whole text. Each sentence takes the label of most of its tokens. The share of the text under each label then gives the label for the whole text.
Limitations
- Humanizer tools. These rewrite AI text so that detectors miss it. The model was not trained on such text.
- Short texts. Under 50 words there is too little to go on.
- English only.
License
Apache 2.0, the same license as the base model.
- Downloads last month
- 112
Model tree for abacusai/Smaug-AI-Text-Detector-35B-A3B
Base model
Qwen/Qwen3.6-35B-A3B