/ Модель

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

Лицензия
CC BY 4.0
Базовая модель
mmBERT-base
Опубликована
22 окт 2026

pii-nemotron-mmbert-base-v1

Разметка токеновТекст → label6 профессий
2скачиваний за 30 дней1лайквеса обновлены23 окт 2026

Описание модели

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

Дообученный mmBERT для поиска и разметки 16 видов персональных данных в англоязычном тексте.

abubasith86/pii-nemotron-mmbert-base-v1 — англоязычный детектор персональных данных, созданный дообучением jhu-clsp/mmBERT-base на очищенной части синтетического набора NVIDIA Nemotron-PII. Это энкодер для разметки токенов: он присваивает BIO-метки и помогает находить в тексте имена, даты, адреса, электронную почту, телефоны, банковские и налоговые идентификаторы, пароли, API-ключи и другие виды персональных данных. Предусмотрено 18 классов, но на данных обучения представлены 16: классы PASSPORT и DRIVING_LICENCE модель не обучала и не предсказывает.

Модель предназначена для обнаружения и последующей маскировки чувствительных фрагментов в англоязычных документах. В README приведены высокие результаты на отложенной тестовой части Nemotron-PII и на тестовом наборе Presidio, однако Nemotron состоит из синтетического текста от одного генератора; автор отмечает, что на реальных текстах качество будет ниже, а собственная проверка на реальных данных ещё не завершена. Модель не размечает ряд других категорий из Nemotron, включая названия компаний, профессии и медицинские номера. Репозиторий содержит веса Safetensors; лицензия — CC BY 4.0.

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

  • поиск имён, адресов и контактов перед публикацией текста
  • обнаружение номеров документов и налоговых идентификаторов
  • поиск паролей и API-ключей в текстовых записях
  • маскировка персональных данных в документах и сообщениях
  • предварительная очистка англоязычных текстов для передачи внешним сервисам

Ограничения

Обучение и основная оценка проведены на синтетических данных одного генератора, поэтому качество на реальных текстах может быть ниже. PASSPORT и DRIVING_LICENCE не обучались и не предсказываются; многие другие категории, например названия компаний и медицинские номера, модель также не выделяет.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus

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

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

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

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

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

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

Открыть на Hugging Face

pii-nemotron-mmbert-base-v1

A PII detector: jhu-clsp/mmBERT-base fine-tuned to find 18 kinds of personal data in English text. It is trained on the clean rows of NVIDIA's Nemotron-PII only, with our labels (abubasith86/pii-nemotron-our-clean-v1).

At a glance

Test: all 51,225 rows of Nemotron's test file (never seen in training), scored on whole spans. The scores cover the 16 trained labels; PASSPORT and DRIVING_LICENCE are not trained and not tested (see Labels).

RecallPrecisionF2Typed F1Documents with a leaked identifierNormal text masked by mistakeSpeed (GPU)
0.9960.9960.9960.9900.64%0.02%6.8 ms / doc

Nemotron is synthetic text from one generator. These scores show how well the model learned this data; scores on real text will be lower. The test on our own real text is still to be done.

Labels

One label per token, BIO tags (37 tags = O + B-/I- for each label):

PERSON_NAME, DATE, AGE, EMAIL, PHONE, ADDRESS, BANK_ACCOUNT, CARD_NUMBER, NATIONAL_ID, TAX_ID, PASSPORT, DRIVING_LICENCE, USERNAME, URL, IP_ADDRESS, CUSTOMER_ID, PASSWORD, API_KEY

16 of the 18 labels are trained. PASSPORT and DRIVING_LICENCE have no examples in Nemotron (neither in its train nor its test file), so the model never learned them and no score in this card covers them. Their tags exist in the model, but it does not predict them.

How Nemotron's labels became ours (the dataset card has the full table and counts):

  • first_name, last_name → PERSON_NAME; a full name is one span ("Mi Patel"), names apart by a comma, full stop or new line stay separate.
  • street_address, postcode, city, state, county, country → ADDRESS; parts next to each other are one span ("84 Washington Blvd, Charlottesville, Virginia, 22901, USA"); a place name alone is ADDRESS too.
  • date, date_of_birth, date_time → DATE · phone_number, fax_number → PHONE · ssn, national_id → NATIONAL_ID · customer_id, unique_id, employee_id → CUSTOMER_ID · password, pin → PASSWORD · api_key, http_cookie → API_KEY · account_number → BANK_ACCOUNT · credit_debit_card → CARD_NUMBER · the rest one to one.
  • 24 Nemotron labels are not ours and were left as normal text: company_name, occupation, time, cvv, language, religious_belief, vehicle_identifier, license_plate, medical_record_number, and others. The model does not mask them.

Results

SplitRowsRecallPrecisionF2Typed F1Leak %Over-masking
test (Nemotron test file, all rows)51,2250.9960.9960.9960.9900.64%0.0002
validation (5% of the train file, per token)2,5340.9980.9970.998–––

Recall per label on the test rows:

LabelRecallLabelRecall
CARD_NUMBER1.000API_KEY0.999
EMAIL1.000USERNAME0.999
TAX_ID1.000PERSON_NAME0.998
URL1.000CUSTOMER_ID0.997
NATIONAL_ID1.000PASSWORD0.995
PHONE1.000ADDRESS0.991
IP_ADDRESS1.000DATE0.990
BANK_ACCOUNT0.999AGE0.986
PASSPORTnot tested (no examples)DRIVING_LICENCEnot tested (no examples)

Scoring (pii/eval/evaluate.py): recall and precision count a span found when it overlaps the true span; typed F1 needs the exact span and the right label; leak % is the share of documents where an identifier (name, email, phone, address, an ID, ...) is missed; over-masking is the share of normal characters masked by mistake. Speed: one document at a time on one NVIDIA GeForce RTX 4070 SUPER, fp16, measured while the Presidio baselines ran on the same GPU (5.7 ms on an idle GPU).

Compared with Presidio

The same 51,225 test documents through Microsoft Presidio with 7 different NER models (pii/eval/presidio_demo.py, their labels mapped to ours) and through our earlier model pii-generic-mmbert-base-v1 (trained on 5 datasets before the current cleaning and label rules), scored with the same code.

Scores of this model, our earlier model and the 7 Presidio setups on the same 51,225 test documents

Recall and precision of every model, weakest to strongest

Recall per label: our two models and the 7 Presidio setups

True and false positives and negatives, per character (48.4 million characters, 8.4% of them PII). Each character is PII or normal text, and masked or left as is:

TP, FN, FP and TN per character, every model

Every model, share of all characters:

ModelTP: PII maskedFN: PII left visibleFP: normal text maskedTN: normal text leftms / doc
This model8.39%0.03%0.02%91.57%6.8
Presidio + OpenMed SuperClinical 434M8.26%0.15%0.72%90.86%77.3
Presidio + OpenMed GTEMed 149M8.12%0.29%1.06%90.52%55.8
Presidio + GLiNER PII (nvidia)7.78%0.64%3.15%88.44%156.8
Presidio + GLiNER PII edge7.85%0.56%3.59%87.99%46.4
Presidio + flair large7.04%1.37%0.50%91.09%40.9
Presidio + spaCy lg6.94%1.48%1.41%90.18%13.3 (CPU)
Presidio + Stanza6.82%1.59%1.17%90.42%147.7
Our earlier model (pii-generic-mmbert-base-v1)5.36%3.05%0.01%91.57%6.8

This model leaves about 6× less PII visible and masks about 40× less normal text than the best Presidio setup, and is about 11× faster. Our earlier model leaves 3.05% of the PII characters visible, mostly in five labels whose rule changed after it was trained (a city alone, every date, every URL, employee IDs, national IDs). This model was trained on the same generator's train file (different documents), which helps it here; on Presidio's own test data (presidio-research synth_dataset_v2, 1,500 documents) it finds 98.2% of the PII (precision 0.999).

Known limits

Found by testing the model alone (docs/model_tests/): the clean test with the text changed, 101 hand-written sentences, and Presidio's own test set.

  1. Capital letters change the result. Lower-case names are often labelled USERNAME ("thanks ravi"; on the test rows with only the names in lower case, 48% of names); all upper-case text leaks about 5× more (0.48% → 2.40% of documents) and 3.4× more on Presidio's test (3.1% → 10.6%).
  2. ID formats it never saw are missed or labelled wrong: IBANs (labelled NATIONAL_ID or CARD_NUMBER), driving licences and passports (never predicted: Nemotron has none), Indian PAN, order and ticket IDs, card numbers without spaces (often CUSTOMER_ID).
  3. Names with a middle initial stop at the initial: Martim A Pereira → only Martim is masked, so the surname stays visible.
  4. One data source only: every training row comes from one synthetic generator in English. Chat-style text, disguised PII ("nine eight four five…", "john dot doe at gmail dot com") and other languages are often missed; real text will score lower than the tests above.

Example

Hi, I am Priya Sharma, email priya.sharma@gmail.com, phone +91 98450 12345.
  -> Hi, I am [PERSON_NAME], email [EMAIL], phone [PHONE].
Patient Ahmed Al-Farsi (DOB 14/03/1985) was seen by Dr. Elena Rossi.
  -> Patient [PERSON_NAME] (DOB [DATE]) was seen by Dr. [PERSON_NAME].
Our support inbox is support@acme.com and the version is 2.4.1.
  -> Our support inbox is [EMAIL] and the version is 2.4.1.

How to use

from transformers import pipeline

ner = pipeline("token-classification", model="abubasith86/pii-nemotron-mmbert-base-v1",
               aggregation_strategy="simple")
ner("Hi, I am Priya Sharma, email priya.sharma@gmail.com.")

In our code: pii.eval.infer.Detector("abubasith86/pii-nemotron-mmbert-base-v1", max_len=1024, stride=256) returns character spans {start, end, label}; long texts are split into overlapping windows.

Training

SettingValue
Base modeljhu-clsp/mmBERT-base
Dataabubasith86/pii-nemotron-our-clean-v1, commit ebd1bf9801104af395dced68f6d60d563d3f36f2
Rowstrain 49,061 · validation 2,534 (from Nemotron's train file) · test 51,225 (Nemotron's test file, all used)
Window / stride1024 / 256 tokens
Epochs3 (9,291 steps)
Learning rate3e-5, warmup 10%, weight decay 0.01
Batch4 × 4 gradient accumulation = 16
Best checkpointby F2 on validation, checked every 2,000 steps
Precisionbf16
Hardware1 × NVIDIA GeForce RTX 4070 SUPER (12 GB), about 40 minutes
Scriptpii/train/finetune_single.py

How the training rows were cleaned (rule checks, Microsoft Presidio, the JEV model; about half of Nemotron's rows were kept) is on the dataset card. A hand check of 200 random test rows found 98% of rows fully right with our labels.

Licence

Trained on NVIDIA's Nemotron-PII (CC-BY-4.0). The base model is jhu-clsp/mmBERT-base.

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

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

GPU в ailist

Универсальный рантайм

Нельзя запустить

Доступ к модели ограничен автором; у платформы нет доступа к весам.

Ревизия весов
e52ee8b

0 моделей