IndoPII Base is the accurate variant of the IndoPII Indonesian personal-data detector. It uses an XLM-R-base token tagger (12 layers, pruned 32k vocabulary, INT8 ONNX, 188 MB). It is the teacher model distilled into IndoPII Mini.
It runs on CPU in about 20 ms per sentence and about 120 ms per 1,000-character document with 4 threads. Choose it over Mini when recall matters more than throughput, for example in compliance audits or for real-world prose.
Install the indopii package from the Mini repository, then select the base model:
pip install "git+https://huggingface.co/AIbnuHibban/indopii-mini"
from indopii import Detector
det = Detector(model="base")
print(det.redact("Pasien Ny. Siti Aminah Lubis, perempuan, No. BPJS 0001234567891, alamat Jl. Sei Batang Hari No. 21, Medan.",
mode="tag").text)
# Pasien Ny. [NAME], [GENDER], No. BPJS [BPJS], alamat [ADDRESS].
The Mini model card documents everything else: labels, redaction modes, CLI, rule engine and annotation conventions.
| Test set | Base | Mini |
|---|---|---|
| IndoPII-Bench test (480 documents, 2,591 spans): strict F1 | 0.930 | 0.897 |
| IndoPII-Bench test: macro F1 over 21 labels | 0.917 | 0.907 |
| IndoPII-Bench test: leak (personal data not fully redacted) | 4.0% | 7.9% |
Real-text track (450 real sentences, NAME/ADDRESS): strict F1 |
0.820 | 0.737 |
| Real-text track: leak | 4.0% | 21.2% |
| Name-ambiguity challenge (200 minimal pairs): pair accuracy | 0.790 | 0.665 |
| ms per ~1,000-character document (Ryzen 5 6600H, 4 threads) | 116 | 8.5 |
Strongest per-label scores:
| Label | F1 |
|---|---|
NIP, SIM, PLATE |
1.000 |
RELIGION |
0.991 |
EMAIL |
0.989 |
BIRTH_PLACE |
0.979 |
PHONE |
0.971 |
BIRTH_DATE |
0.958 |
NIK |
0.957 |
NAME |
0.933 |
ADDRESS |
0.862 |
Weakest per-label scores:
| Label | F1 |
|---|---|
PASSPORT |
0.720 |
KK |
0.755 |
IP_ADDRESS |
0.827 |
Every baseline and the full protocol are in the benchmark card.
The main benchmark is LLM-written and LLM-adjudicated. Out of scope:
Organisation contacts are intentionally not treated as personal data. Detection supports, but does not guarantee, UU PDP compliance.
The model weights and code are released under Apache-2.0. The base model, XLM-R, is MIT. Data sources and their licenses are listed in the Mini card.
FacebookAI/xlm-roberta-base