aiframe-v3

Small English classifier behind the AI Frame browser extension, which marks paragraphs that read like AI while you browse. It runs entirely in the browser (transformers.js, ONNX int8); no text leaves the device. Labels: ai and human. "Reads like AI" is a signal about style, not a claim about who wrote a text.

Distillation teacher

Trained with soft labels from desklib/ai-text-detector-v1.01 by Desklib (DeBERTa v3 large), released under the MIT License, alongside the hard labels (teacher weight 0.5). Thank you to Desklib for publishing it. Its licence notice:

desklib/ai-text-detector-v1.01, by Desklib, MIT License.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Training data

  • RAID (Dugan et al., 2024), train split, domains news, reviews, reddit, wiki and books, no adversarial attacks, balanced human and AI, each document cut to a random 40 to 180 word window to match what the extension scores. Train and test are split by source document.
  • Fresh samples from current models: 0 rows (none in this version; no API keys were available).

The teacher was itself trained on RAID, so its scores on the held out RAID windows below may be optimistic.

Results on the held out set (int8 ONNX, as shipped)

4005 windows, AUROC 0.9742.

Threshold AI caught Human text flagged
0.50 96.4% 22.0%
0.60 95.5% 17.0%
0.70 94.5% 13.6%
0.80 93.0% 10.1%
0.90 90.7% 6.3%
0.95 87.7% 3.8%

PyTorch before quantisation: AUROC 0.9712. Quantisation: ort_u8 (onnxruntime dynamic int8, unsigned weights, per tensor), largest difference from PyTorch on the sample texts 0.015.

Benchmark against the teacher

Share of AI caught when the threshold is set so that 1%, 2% or 5% of human windows are flagged, and AUROC, on the same held out windows.

Model AUROC caught at 1% caught at 2% caught at 5%
Teacher: desklib/ai-text-detector-v1.01 0.9698 80.4% 83.5% 87.7%
Student (distilled), int8 ONNX as shipped 0.9742 78.8% 83.6% 89.2%
Student (distilled), PyTorch 0.9712 75.5% 81.7% 88.4%
Student (baseline, no teacher), int8 ONNX 0.9751 73.5% 84.2% 89.5%
Shorla/aiframe-v1, int8 ONNX 0.9765 79.9% 85.4% 90.0%

Use

In the AI Frame extension, the model location is https://huggingface.co/Shorla/aiframe-v3. Files: config.json, tokenizer.json, tokenizer_config.json, special_tokens_map.json, onnx/model_quantized.onnx.

Downloads last month
31
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Shorla/aiframe-v3

Quantized
(17)
this model

Dataset used to train Shorla/aiframe-v3