A small classification model that checks whether Japanese text explicitly states personal or sensitive information. It does not generate text.
This page records the specification and evaluation. Example verdicts and the setup steps are on the overview page; why I built the model is in a note. The permissions, storage and network use of the Legacy Tools extensions are published on the technical transparency page.
Time to judge one 200-character text (p50), measured on a development PC with 4 CPUs
Designed for 4 CPUs and no GPU. No network needed at run time
70,157,586 parameters. The base model is sbintuitions/modernbert-ja-70m
For each of six categories, one of three labels and a probability
Safe Privacy Detect is a model built for Japanese text. Both the base model and the categories it judges are fitted to Japanese and to the Japanese context.
The base model is sbintuitions/modernbert-ja-70m, made for Japanese text only.
The six categories include information specific to Japan, such as the registered domicile (honseki, down to the municipality).
Sentences with an unclear subject, indirect wording, hearsay or guesswork, masked text. When the text alone cannot settle it, it returns ABSTAIN.
Pass it Japanese text. Mainly a single chat message (up to 200 characters); up to 800 characters are accepted. Texts over 200 characters are best split by the caller and sent in parts.
{"name": {"status": "NOT_DETECTED", "probabilities": {...}},
"health": {"status": "DETECTED", ...}, ...}
It does not return which part of the text matched. The text itself is not written to the output or to any log.
The bundled script predict.py returns two further statuses: OUT_OF_SCOPE (an unsupported category ID, near-empty text, text in which less than 30% of the characters are Japanese, or text over 800 characters) and FAILED (a runtime error or a timeout; the default is 1,000 ms).
| Characters | p50 | p95 | Texts per second |
|---|---|---|---|
| 50 | 7.5 ms | 10.6 ms | 129 |
| 100 | 11.7 ms | 17.2 ms | 80 |
| 200 | 18.5 ms | 24.8 ms | 52 |
| 400 | 35.9 ms | 47.1 ms | 27 |
| 800 | 63.5 ms | 78.7 ms | 15 |
Development PC (AMD Ryzen 7 5700X, WSL, limited to 4 CPUs), 200 runs per condition, 2026-11-23, v0.2.0. 32-bit ONNX, ONNX Runtime 1.23.2, 4 threads, one text at a time. Network time is not included. 3.7 seconds from start-up to the first response; peak resident memory about 1.25 GB.
On AWS (c7i.xlarge, 4 vCPUs, Tokyo region, 2026-11-24, v0.2.0): p50 26.1 ms and p95 29.2 ms at 200 characters, and p50 103.5 ms and p95 107.7 ms at 800 characters, which is over 100 ms. 4 vCPUs correspond to 2 physical cores, so it is slower than the development PC. Speed depends on the type and number of CPUs, so measuring again with the bundled bench.py is recommended.
35 of the 36 items meet their targets.The miss rate for union, 5.0% (8 of 159, 5.03%), does not reach the target of 5% or less.
| Category | Miss rate | False positives (ordinary) | False positives (confusable) | Abstain rate | Abstain correctness | ECE |
|---|---|---|---|---|---|---|
| name | 0.5% | 2.5% | 1.7% | 0.0% | 100.0% | 0.018 |
| health | 3.7% | 0.1% | 10.0% | 0.1% | 93.9% | 0.005 |
| crime | 3.0% | 0.1% | 3.3% | 0.1% | 87.8% | 0.002 |
| honseki | 3.8% | 0.0% | 3.3% | 0.1% | 92.0% | 0.002 |
| union | 5.0% | 0.1% | 0.0% | 0.2% | 91.5% | 0.007 |
| belief | 4.4% | 0.0% | 0.0% | 0.1% | 93.6% | 0.003 |
| Target | 5% or less | 3% or less | 10% or less | 10% or less | 70% or more | 0.05 or less |
2026-11-23, 1,800 sentences, run once for this version. 32-bit ONNX, values after calibration. The evaluation set is synthetic, with sentences 6 to 110 characters long. The targets are proposals set by the developer.
We welcome questions about applying it to your work, and joint evaluation.
Enquiries are taken on the support page of legacy-tools.dev.