Instructions to use abacusai/Smaug-AI-Image-Detector-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use abacusai/Smaug-AI-Image-Detector-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible embeddings server: llama serve -hf abacusai/Smaug-AI-Image-Detector-GGUF:Q8_0 --embeddings
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible embeddings server: llama serve -hf abacusai/Smaug-AI-Image-Detector-GGUF:Q8_0 --embeddings
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible embeddings server: ./llama-server -hf abacusai/Smaug-AI-Image-Detector-GGUF:Q8_0 --embeddings
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible embeddings server: ./build/bin/llama-server -hf abacusai/Smaug-AI-Image-Detector-GGUF:Q8_0 --embeddings
- LM Studio
- Jan
- Ollama
How to use abacusai/Smaug-AI-Image-Detector-GGUF with Ollama:
ollama run hf.co/abacusai/Smaug-AI-Image-Detector-GGUF:Q8_0
- Unsloth Desktop
- Docker Model Runner
How to use abacusai/Smaug-AI-Image-Detector-GGUF with Docker Model Runner:
docker model run hf.co/abacusai/Smaug-AI-Image-Detector-GGUF:Q8_0
- Lemonade
How to use abacusai/Smaug-AI-Image-Detector-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull abacusai/Smaug-AI-Image-Detector-GGUF:Q8_0
Run and chat with the model
lemonade run user.Smaug-AI-Image-Detector-GGUF-Q8_0
List all available models
lemonade list
- Atomic Chat
1. About
The official GGUF build of Smaug-AI-Image-Detector for llama.cpp, converted by Abacus.AI from the released weights and checked image by image against the PyTorch model.
The detector is an image encoder followed by a small classification head. llama.cpp runs the encoder and returns an image
embedding; head.json (768 weights and a bias) and smaug_image_detect_gguf.py turn that embedding into the probability
that the image is AI-generated, using the same 528 ร 528 crops as the PyTorch release. A GGUF file on its own returns an
embedding, not a verdict.
2. Files
| File | Size | Use |
|---|---|---|
Smaug-AI-Image-Detector-f16.gguf | 558 MB | Language model (f16): reference, closest to PyTorch |
Smaug-AI-Image-Detector-Q8_0.gguf | 310 MB | Language model (Q8_0): recommended |
mmproj-Smaug-AI-Image-Detector-f16.gguf | 367 MB | Vision encoder (f16): reference, closest to PyTorch |
mmproj-Smaug-AI-Image-Detector-Q8_0.gguf | 226 MB | Vision encoder (Q8_0): recommended |
head.json | 10 KB | Classification head: 768 weights and a bias |
smaug_image_detect_gguf.py | 4 KB | Client: crops, llama.cpp embedding, head |
Use a language model and a vision encoder (mmproj) of the same precision: f16 with f16, or Q8_0 with Q8_0.
3. Accuracy vs. the PyTorch Release
| Language model + vision encoder | Download | AUC | Average probability difference | Largest probability difference | Verdicts changed | Seconds per image (CPU) |
|---|---|---|---|---|---|---|
| f16 + f16 | 925 MB | 0.9722 | 0.0079 | 0.1714 | 0 of 200 | 2.0 |
| Q8_0 + Q8_0 (recommended) | 536 MB | 0.9720 | 0.0065 | 0.1981 | 0 of 200 | 2.4 |
Measured on 200 real-world images from the OpenFake Reddit test split (100 real photos, 100 AI-generated), three crops each,
against the PyTorch release on the same images (AUC 0.9723). "Verdicts changed" counts images that land on the other side of
the 0.5 threshold. The token sequence and pixels are identical to the PyTorch release; the small remaining differences come from
floating-point arithmetic and are largest for images close to the threshold. CPU timings: 16-core (32-thread) Intel Xeon, llama.cpp default threads, f174553. Full benchmark results are on the
main model card.
4. Usage
# 1. Download one language model, one vision encoder, the head and the client
hf download abacusai/Smaug-AI-Image-Detector-GGUF \
Smaug-AI-Image-Detector-Q8_0.gguf mmproj-Smaug-AI-Image-Detector-Q8_0.gguf head.json smaug_image_detect_gguf.py \
--local-dir smaug
# 2. Serve the image encoder with llama.cpp
llama-server -m smaug/Smaug-AI-Image-Detector-Q8_0.gguf --mmproj smaug/mmproj-Smaug-AI-Image-Detector-Q8_0.gguf \
--embeddings --pooling mean --image-max-tokens 140 --port 8080
# 3. Score images
pip install pillow requests
python smaug/smaug_image_detect_gguf.py photo.jpg another.png
from smaug_image_detect_gguf import SmaugImageDetectGGUF
detector = SmaugImageDetectGGUF("http://127.0.0.1:8080") # the llama-server from step 2
detector("photo.jpg") # -> float in [0, 1]
detector(["a.jpg", "b.png", pil_image]) # -> list of floats
detector("photo.jpg", crops=1) # 3x faster
--pooling mean and --image-max-tokens 140 are required: they match how the detector was trained. 0.5 is a good default
threshold; raise it when a false alarm is costly.
5. How It Works
| 1. Crops | Shorter side resized to 576 px, then three 528 ร 528 crops along the long side (client) |
| 2. Embedding | EmbeddingGemma-2 vision encoder and language model, mean-pooled and L2-normalized, 768 dimensions (llama.cpp) |
| 3. Score | Linear head on each crop's embedding, logits averaged, then a sigmoid (client, head.json) |
6. License
Apache 2.0, the same license as the base model, EmbeddingGemma-2.
7. Citation
@misc{abacusai2026smaugaiimagedetector,
title = {Smaug-AI-Image-Detector},
author = {Abacus.AI},
year = {2026},
url = {https://huggingface.co/abacusai/Smaug-AI-Image-Detector}
}
- Downloads last month
- 71
8-bit
16-bit
Model tree for abacusai/Smaug-AI-Image-Detector-GGUF
Base model
google/embeddinggemma-2