/ Модель

Характеристики

Контекст
8 192 токена
Параметры
36,4 млн
Лицензия
Apache 2.0
Архитектура
modernbert · dense
Базовая модель
mmBERT-small
Опубликована
5 ноя 2026

cbx-indic-pii-extractor-36M

Заполнение пропусковТекст → текст5 профессий

Компактная модель CobuildX находит и размечает персональные данные в текстах на языках Индии и индийском английском для последующей проверки или редактирования.

144скачиваний за 30 дней3лайкавеса обновлены5 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

cbx-indic-pii-extractor-36M — компактная модель CobuildX для обнаружения персональных данных в индийских текстах и определения точных границ найденных значений с помощью 27 меток. Это дообученная и дистиллированная версия модели cbx-indic-pii-extractor-58M: в ней 36,4 млн параметров, 11 слоёв ModernBERT с чередованием полного и локального внимания и контекст до 8192 токенов. Модель рассчитана на 12 языков Индии и индийский английский, включая тексты на родном письме, латинице и с переключением между языками. Она распознаёт, в частности, Aadhaar, PAN, UPI ID, IFSC, телефонные номера, адреса электронной почты и имена; доступна в форматах Safetensors и ONNX.

Модель подходит для выявления и последующей редакции персональных данных в сообщениях, документах, формах и расшифровках звонков. По данным карточки, версия 36M быстрее на CPU, чем вариант 58M; качество обнаружения зависит от типа данных, и некоторые классы распознаются менее надёжно. Модель обучена только на синтетических текстах, не обнаруживает чувствительные атрибуты вроде сведений о здоровье, религии или касте, а соседние значения в JSON или CSV могут объединяться в один фрагмент. Разработчик рекомендует проверку человеком там, где требуется полное удаление данных. Лицензия — Apache-2.0.

Сценарии применения

  • поиск Aadhaar, PAN и других индийских идентификаторов в документах
  • обнаружение имён, телефонов и адресов электронной почты в сообщениях
  • выявление персональных данных в формах и письмах на языках Индии
  • поиск PII в транскриптах звонков и чатах с переключением языков
  • подготовка текстов к редактированию или маскированию персональных данных

Ограничения

Обучение проводилось только на синтетических текстах; редкие имена и некоторые типы идентификаторов могут пропускаться или классифицироваться неверно, а соседние значения в JSON или CSV могут объединяться. Модель не распознаёт чувствительные атрибуты вроде сведений о здоровье, религии и касте; для полного удаления данных нужна проверка человеком.

Для каких профессий подходит5

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

cbx-indic-pii-extractor-36M

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, romanised (Indian languages in English letters) and code-mixed text. 36.5M parameters; about 19 ms for a short message and 129 ms for a 2,000-character document on a CPU (8 threads), about 8 ms on a GPU.

This is the size to use on CPU: about half the CPU time of the 58M. Also available in 58M and 17M sizes. Distilled from a larger internal model, which scores higher (see Results) and is not released.

How it was made

  • Smaller version of cbx-indic-pii-extractor-58M. It keeps 11 of the 58M's 22 layers (every second layer, so the mix of full and local attention stays the same) and its 40,000-token vocabulary.
  • Retrained on the same data, learning from both the labels and the predictions of a larger internal model (knowledge distillation; the teacher is not released).

Labels

LabelCovers
PERSONNames, including first names or surnames on their own and initials; titles (Shri, Dr, ji) are not part of the name
PHONEPhone numbers
EMAILEmail addresses
ADDRESSPostal addresses including the PIN code, and a PIN code on its own (a city or state on its own is not labelled)
DATE_OF_BIRTHDates of birth
DATEEvery other date, in any format and script, with a time written next to it
AMOUNTMoney amounts with their currency sign or word (₹25,000, Rs. 500/-, २५ हज़ार रुपये)
BANK_ACCOUNTBank account numbers
IFSCIFSC branch codes
UPI_IDUPI IDs
PAYMENT_CARDCard numbers, including masked ones (XXXX XXXX XXXX 1234)
AADHAARAadhaar numbers, including masked ones
PANPAN numbers
VOTER_IDVoter ID (EPIC) numbers
RATION_CARDRation card numbers
PASSPORTPassport numbers
DRIVERS_LICENSEDriving licence numbers
VEHICLE_REGVehicle registration numbers
NATIONAL_IDOther national IDs: ABHA number and address, APAAR ID
TAX_IDGSTIN and TAN (PAN has its own label)
CUSTOMER_IDCustomer, CIF, loan, policy and consumer numbers (not order, transaction or ticket numbers)
EMPLOYEE_IDEmployee codes, PF UAN, ESIC numbers
PATIENT_IDMRN, UHID and hospital registration numbers
SECRETOTPs, MPINs, passwords, CVVs
USERNAMEUsernames and handles
URLWeb addresses
IP_ADDRESSIPv4 and IPv6 addresses

Codes that are not personal data (order, invoice, ticket, transaction, SKU, batch, tracking and booking numbers, public helplines) are not labelled.

How to use

1. Download and install

pip install -U huggingface_hub
hf download CobuildX-AI/cbx-indic-pii-extractor-36M --local-dir cbx-indic-pii-extractor-36M
cd cbx-indic-pii-extractor-36M
pip install -r requirements.txt

2. Use it in your code

PIIExtractor (in pii.py, part of this repo) loads the model once:

from pii import PIIExtractor

pii = PIIExtractor()                 # uses a GPU if one is available
pii.extract("नमस्ते, मेरा नाम अनीता कुलकर्णी है। मेरा मोबाइल नंबर 98204 51763 है और ईमेल anita.k@example.in है।")
# [{'label': 'PERSON', 'text': 'अनीता कुलकर्णी', 'start': 17, 'end': 31},
#  {'label': 'PHONE', 'text': '98204 51763', 'start': 53, 'end': 64},
#  {'label': 'EMAIL', 'text': 'anita.k@example.in', 'start': 76, 'end': 94}]

pii.redact("नमस्ते, मेरा नाम अनीता कुलकर्णी है। मेरा मोबाइल नंबर 98204 51763 है और ईमेल anita.k@example.in है।")
# "नमस्ते, मेरा नाम [PERSON] है। मेरा मोबाइल नंबर [PHONE] है और ईमेल [EMAIL] है।"

pii.extract(text, labels=["PERSON", "AADHAAR"])   # keep only some labels
  • The model finds the PII. redact() replaces each value it found with its label, or with your own template.
  • Context length is 8,192 tokens, read in a single pass. Longer texts are split automatically.
  • Masked values keep their mask: XXXX XXXX 4521 is returned whole as AADHAAR, **9813 as BANK_ACCOUNT.

3. Optional: check your setup

python example.py runs four sample texts (Hindi, romanised Hindi, Tamil, Bengali) and prints what it finds.

4. Optional: ONNX Runtime

onnx/model.onnx runs the same model with ONNX Runtime (1.23 or later) and gives the same tags (checked on 300 texts). python onnx_example.py shows how to use it with PIIExtractor. It uses ONNX Runtime's fused attention operator (com.microsoft.MultiHeadAttention), so other ONNX runtimes may not load it.

Results

IndicPIIDetX v0.1 (CobuildX, DOI 10.57967/hf/11457): 10,035 synthetic documents in the same 13 languages and three writing styles, five document types (chat and SMS, emails and letters, forms with scan noise, call transcripts, chatbot prompts), 1,489 of them with no PII but with look-alike codes. Made independently of our training data (different generator, different name lists). Scores on its test split (8,028 documents). Typed F1: a predicted value counts if it overlaps an annotated value of the same type. Scored on the 14 types every model in the table can name (see How we evaluated). The benchmark's own scorer pairs each prediction with at most one annotated value, so its card shows slightly lower numbers.

ModelTyped F1PrecisionRecallDocuments without PII flaggedCPU, median per text
cbx-indic-pii-extractor-58M0.9300.9450.91519.9%16 ms
cbx-indic-pii-extractor-36M0.8880.9430.83913.4%8 ms
cbx-indic-pii-extractor-17M0.8690.9430.80616.2%5 ms
Larger internal model (teacher, not released)0.9570.9590.95515.0%–
Chitragupta (with its rules)0.9440.9120.97853.4%73 ms
Chitragupta (model only)0.9410.9040.98153.3%75 ms
IndicBERT-PII0.8130.8080.81861.0%21 ms
GLiNER-PII large0.4900.7270.37045.1%244 ms
  • Precision and false alarms are where this model is strongest: it flags 13.4% of the documents without PII, against 53.4% for Chitragupta.
  • Chitragupta finds more values (recall), mostly names and bank / ID numbers. Our larger internal model (the teacher of the 36M and 17M) scores 0.957.
  • All 27 labels (our models only): typed F1 0.864. With CUSTOMER_ID and NATIONAL_ID added to the 14 types: 0.864 (Chitragupta, which has no label for them, 0.871).
  • CPU time is the median over 200 texts of the Ylemis benchmark below (median 96 characters), one at a time, 8 threads, all models on the same machine. On longer texts the gap grows.

Two public benchmarks. These helped us decide what to add to our training data (ID-shaped codes that are not PII, new ID formats), so they are not blind tests for these models; the comparison is shown for reference.

ModelYlemis India-PII: typed F1IndiaPII-Bench: typed F1IndiaPII-Bench: look-alike codes flagged
cbx-indic-pii-extractor-58M0.9860.94613.3%
cbx-indic-pii-extractor-36M0.9810.95819.8%
cbx-indic-pii-extractor-17M0.9820.94412.3%
Chitragupta (with its rules)0.9410.90047.0%
Chitragupta (model only)0.9310.89047.7%
IndicBERT-PII0.7270.63264.0%
GLiNER-PII large0.8670.93456.2%
  • Ylemis India-PII (Pranshurs/ylemis-india-pii-benchmark): 10,000 texts; location, organisation and medical-ID annotations are not scored (we do not label them).
  • IndiaPII-Bench (maskflow-ai/indiapii-bench): 2,000 texts with annotated look-alike codes; "flagged" is the share of those codes a model marks as PII.

On our own held-out synthetic test set (same generators as the training data, so optimistic) the span F1 is 0.995.

Speed (one text at a time, end to end; NVIDIA TITAN RTX fp16, Intel i7-10700 CPU with 8 threads):

Short message (~340 characters)Document (2,000 characters)
GPU6.9 ms7.8 ms
CPU19 ms129 ms

How we evaluated

  • Same runs for every model. We ran every model ourselves, on the same texts, with the same scorer.
  • Types. Each model's labels were mapped to the 14 types every model in the table can name: PERSON, ADDRESS, PHONE, EMAIL, AADHAAR, PAN, TAX_ID (GSTIN), IFSC, UPI_ID, VOTER_ID, VEHICLE_REG, PASSPORT, DRIVERS_LICENSE, BANK_ACCOUNT. A predicted PIN code counts as an address. Annotated values of other types are left out, and predictions on them are not counted.
  • Settings. IndicBERT-PII at its card's threshold 0.5, GLiNER-PII at 0.3 with one fixed prompt list; texts longer than a model's limit (IndicBERT-PII 512 tokens, GLiNER 768 words) were read in consecutive windows. Adjacent pieces of the same type are joined for every model alike.
  • No overlap with training data. No IndicPIIDetX document appears in our training data, even with numbers and codes ignored; its names come from different lists (a few common names occur in both).
  • Teacher. The larger internal model is a fine-tuned mmBERT-base (307M parameters); it is not released.

Limitations

  • Names written in native script, especially less common names, are missed more often than by the larger internal model.
  • CUSTOMER_ID, NATIONAL_ID, PATIENT_ID, EMPLOYEE_ID and RATION_CARD values are found less reliably than names, phones and emails, and bank account numbers are sometimes labelled as other account types.
  • Phone numbers written in a 3-3-4 pattern (784-448-0140) can be read as Aadhaar numbers.
  • Values next to each other in JSON or CSV with no space between them can be returned as one span.
  • AMOUNT and DATE cover every amount and date, also prices and dates not tied to a person; benchmarks that label only personal ones count those as false alarms.
  • Trained on synthetic text only. Sensitive attributes such as health, religion or caste are not detected.
  • A detection aid, not a guarantee: keep human review where redaction must be complete.

Training data

About 74,000 synthetic documents in the 13 languages and three writing styles, made by us: templates written by large language models (gpt-5.4-mini, and Sarvam-30B for an earlier part), with every personal value filled in by code (valid checksums for Aadhaar, PAN, GSTIN and similar), plus documents full of codes that are not PII, and forms, tables, key-value records, CSV and JSON. No real personal data.

Licence

Apache-2.0. Base model mmBERT-small (MIT).

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · fill-mask

Можно запустить

Подбираем GPU…

Класс архитектуры
ModernBertForMaskedLM
Ревизия весов
285a8f4

0 моделей