/ Модель

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

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

indic-pii-redactor-base

Разметка токеновТекст → label9 профессий

Модель размечает персональные данные в английских и индийских текстах, чтобы подготовить их к редактированию или обезличиванию.

117скачиваний за 30 дней0лайковвеса обновлены22 ноя 2026

Бенчмарки

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

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

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

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

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

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

altslate разработала Indic PII Redactor Base — модель на 307 млн параметров для обнаружения персональных данных в индийских текстах. Это дообученная на классификацию токенов модель на базе jhu-clsp/mmBERT-base с архитектурой ModernBERT; она принимает текст и размечает фрагменты по типам, чтобы их можно было скрыть перед журналированием, аналитикой или передачей текста LLM. Модель поддерживает английский, хинди, хинглиш, маратхи, бенгальский, тамильский, телугу, гуджарати и каннада, включая цифры и имена в местных письменностях. Контекст — до 8192 токенов. Доступны веса safetensors и ONNX, включая динамическую int8-квантизацию; лицензия Apache-2.0.

Модель распознаёт, среди прочего, Aadhaar, PAN, GSTIN, телефоны, адреса и даты. В тестах на шести индийских языках с именами из обучающих списков показаны высокая полнота и точность; при этом имена, не встречавшиеся при обучении, обнаруживаются заметно хуже, особенно на тамильском. Возможны пропуски PIN-кодов и ложные срабатывания на рукописных формах и подписях. Другие индийские языки не обучались и не тестировались; для критичных сценариев README рекомендует сочетать модель с проверкой контрольных сумм и проверкой человеком.

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

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

Ограничения

Модель хуже находит ранее не встречавшиеся при обучении имена, особенно на тамильском; возможны пропуски PIN-кодов и ложные срабатывания на рукописных формах. Другие индийские языки не обучались и не тестировались; для критичных случаев необходимы дополнительные проверки.

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

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

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

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

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

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

Открыть на Hugging Face

Indic PII Redactor (base)

A 307M-parameter token-classification model that finds Indian personal data in English, Hindi, Hinglish, Marathi, Bengali, Tamil, Telugu, Gujarati and Kannada text, so you can redact it before logging, analytics or sending text to an LLM. It handles native-script digits (৯৮৭৬…, ௨௧௩…) and native-script names and addresses.

Try it in your browser: altslate/indic-pii-redactor Space. It runs the int8 ONNX model locally with transformers.js, so your text never leaves your device.

If you only need English, Hindi and Hinglish, the smaller altslate/indic-pii-redactor-small (141M) is slightly more accurate on those three and is half the size.

It detects 16 types:

LabelWhat it covers
AADHAARAadhaar numbers (12 digits, any grouping, masked forms like XXXX XXXX 1234) and 16-digit VIDs
PANPAN (ABCPS1234K), including lowercase and spaced forms
GSTIN15-character GST numbers
IFSCBank branch codes (SBIN0001234)
UPI_IDUPI handles (name@okhdfcbank, 9876543210@ybl)
BANK_ACCOUNTBank account numbers
PHONEMobile and landline numbers in Indian formats
VOTER_IDEPIC numbers
PASSPORTIndian passport numbers
DRIVING_LICENCEDriving licence numbers
VEHICLE_REGNumber plates
PINCODEPIN codes
PERSONNames (Latin and native scripts)
ADDRESSPostal addresses
EMAILEmail addresses
DATE_OF_BIRTHDates of birth (other dates are left alone)

It is trained to leave look-alike numbers alone: order IDs, bill and ticket numbers, transaction and UTR numbers, PNRs, OTPs, helplines, tracking and policy numbers.

Screenshots: altslate/indic-screenshot-redactor reads a screenshot with open OCR (PP-OCRv5, Latin and Devanagari) and covers what this model finds, all in the browser. On rendered test screenshots it covered 96% of Latin-script and 90% of Devanagari personal data.

Usage

from transformers import pipeline

redactor = pipeline("token-classification", model="altslate/indic-pii-redactor-base",
                    aggregation_strategy="simple")

def spans(text):
    """(start, end, label) per entity; offsets trimmed of the leading space the tokenizer attaches."""
    out = []
    for e in redactor(text):
        s, t = e["start"], e["end"]
        while s < t and text[s].isspace():
            s += 1
        out.append((s, t, e["entity_group"]))
    return out

def redact(text):
    for s, t, label in sorted(spans(text), reverse=True):
        text = text[:s] + f"[{label}]" + text[t:]
    return text

print(redact("আমার আধার নম্বর ২৩৪৫ ৬৭৮৯ ০১২৩ এবং ফোন 98765 43210"))
# আমার আধার নম্বর [AADHAAR] এবং ফোন [PHONE]
print(redact("நான் கார்த்திக் ராஜன், என் பான் ABCPS1234K."))
# நான் [PERSON], என் பான் [PAN].

ONNX (onnxruntime, transformers.js)

onnx/model.onnx (fp32, 1.2 GB) and onnx/model_quantized.onnx (dynamic int8, per-channel, 309 MB) take input_ids and attention_mask and return logits. Dev-split results:

Runtimeen/hi/Hinglish dev (500)six-language dev (300)six-language dev, unseen names (300)
PyTorch1.000 / 0.989 / 1.4%0.980 / 0.994 / 0%0.874 / 0.988 / 0%
ONNX fp321.000 / 0.989 / 1.4%0.980 / 0.994 / 0%0.874 / 0.988 / 0%
ONNX int81.000 / 0.988 / 1.4%0.982 / 0.995 / 0%0.872 / 0.991 / 0%

Each cell is recall / precision / no-PII FA. Plain (per-tensor) int8 quantization raised no-PII false alarms to 32% on the six-language dev split with this model, so the shipped file uses per-channel weights.

import { pipeline } from "@huggingface/transformers";
const tagger = await pipeline("token-classification", "altslate/indic-pii-redactor-base", { dtype: "q8" });
// Returns one entry per token with B-/I- labels; join a B- token with the I- tokens that follow it.

Tested with @huggingface/transformers 4.3.2 in Node 22, dtype "q8" and "fp32".

Results

All numbers come from data the model never saw in training. Redaction recall/precision count PII characters: were the right characters masked, whatever the type? That is what matters for redaction, and it is fair to models with different label sets. No-PII false alarms (FA) is the share of messages without any PII where the model redacts something. The model and its decision threshold were chosen on separate dev splits. The held-out-names test and the third challenge set were run once, on this revision. The other sets were first run on the previous revision (v6b) and are reported again here unchanged; they were not used for tuning.

Six-language test with unseen names (851 messages)

Messages written by Qwen3.8-27B around fake PII values, using names and cities that appear in no training list. 103 of them contain no PII.

ModelParamsRecallPrecisionNo-PII FAbnguknmrtate
altslate/indic-pii-redactor-base307M0.8740.9895.8%0.9160.8820.8800.9060.8080.863
previous revision (v6b)307M0.8310.9965.8%0.8700.8620.8400.8800.7760.774
Horizon-Labs/pii-redactor-base308M0.9230.94782%0.9290.9210.9230.9490.9230.902
Horizon-Labs/pii-redactor-small141M0.8620.93789%0.8290.8840.8950.9460.8450.793
urchade/gliner_multi_pii-v1 (0.5)*~280M0.5120.90823%0.5180.5980.5430.5520.4760.402

Language columns are recall. Horizon-base has higher recall here because it finds many more unseen native-script names (PERSON recall 0.88 vs our 0.43), but it redacts something in 82% of messages that contain no PII. Our IDs, phones, addresses and dates are found at 0.92–1.00.

Six-language test (1,427 messages: Marathi, Bengali, Tamil, Telugu, Gujarati, Kannada)

Same generator, but with names and cities taken from the same lists used in training; 197 messages without PII.

ModelParamsRecallPrecisionNo-PII FAbnguknmrtate
altslate/indic-pii-redactor-base307M0.9800.9872.5%0.9910.9650.9840.9830.9780.977
previous revision (v6b)307M0.9670.98913.7%0.9780.9530.9670.9870.9680.949
Horizon-Labs/pii-redactor-base308M0.9260.94385%0.9530.9230.9430.9530.9100.872
Horizon-Labs/pii-redactor-small141M0.8860.93889%0.8820.8760.9130.9490.8790.812
altslate/indic-pii-redactor-small141M0.7970.97837%0.8070.7970.8030.8720.7620.737
urchade/gliner_multi_pii-v1 (0.5)*~280M0.5360.91022%0.5430.5860.5810.5640.4800.466

English, Hindi and Hinglish test (1,954 messages)

ModelParamsRecallPrecisionNo-PII FAHindi recall
altslate/indic-pii-redactor-small141M0.9950.9952.6%0.991
altslate/indic-pii-redactor-base307M0.9950.9881.5%0.991
previous revision (v6b)307M0.9910.9921.5%0.993
Horizon-Labs/pii-redactor-base308M0.9450.94994%0.938
Horizon-Labs/pii-redactor-small141M0.9360.95483%0.936
urchade/gliner_multi_pii-v1 (0.5)*~280M0.8300.90844%0.626

* GLiNER was prompted zero-shot with our 16 label names.

Caveat: the ID values inside these LLM-written messages come from the same format generators used for training data (the surrounding text does not), so these tests favour formats the model has seen. Read them together with the hand-written sets below.

Hand-written challenge sets

Written by hand, before the model was trained, to use formats and styles outside the training generators.

Six languages, set 3 (36 messages, 40 PII spans, Tamil/Telugu heavy; run once): vocative and suffixed native names that are in no training list, 6-digit order, bill and ticket numbers as decoys, native digits.

ModelRecallPrecisionNo-PII FA
altslate/indic-pii-redactor-base0.8741.0000% (0 of 14)
previous revision (v6b)0.8290.96121%
Horizon-Labs/pii-redactor-base0.7890.91750%
Horizon-Labs/pii-redactor-small0.6430.91543%
urchade/gliner_multi_pii-v1 (0.5)0.3030.9080%

Six languages, set 2 (36 messages, 42 PII spans): masked Aadhaar in native digits, native-script addresses, train numbers and OTPs as decoys.

ModelRecallPrecisionNo-PII FA
altslate/indic-pii-redactor-base0.9470.9828% (1 of 12)
previous revision (v6b)0.9610.9828%
Horizon-Labs/pii-redactor-base0.8390.88867%
Horizon-Labs/pii-redactor-small0.7900.90958%
altslate/indic-pii-redactor-small0.5620.93333%
urchade/gliner_multi_pii-v1 (0.5)0.4010.85325%

English, Hindi and Hinglish (47 messages, 58 spans): email signatures, OCR-style forms in capitals, CIN company numbers, Hindi म.नं. addresses. Note that this set was already used to report the small model, so it had been seen when this model was built. It was not used to tune this model.

ModelRecallPrecisionNo-PII FA
altslate/indic-pii-redactor-base0.9800.90637% (7 of 19)
previous revision (v6b)0.9900.95516% (3 of 19)
altslate/indic-pii-redactor-small0.9690.93811% (2 of 19)
Horizon-Labs/pii-redactor-small0.9110.81074%
Horizon-Labs/pii-redactor-base0.8960.78484%

These sets are small, so treat their numbers as indicative.

Where other models are better

  • Unseen native-script names: Horizon-base finds far more of them (PERSON recall 0.88 vs our 0.43 on the unseen-names test, 0.77 vs 0.56 on challenge set 3, 0.94 vs 0.69 on set 2). On names like those in training, ours is higher (0.98 vs 0.92).
  • On English/Hindi/Hinglish, our small model has higher precision and fewer false alarms on the hand-written set (11% vs 37%).
  • The previous revision (v6b) had fewer false alarms on the English/Hindi hand-written set, and higher PIN-code recall. To use it, load it with revision="d0ef0a1ae22db5fd94d704d7fb11213f661e339d".
  • Horizon's models catch every date of birth, because they redact all dates; that is also why their false-alarm rates are high.

Known limitations

  • Native-script names it has not seen are the main weakness: on our unseen-names test only 43% of name characters are found (Tamil is weakest). Common names are found well (0.98). If names matter most to you, combine this model with a name list or a recall-oriented model.
  • Tamil is the weakest language (0.81 recall on the unseen-names test).
  • PIN codes are sometimes left alone (recall 0.88–0.92 on the six-language tests), a side effect of training it not to flag 6-digit order and bill numbers.
  • On English/Hindi forms and signatures (hand-written set) it raises more false alarms than the previous revision and the small model (7 of 19 no-PII messages).
  • The Marathi, Bengali, Tamil, Telugu, Gujarati and Kannada templates, names and decoy sentences used for training were written by us and have not been checked by native speakers. The test messages were written by an LLM; we checked their script, not their fluency.
  • Other Indian languages (Malayalam, Odia, Punjabi, Assamese, Urdu, …) were not trained or tested.
  • The decision threshold is built into the weights (the bias of the O class is lowered by 7). If you need fewer false alarms and can accept lower recall, add back up to +7 to classifier.bias[0].

Don't rely on this model alone where a missed identifier has legal or safety consequences. Combine it with checksum validators for Aadhaar (Verhoeff) and GSTIN, and with human review.

Training

  • Base: jhu-clsp/mmBERT-base (MIT), fine-tuned for token classification (33 BIO tags).
  • Data: 450k synthetic examples: 70% English/Hindi/Hinglish (the same recipe as the small model) and 30% the six new languages, where most examples place a name inside an ordinary sentence, including vocative names and names with case suffixes. All PII values are fake but format-valid (Aadhaar Verhoeff and GSTIN checksums included); 30% of numeric values in the new languages use native digits. The new-language part mixes native templates, PII spliced into real Wikipedia sentences, values inserted without cue words, names inside ordinary sentences, and number-heavy text without PII (orders, bills, tickets, policies, 6-digit reference numbers).
  • Real text used as context and as no-PII examples (sentences containing names were filtered out):
  • No real personal data was used to train or test the model.
  • Hyperparameters: 2 epochs, batch 32, max length 256, AdamW, lr 5e-5, linear schedule with 6% warmup, bf16. About 2.5 hours on one NVIDIA GB10 (DGX Spark). The O-class bias (−7) was chosen on the dev splits as the largest value that kept no-PII false alarms at 0% on both six-language dev splits.
  • Test-set generation: the held-out messages were written by Qwen3.8-27B, a model that wrote none of the training text. Labels come from exact string matches of the values we supplied; messages where the LLM dropped or invented ID-like values, or wrote in the wrong script, were discarded (96% kept).

License

Apache-2.0. The base model is MIT. Training used the datasets above under their own licenses; Wikipedia text is CC-BY-SA-4.0 (Wikipedia contributors).

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

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

GPU в ailist

Универсальный рантайм · transformers · token-classification

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

Подбираем GPU…

Класс архитектуры
ModernBertForTokenClassification
Ревизия весов
6906924

0 моделей