Oxidane/tmr-ai-text-detector
onnx-community/tmr-ai-text-detector-ONNX
text-classification
1. Live Client-Side AI vs Human Stylometry Desk
Choose a curated prose preset, drag & drop or paste (Ctrl/Cmd+V) text, or type your own passage:
.txt, .md, .csv, or .json file here, or press
Ctrl/Cmd+V anywhere outside editable fields. All inference runs locally in a Web Worker.
2-Class Provenance Probability
Logit Margin & Stylometric Breakdown
ln(P(AI)/P(Human)), binary Shannon entropy
(0.000 = confident, 1.000 = 50/50 split), sentence-length burstiness CV, and lexical
type-token ratio (TTR).
2. How TMR (Target Mining RoBERTa) Works in Browser
Oxidane/tmr-ai-text-detector fine-tunes 12-layer roberta-base with
Focal Loss (gamma=2.0, alpha=[0.85, 0.15]) and iterative
Self-Hard-Negative mining — repeatedly retraining on human samples that the previous
checkpoint misflagged as AI to suppress false positives on the RAID benchmark.
import { pipeline } from "https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.7.5";
const detector = await pipeline(
"text-classification",
"onnx-community/tmr-ai-text-detector-ONNX",
{ device: "wasm", dtype: "q8" }
);
const scores = await detector("Your prose passage here...", { top_k: 2 });