This model is a screening signal. It is not a forensic authorship test and
must not be treated as proof that a person did or did not use generative AI.
At a glance
Decision question
Answer
Primary audience
Frontend engineers, ML engineers, researchers, and product teams that need browser-side text screening
Recommended variant
q4, about 181 MB; use q8 if the runtime cannot execute the q4 graph
Reference variant
fp32, about 1.11 GB
Output
Two-class classification: human and ai
Evidence languages
English, Simplified Chinese, and Vietnamese in the upstream evaluation
Experimental website languages
English, Simplified Chinese, Traditional Chinese, and Japanese
Privacy model
The demo performs inference locally after public model files are downloaded
License
MIT for the published conversion project; retain upstream model attribution
Who should use this model?
Browser and frontend developers
Use it when you need a JavaScript-callable ONNX model, want text to remain in
the browser, or need a smaller q4/q8 alternative to a server-only detector.
The important trade-offs are download size, first-load time, browser memory,
operator support, and a reliable fallback path.
ML engineers and researchers
Use it as a reproducible browser packaging of an existing multilingual
classifier. The source revision, conversion script, quantizers, fixtures, and
report are available in the companion
GitHub repository.
The upstream benchmark and its small, in-domain test set should be reviewed
before drawing conclusions.
Product teams
Use it for a low-friction first-pass signal in writing, education, moderation,
or content-quality workflows. It can reduce server-side inference work and
keep ordinary input text out of an application API, but the result should be
combined with writing history, source review, or human judgment.
Do not use this model as the sole basis for academic misconduct decisions,
employment decisions, legal conclusions, or irreversible moderation actions.
Fall back to q8 only when q4 loading or execution is unsupported.
Use an explicitly configured R2/CDN mirror only when the primary URL fails.
Pin a model revision and cache immutable files; do not mix q4, q8, and FP32
under one unversioned path.
Installation
Install Transformers.js in a browser project:
npm install @huggingface/transformers
The conversion scripts and Python environment are maintained separately in the
GitHub source repository.
You do not need Python to consume the published browser model.
Usage
Load q4 with Transformers.js:
js
1import{ pipeline }from'@huggingface/transformers'23const detector =awaitpipeline(4'text-classification',5'mujian2026/multilingual-ai-text-detector',6{dtype:'q4'},7)89const result =awaitdetector('This is a sample passage.')10console.log(result)
The returned label is human or ai. The score is a model confidence signal,
not a calibrated probability of authorship. In a multilingual product, select
the UI language for user experience, but do not present the result as a
language-independent guarantee.
Benchmark
The upstream model card reports F1 on 270 held-out examples, with 90 examples
per language:
Language
Reported F1
English
0.9890
Vietnamese
0.9783
Chinese
0.9462
Overall
0.9710
These are in-domain results from the upstream test split. They are not a
universal accuracy claim. On the same reported split, a TF-IDF logistic
regression baseline reached 0.9776 overall F1, while the XLM-R detector reached
0.9710. This model should therefore be evaluated on the domain, languages, and
generators that matter to your application before adoption.
The source evaluation used AI answers generated with Qwen2.5-1.5B-Instruct.
Performance on GPT, Gemini, Claude, newer Qwen models, translated text,
paraphrases, or heavily edited text is not established by that benchmark.
Quantization benchmark
The published variants were compared with the FP32 ONNX export on six short
English, Chinese, and Japanese fixtures using CPU ONNX Runtime:
Variant
Approx. size
Mean probability delta
Max delta
Label flips
FP32
1.11 GB
reference
reference
reference
q4
181 MB
0.0041
0.0231
0 / 6
q8
279 MB
0.0804
0.3672
0 / 6
All three variants were also loaded and executed with the browser WASM runtime
before publication. This is a conversion smoke test, not a representative
multilingual benchmark. Re-run evaluation after changing the source revision,
quantizer, or runtime.
Model origin and training data
This repository contains an ONNX export and quantized derivatives; it does not
claim to have trained a new detector. The source checkpoint is fine-tuned from
FacebookAI/xlm-roberta-base
and predicts human versus ai.
According to the upstream model card:
Training used 900 QA pairs: 300 English, 300 Chinese, and 300 Vietnamese.
Human examples came from HC3 Reddit ELI5, HC3-Chinese Open QA, and Vietnamese
Reddit communities.
AI examples were generated with Qwen2.5-1.5B-Instruct.
The setup used three epochs, learning rate 2e-5, maximum length 256, and a
prompt-level 70/15/15 train/validation/test split with seed 42.
The model has approximately 279M XLM-RoBERTa-base parameters plus a
sequence-classification head.
Language scope and limitations
The upstream evaluation covers English, Simplified Chinese, and Vietnamese.
The free online AI text detector on MyToolster.com
also routes Traditional Chinese and Japanese through the same XLM-R classifier.
Traditional Chinese and Japanese are experimental signals here and are not
independently calibrated probabilities.
The classifier learns patterns from its training distribution; it does not
inspect hidden metadata or a universal AI signature. False positives and false
negatives are expected. Short inputs, translation, editing, paraphrasing,
domain vocabulary, and generator changes can materially affect the result.
Use the detector as one input to a broader review, not as a standalone verdict.
Files
text
1q4/onnx/model_q4.onnx # 4-bit browser variant
2q8/onnx/model_quantized.onnx # 8-bit browser variant
3fp32/onnx/model.onnx # FP32 reference variant
4*/config.json # label mapping and model configuration
5*/tokenizer.json # tokenizer files for each variant
6quantization-report.json # conversion comparison report
The conversion and quantization source is maintained in the
GitHub repository.
Citation and license
If you use the underlying detector or cite its training/evaluation results,
cite the upstream work:
bibtex
1@misc{vu2024multilingual,
2 title = {Multilingual AI-Human Text Detection},
3 author = {Vu, Tuong Vy},
4 year = {2024},
5 url = {https://github.com/vutuongvy101/multilingual-ai-human-text-detection}
6}
The published conversion project is MIT-licensed. The fine-tuned source
checkpoint and training work belong to the upstream authors; retain their
attribution and license when redistributing the model files.