Compressing a ~500MB RoBERTa AI-text detector to ~97MB that runs fully in-browser

Alternative_Detail31 · reddit · 2026-10-12

Developer ritabratamaiti released tinydetect, an AI text/image detector that runs fully client-side in the browser via ONNX Runtime Web — no uploads. The text model (fakespot-ai RoBERTa base) went from 500MB fp32 to 97MB via a light fine-tune + WiSE-FT interpolation, int4-quantized embeddings stored separately (21MB), and mixed-precision quantization of the transformer body, with the BPE tokenizer and preprocessing re-implemented in JS. The image model is a 26MB quantized Community Forensics ViT. Runtime uses WebGPU when available, threaded WASM otherwise, with a service worker adding COOP/COEP headers and caching; after warm-up, a 100-token text check takes 60ms and an image 200ms. Limitations: scores are signals, not proof — short text, paraphrasing, and screenshots degrade accuracy. Code and scripts are open-source.

Original post →

More from Apps

Apps channel →