Jasmineame/detect-LLM-tokens
4
StatDetectLLM
An interactive Streamlit demo for token-level detection of human-AI-coauthored text. Paste a passage and the app highlights individual tokens that exhibit statistical signatures consistent with machine generation.
⚠️ This is a research demo, not a production content verifier. The highlighted tokens are statistical evidence, not ground-truth attribution.
What the demo shows
- Binary mode — tokens classified as likely machine-generated are highlighted in a soft rose color; human-likely tokens are left unmarked.
- Score mode — each token is shaded along a rose gradient; darker shading indicates stronger statistical evidence of machine generation.
- LLM-generated proportion — the fraction of tokens that the current binary clustering labels as LLM-generated.
The visualization is produced by a token-level statistical detector. It scores every token using a local context window and then calibrates the scores into a per-text binary split.
Demo controls
Run locally
pip install -r requirements.txt
streamlit run src/app.pyEnvironment notes
- The app uses CUDA when available and falls back to CPU otherwise.
- On Hugging Face Space the app runs on CPU and caches downloaded models under
/tmp/huggingface_cache.
Citation
If you use the underlying method in your research, please consider citing the related paper:
