/ Модель

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

Контекст
131 072 токена
Параметры
145 млн
Лицензия
Apache 2.0
Архитектура
openai_privacy_filter · MoE
Базовая модель
privacy-filter
Библиотека
transformers
Опубликована
24 апр 2026

privacy-filter-nemotron

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

Модель OpenMed для выделения и классификации 55 типов персональных данных в англоязычном тексте перед маскированием или деидентификацией.

54 750скачиваний за 30 дней50лайковвеса обновлены28 апр 2026

Бенчмарки

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

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

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

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

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

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

OpenMed разработала privacy-filter-nemotron — модель токенной классификации для выявления и типизации персональных данных в тексте. Это полное дообучение openai/privacy-filter на наборе nvidia/Nemotron-PII. Модель использует архитектуру MoE и разметку BIOES: 55 категорий PII представлены 221 классом токенов. В метаданных указаны 145,4 млн параметров и контекст до 131 072 токенов; веса опубликованы в формате safetensors для Transformers.

Модель предназначена для извлечения фрагментов с персональными данными и передачи их в конвейеры маскирования или деидентификации. В тестировании на отложенной выборке из Nemotron-PII заявлены macro B-F1 0,9533 и точность токенов 0,9910; для декодирования границ авторы рекомендуют Viterbi. Лицензия — Apache-2.0.

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

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

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

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

privacy-filter-nemotron

Fine-tuned openai/privacy-filter for fine-grained PII extraction across 55 categories from nvidia/Nemotron-PII.

  • Base model: openai/privacy-filter — 1.4B-parameter MoE (50M active per token), BIOES token-classification head
  • Task: Token classification for PII detection (BIOES scheme)
  • Training data: Full 100K rows of nvidia/Nemotron-PII train split
  • Held-out val: 10K label-stratified rows from the Nemotron test split (every label has ≥229 entities)
  • Recipe: opf train (OpenAI's official fine-tuning CLI) — full fine-tune, AdamW, lr=1e-4, 5 epochs, bf16, weight decay 0.0
  • Labels: 55 fine-grained PII categories → 221 BIOES classes (1 O + 55 × B/I/E/S)

The base model ships with 8 coarse PII categories (private_person, private_email, etc.). This model trades that coarse vocabulary for a 5× more granular one — first_name, last_name, medical_record_number, credit_debit_card, ssn, and so on — matching what downstream redaction and masking pipelines typically need.

Family at a glance. Same architecture, three runtimes:

Quick start

With OpenMed — recommended

OpenMed gives you extract_pii() / deidentify() with built-in BIOES Viterbi decoding, span refinement, and a Faker-backed obfuscation engine. Same call on every host — Apple Silicon picks up MLX automatically; everywhere else uses this PyTorch checkpoint.

pip install -U "openmed[hf]"
from openmed import extract_pii, deidentify

text = (
    "Patient Sarah Johnson (DOB 03/15/1985), MRN 4872910, "
    "phone 415-555-0123, email sarah.johnson@example.com."
)

# Extract grouped entity spans
result = extract_pii(text, model_name="OpenMed/privacy-filter-nemotron")
for ent in result.entities:
    print(f"{ent.label:30s} {ent.text!r}  conf={ent.confidence:.2f}")

# De-identify with any of the supported methods
masked   = deidentify(text, method="mask",   model_name="OpenMed/privacy-filter-nemotron")
removed  = deidentify(text, method="remove", model_name="OpenMed/privacy-filter-nemotron")
hashed   = deidentify(text, method="hash",   model_name="OpenMed/privacy-filter-nemotron")

# Faker-backed locale-aware obfuscation, deterministic with consistent=True+seed
fake = deidentify(
    text,
    method="replace",
    model_name="OpenMed/privacy-filter-nemotron",
    consistent=True,
    seed=42,
)
print(fake.deidentified_text)

OpenMed/privacy-filter-nemotron-mlx* model names also work in the same extract_pii() / deidentify() calls — on a non-Apple-Silicon host they automatically fall back to this PyTorch checkpoint with a one-time warning. So you can ship MLX names in code and still run on Linux/Windows.

The OpenMed wrapper passes trust_remote_code=True for you, runs the model's own BIOES Viterbi decoder, and skips OpenMed's regex smart-merging (the model already produces clean spans).

With opf — OpenAI's official CLI

pip install 'opf @ git+https://github.com/openai/privacy-filter.git'

opf redact \
  --checkpoint OpenMed/privacy-filter-nemotron \
  --text "Patient Sarah Johnson (DOB 03/15/1985), MRN 4872910, phone 415-555-0123."

With transformers directly

import torch
from transformers import AutoModelForTokenClassification, AutoTokenizer

model_id = "OpenMed/privacy-filter-nemotron"
tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForTokenClassification.from_pretrained(
    model_id, trust_remote_code=True, dtype=torch.bfloat16
).to("cuda")
model.eval()

text = "Patient Sarah Johnson (DOB 03/15/1985), MRN 4872910, phone 415-555-0123."
enc = tok(text, return_tensors="pt").to("cuda")
with torch.no_grad():
    out = model(**enc).logits.argmax(-1).cpu()[0].tolist()

id2label = {int(k): v for k, v in model.config.id2label.items()}
tokens = tok.convert_ids_to_tokens(enc["input_ids"][0].cpu().tolist())
for t, l in zip(tokens, out):
    if l != 0:
        print(f"{t}\t{id2label[l]}")

For best results use Viterbi decoding (not argmax) — both opf and OpenMed do this by default. If you're doing argmax with the HF transformers API, you'll see slightly more boundary errors but still excellent label accuracy.

Performance

Evaluated with opf eval --decode-mode viterbi --eval-mode typed --span-metrics-space char on the 10K label-stratified held-out val from nvidia/Nemotron-PII:test.

Headline

MetricValue
Macro B-F1 (across 55 labels)0.9533
Token accuracy0.9910
Strong labels (F1 ≥ 0.90)46 / 55
Acceptable (F1 0.70–0.89)7 / 55
Weak (F1 < 0.70)0 / 55

Per-label F1 (B-tag, sorted)

LabelPrecisionRecallF1
🟢 mac_address1.0001.0001.000
🟢 biometric_identifier0.9990.9980.999
🟢 bank_routing_number0.9950.9990.997
🟢 credit_debit_card0.9990.9930.996
🟢 ipv60.9921.0000.996
🟢 health_plan_beneficiary_number1.0000.9900.995
🟢 coordinate0.9940.9960.995
🟢 ipv40.9930.9960.994
🟢 url0.9890.9990.994
🟢 email0.9940.9930.994
🟢 date_of_birth0.9920.9940.993
🟢 medical_record_number0.9970.9890.993
🟢 street_address0.9960.9890.993
🟢 vehicle_identifier0.9860.9960.991
🟢 license_plate0.9870.9930.990
🟢 customer_id0.9950.9840.990
🟢 http_cookie0.9920.9830.988
🟢 employee_id0.9870.9880.988
🟢 account_number0.9920.9820.987
🟢 certificate_license_number0.9890.9840.987
🟢 swift_bic0.9750.9980.987
🟢 postcode0.9910.9810.986
🟢 api_key0.9800.9900.985
🟢 password0.9990.9680.983
🟢 tax_id1.0000.9650.982
🟢 device_identifier0.9740.9880.981
🟢 national_id0.9910.9610.976
🟢 last_name0.9770.9750.976
🟢 date_time0.9820.9670.974
🟢 first_name0.9620.9780.970
🟢 pin0.9730.9670.970
🟢 phone_number0.9480.9920.970
🟢 county0.9860.9460.965
🟢 employment_status0.9600.9680.964
🟢 user_name0.9590.9640.961
🟢 date0.9670.9550.961
🟢 blood_type0.9220.9540.938
🟢 country0.9550.9180.936
🟢 ssn0.9260.9450.935
🟢 education_level0.9610.9080.934
🟢 sexuality0.9080.9560.931
🟢 company_name0.9670.8940.929
🟢 religious_belief0.9120.9410.926
🟢 unique_id0.9100.9220.916
🟢 political_view0.9390.8720.905
🟢 fax_number0.9780.8410.904
🟡 city0.9170.8760.896
🟡 time0.9330.8020.863
🟡 race_ethnicity0.8210.9060.861
🟡 gender0.9670.7440.841
🟡 state0.8780.7850.829
🟡 language0.8890.7350.804
🟡 occupation0.7990.6670.727

Label space (55 categories)

CategoryTypical examples
Identityfirst_name, last_name, user_name, age, gender, race_ethnicity, sexuality, religious_belief, political_view, marital_status, nationality, education_level, occupation, employment_status, language, blood_type, biometric_identifier
Contactemail, phone_number, fax_number, url
Addressstreet_address, city, county, state, country, postcode, coordinate
Datesdate, date_of_birth, date_time, time
Government IDsssn, national_id, tax_id
Financialaccount_number, bank_routing_number, swift_bic, credit_debit_card, cvv, pin, password
Healthcaremedical_record_number, health_plan_beneficiary_number
Enterprise IDscustomer_id, employee_id, unique_id, certificate_license_number
Vehiclelicense_plate, vehicle_identifier
Digitalipv4, ipv6, mac_address, device_identifier, api_key, http_cookie

Head initialization: opf's default "copy-from-matching-base" head init. Of the 221 new BIOES classes, 5 had exact matches in the base (O, B/I/E/S-account_number); the other 216 were copied from semantically-adjacent coarse rows and fine-tuned end-to-end.

Router: base model has 128 MoE experts per layer with top-4 routing. Routers were kept trainable during full fine-tuning; no collapse was observed.

Limitations & intended use

  • English-only training data. Nemotron-PII is predominantly English with a 50/50 US/international locale split. Performance on non-English text is not guaranteed.
  • occupation, language, gender, state, race_ethnicity, political_view, education_level are fuzzier categories than the strict identifiers — F1 lands in 0.65–0.89 vs 0.95+ for formatted identifiers. If your downstream only cares about strict PII, you can ignore low-confidence predictions on these.
  • Synthetic training data. Nemotron-PII is a synthesized dataset; real clinical notes, legal documents, and web text may show different surface forms. For high-stakes deployments, collect a domain-specific eval set and re-calibrate thresholds.
  • Not a substitute for legal compliance review. Use alongside a governance layer (human review, deterministic regex pre-filters, etc.).

Credits & Acknowledgements

This model wouldn't exist without two open-source releases — sincere thanks to both teams:

  • OpenAI for open-sourcing the Privacy Filter (architecture, modeling code, and opf training/eval CLI). Everything in this repo is a fine-tune on top of that release.
  • NVIDIA for releasing the Nemotron-PII dataset with its 100K-row train split and 55 fine-grained PII labels.

Additional thanks to the HuggingFace team for the transformers / huggingface_hub ecosystem this model ships through.

License

Apache 2.0, same as the base model.

Citation

If you use this model, please cite this model, the organization behind it (OpenMed), and the upstream base model + dataset:

@misc{openmed_privacy_filter_nemotron_2026,
  author       = {OpenMed},
  title        = {{OpenMed/privacy-filter-nemotron}: fine-grained PII extraction with 55 categories},
  year         = {2026},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/OpenMed/privacy-filter-nemotron}}
}

@misc{openmed_2026,
  author       = {OpenMed},
  title        = {{OpenMed}: open models and resources for healthcare NLP},
  year         = {2026},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/OpenMed}}
}

@misc{openai_privacy_filter_2025,
  author       = {OpenAI},
  title        = {{openai/privacy-filter}},
  year         = {2025},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/openai/privacy-filter}}
}

@misc{nemotron_pii_2025,
  author       = {NVIDIA},
  title        = {{Nemotron-PII}},
  year         = {2025},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/datasets/nvidia/Nemotron-PII}}
}

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей