/ Модель

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

Контекст
7 999 токенов
Параметры
31,9 млн
Лицензия
MIT
Архитектура
modernbert · dense
Базовая модель
ettin-encoder-32m
Библиотека
transformers
Опубликована
6 мая 2026

ettin-32m-nemotron-pii

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

Компактная англоязычная модель ModernBERT для обнаружения и разметки более 50 типов персональных данных в тексте.

288скачиваний за 30 дней1лайквеса обновлены1 июн 2026

Бенчмарки

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

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

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

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

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

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

ettin-32m-nemotron-pii — компактная модель распознавания персональных данных, разработанная на основе энкодера Ettin и дообученная на наборе NVIDIA Nemotron-PII. Это ModernBERT с 31,9 млн параметров, предназначенный для маркировки фрагментов текста и обнаружения более 50 типов PII в структурированных и неструктурированных данных. Модель рассчитана на английский язык и заявлена для текстов из разных областей, включая здравоохранение, финансы, право и кибербезопасность.

В карточке указана оценка F1 95,73 на тестовой выборке из 10 тысяч примеров; качество различается между типами сущностей, и для распознавания профессий приведена заметно более низкая оценка F1 0,5949. Модель принимает текст и возвращает метки сущностей по токенам. Лицензия — MIT.

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

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

Ограничения

Модель хорошо работает только с английскими текстами. Для некоторых типов PII качество ниже: например, F1 для распознавания профессий составляет 0,5949.

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

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

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

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

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

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

Открыть на Hugging Face

ettin-32m-nemotron-pii model

Light Weight PII Detection Model | Open Source | 32M Parameters | 95.73 F1 Score | Blog Post

Overview

Ettin-32m-nemotron-pii is based on the ettin-encoder-32M model and fine-tuned over the Nemotron PII dataset. This model can detect 50+ PII entities in both structured and unstructured texts across various domains like healthcare, finance, legal, cybersecurity etc. With just 32M parameters, the model achieves a strong F1-score of 95.73.

Key Features

  • Achieves strong F1-score of 95.73 with just 32M parameters.
  • Outperforms popular LLMs like DeepSeek-V4-Flash (84.89) and GPT-4o-Mini (78.69).
  • Detects 50+ PII entities in both structured and unstructured texts.
  • Handles text in various domains like healthcare, finance, legal etc.

Supported PII Entity Types

This model can detect the following 55 PII entity types

EntityDescription
account_numberAccount Number
ageAge
api_keyAPI Key
bank_routing_numberBank Routing Number
biometric_identifierBiometric Identifier
blood_typeBlood Type
certificate_license_numberCertificate or License Number
cityCity
company_nameCompany Name
coordinateGeographic Coordinate
countryCountry
countyCounty
credit_debit_cardCredit or Debit Card Number
customer_idCustomer ID
cvvCard Verification Value (CVV)
dateDate
date_of_birthDate of Birth
date_timeDate and Time
device_identifierDevice Identifier
education_levelEducation Level
emailEmail Address
employee_idEmployee ID
employment_statusEmployment Status
fax_numberFax Number
first_nameFirst Name
genderGender
health_plan_beneficiary_numberHealth Plan Beneficiary Number
http_cookieHTTP Cookie
ipv4IPv4 Address
ipv6IPv6 Address
languageLanguage
last_nameLast Name
license_plateVehicle License Plate
mac_addressMAC Address
medical_record_numberMedical Record Number
national_idNational Identification Number
occupationOccupation
passwordPassword
phone_numberPhone Number
pinPersonal Identification Number (PIN)
political_viewPolitical View
postcodePostcode / Zip Code
race_ethnicityRace or Ethnicity
religious_beliefReligious Belief
sexualitySexuality / Sexual Orientation
ssnSocial Security Number
stateState
street_addressStreet Address
swift_bicSWIFT / BIC Code
tax_idTax Identification Number
timeTime
unique_idUnique Identifier
urlURL / Web Address
user_nameUsername
vehicle_identifierVehicle Identification Number (VIN)

Usage


# First install Hugging Face transformers library
!pip install transformers

# Initialize and run the PII detection pipeline to extract PII entities
from transformers import pipeline

## Initialize the PII detection pipeline
ner = pipeline("ner", model="kalyan-ks/ettin-32m-nemotron-pii", aggregation_strategy="simple")

input_text = "Kalyan KS is from India. His email id is kalyan.ks@yahoo.com"

## Run the PII detection to extract PII entities
pii_entities = ner(input_text)

## Process the extracted PII entities 
def format_pii_entities(entities, original_text):
    if not entities:
        return []

    merged_entities = []

    entities = sorted(entities, key=lambda x: x['start'])

    current_entity = {
        'start': entities[0]['start'],
        'end': entities[0]['end'],
        'label': entities[0]['entity_group'],
        'text': entities[0]['word']
    }

    for next_ent in entities[1:]:
        is_same_label = next_ent['entity_group'] == current_entity['label']
        is_adjacent = next_ent['start'] <= current_entity['end'] + 1

        if is_same_label and is_adjacent:
            current_entity['end'] = max(current_entity['end'], next_ent['end'])
            current_entity['text'] = original_text[current_entity['start']:current_entity['end']]
        else:
            merged_entities.append(clean_entity(current_entity))
            current_entity = {
                'start': next_ent['start'],
                'end': next_ent['end'],
                'label': next_ent['entity_group'],
                'text': next_ent['word']
            }

    merged_entities.append(clean_entity(current_entity))
    return merged_entities

def clean_entity(ent):

    raw_text = ent['text']
    stripped_text = raw_text.strip()
    leading_spaces = len(raw_text) - len(raw_text.lstrip())

    return {
        'start': ent['start'] + leading_spaces,
        'end': ent['start'] + leading_spaces + len(stripped_text),
        'text': stripped_text,
        'label': ent['label']
    }

# Display the extracted PII entities
formatted_entities = format_pii_entities(pii_entities, input_text)
print(formatted_entities)

# Output
[{'start': 0, 'end': 9, 'text': 'Kalyan KS', 'label': 'first_name'}, {'start': 18, 'end': 23, 'text': 'India', 'label': 'country'}, {'start': 41, 'end': 60, 'text': 'kalyan.ks@yahoo.com', 'label': 'email'}]

Evaluation

This model is evaluated on a 10k sample test set from Neomotron PII dataset and achieved the following results

MetricScore
F195.73
Precision95.96
Recall95.49
Accuracy99.17

Top Performing PII Entity Types

EntityPrecisionRecallF1
mac_address0.99651.00000.9982
biometric_identifier0.99570.99780.9967
date_of_birth0.99370.99760.9956
email0.99370.99400.9939
api_key0.99210.99490.9935
coordinate0.99100.99550.9932
vehicle_identifier0.98630.99810.9922
medical_record_number0.99600.98810.9921
employee_id0.99090.99150.9912
credit_debit_card0.99350.98700.9902

Challenging PII Entity Types

EntityPrecisionRecallF1
occupation0.71100.51150.5949
time0.86140.77840.8178
political_view0.83480.88420.8588
age0.82200.91840.8676
state0.89410.85700.8751
national_id0.86710.89990.8832
company_name0.88600.88600.8860
fax_number0.90700.87420.8903
race_ethnicity0.86110.92990.8942
education_level0.92320.88740.9049

Limitations

  • Language: This model works well only for English language texts.
  • Challenging PII Entity Types: Some of the entity types like occupation has low F1 score.

Citation

@misc{ettin-32m-pii-2026,
  title = {ettin-32m-nemotron-pii-2026: PII Detection Model},
  author = {Kalyan KS},
  year = {2026},
  publisher = {Hugging Face},
  url = {https://huggingface.co/kalyan-ks/ettin-32m-nemotron-pii}
}

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей