23 · Safety · Open weights
Aadhaar, PAN, UPI and 24 more labels, located.
cbx-indim-pii-extractor-32M
Locates personal data in Indian-language and English text across 27 labels, including Aadhaar, PAN and UPI IDs.
Real inputs it was built for.
Not in the hosted Playground yet. Run it from the open weights on Hugging Face.
Hindi
मेरा नाम रवि कुमार है, मोबाइल 98765 43210 और UPI ravi.k@okbank है।
English
Please update the PAN on my account to ABCDE1234F and send the form to [email protected].
Benchmark
Measured against the alternative.
- cbx-indim-pii-extractor-32M0.91
- mmBERT-base (307M)0.916
- IndicBERT v2 (278M)0.904
- mmBERT-small (140M)0.897
From the model card
Finds personal information (PII) in Indian text and returns the exact position of each value with one of 27 labels, including Aadhaar, PAN, UPI IDs, IFSC codes, voter IDs and vehicle numbers. It reads 12 Indian languages and Indian English (Hindi, Bengali, Marathi, Tamil, Telugu, Kannada, Malayalam, Gujarati, Punjabi, Odia, Assamese, Urdu), in native script, romanized (Indian languages in English letters) and code-mixed text. It is InDIM-small (32M) fine-tuned for PII tagging: about 9 ms for a short message and 50 ms for a 600-token document on a CPU (8 threads).
Full results. Every number, from the card.
Every model below was fine-tuned on the same synthetic training data with the same recipe (plain fine-tuning, learning rate picked on validation), and all were given confidence thresholds tuned the same way on the IndicPIIDetX dev split. Mean of 3 training runs unless marked; mmBERT-base is 1 run.
Independent test sets (not generated by us; typed F1 = a predicted span counts if it overlaps a true value of an accepted type):
| Model | Parameters | IndicPIIDetX test, 27 labels | IndicPIIDetX, 14 shared types | PII-free documents flagged ↓ | Ylemis India-PII | IndiaPII-Bench | IndiaPII decoys hit ↓ |
|---|---|---|---|---|---|---|---|
| InDIM-small (this model's base) | 32M | 0.910 | 0.951 | 39.0% | 0.986 | 0.960 | 20.0% |
| mmBERT-small | 140M | 0.897 | 0.931 | 35.0% | 0.985 | 0.949 | 16.2% |
| mmBERT-base (1 run) | 307M | 0.916 | 0.958 | 33.4% | 0.984 | 0.951 | 11.8% |
| IndicBERT v2 | 278M | 0.904 | 0.952 | 48.0% | 0.987 | 0.951 | 13.0% |
- IndicPIIDetX (DOI 10.57967/hf/11457): test split, 8,028 documents written independently of our training data.
- Ylemis India-PII (CC0) and IndiaPII-Bench (CC BY 4.0, includes ID-shaped decoys that are not PII).
- This repository holds the training run with the best validation score: IndicPIIDetX 0.910 (27 labels) / 0.951 (14 types), PII-free documents flagged 38.6%, Ylemis 0.984, IndiaPII-Bench 0.957, decoys hit 23.5%.
- InDIM-small finds more PII than mmBERT-small and IndicBERT v2 on IndicPIIDetX and IndiaPII-Bench, close to mmBERT-base at a tenth of its size, but raises more false alarms than the mmBERT models (see Limitations).
Our synthetic test (7,370 documents, exact-span F1): InDIM-small 0.992, mmBERT-small 0.993, mmBERT-base 0.994, IndicBERT v2 0.970. Rows longer than 512 tokens: InDIM-small 0.996 (shorter rows 0.991).
Know its limits. Before you ship it.
Limitations
- Trained on synthetic text only. Real documents contain layouts, typos and value formats the generator did not produce; scores on real data are lower than on our own test set (compare the tables above).
- False alarms: about 39% of PII-free IndicPIIDetX documents get at least one span, and about 20% of IndiaPII decoys (ID-shaped numbers that are not personal data) are tagged. Review redactions where over-redaction matters, or raise the thresholds in
pii_config.json. - Sensitive attributes such as health, religion or caste are not detected. Names that are also common words can be missed, and labels can be confused between ID types with similar formats.
- No tool finds all PII. Do not rely on it as the only safeguard for legal or regulatory compliance.
Training data
What it learned from.
InDIM-small (32M) fine-tuned as a BIO token tagger on 59,080 synthetic documents (chats, forms, emails, transcripts, statements; native script, romanized and code-mixed) in the 13 languages (plain fine-tuning, learning rate 2e-4).
One size. Smaller is faster, larger is more accurate.
Run it on your own infrastructure. Open weights on Hugging Face.
Download the model, run it beside your own systems, and talk to us about tuning it to your data.