Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLMSniff

AI-text detection, works locally.

I made LLMSniff while writing and reviewing papers because checking text with online AI detectors felt awkward with all the copy-pasting and/or file uploading. It also meant sending parts of papers to a third party, which can be a privacy risk for sensitive work.

A floating orb that sits on top of your other windows and checks selected text for AI-generated writing. Select text anywhere - a browser, a PDF, Word - and click the orb.

Scoring a document

Tested on Windows 10 22H2 and Ubuntu 24.04.3 LTS.

Install

pip install -r requirements.txt
python download_models.py
python run.py

The second step downloads the 2 detector models, 1.9 GB. On Ubuntu, install Tk first: sudo apt install python3-tk

Using it

Select text, click the orb, read the panel. Drag the orb anywhere on screen.

Two numbers are reported: AI-generated and AI-assisted, as percentages of the words you selected. The band - LOW, MEDIUM, HIGH - reflects how much of the selection is AI. DETAILS expands the breakdown; the Considered ablations tick controls whether boilerplate is excluded.

Below about 300 words the result is a hint, and below 50 it is refused.

Everything runs on your machine. Nothing is uploaded.

Models

size
e5-small-lora 133 MB fast
desklib 1.7 GB scores closest to online tools

desklib is picked when there is a GPU to run it, e5-small otherwise. Right-click the orb to change it.

The GPU comes from which onnxruntime package is installed. requirements.txt picks the right one for Windows. Linux gets the CPU package, because the GPU one is CUDA-only and fails on machines without an NVIDIA card - swap it yourself if you have that setup:

pip uninstall onnxruntime && pip install onnxruntime-gpu

How it scores

The method follows the ai_detection module of RefChecker: the same 350-word windows at 50% overlap, the same thresholds, the same rules for marking passages.

The selection is cut into overlapping passages, each starting halfway through the last, so no sentence is judged only by where a boundary happened to fall. A passage is only marked if a neighbouring one agrees with it, which stops a single odd paragraph colouring the whole document.

Three real results - a page of The Odyssey, a half-and-half Word document, and a ChatGPT answer:

The same check on human, mixed and AI text

A high score is a reason to look more closely. It is not proof. English only.

Licence

MIT

About

Detect AI-generated writing in any selected text, right from your desktop. Runs entirely on-device.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages