VOOZH about

URL: https://huggingface.co/OpenMed/OpenMed-PII-ClinicDischarge-Base-110M-v1

⇱ OpenMed/OpenMed-PII-ClinicDischarge-Base-110M-v1 · Hugging Face


OpenMed-PII-ClinicDischarge-110M-v1

PII Detection Model | 110M Parameters | Open Source

Model Description

OpenMed-PII-ClinicDischarge-110M-v1 is a transformer-based token classification model fine-tuned for Personally Identifiable Information (PII) detection in text. This model identifies and classifies 54 types of sensitive information including names, addresses, SSNs, medical record numbers, and more.

Key Features

  • High Accuracy: Achieves strong F1 scores across diverse PII categories
  • Comprehensive Coverage: Detects 50+ entity types spanning personal, financial, medical, and contact information
  • Privacy-Focused: Designed for de-identification and compliance with HIPAA, GDPR, and other privacy regulations
  • Production-Ready: Optimized for real-world text processing pipelines

Performance

Evaluated on a stratified 2,000-sample test set from NVIDIA Nemotron-PII:

Metric Score
Micro F1 0.9452
Precision 0.9465
Recall 0.9438
Macro F1 0.9497
Weighted F1 0.9444
Accuracy 0.9930

Top 10 PII Models

Rank Model F1 Precision Recall
1 OpenMed-PII-SuperClinical-Large-434M-v1 0.9608 0.9685 0.9532
2 OpenMed-PII-BigMed-Large-560M-v1 0.9604 0.9644 0.9565
3 OpenMed-PII-EuroMed-210M-v1 0.9600 0.9681 0.9521
4 OpenMed-PII-SnowflakeMed-568M-v1 0.9594 0.9640 0.9548
5 OpenMed-PII-SuperMedical-Large-355M-v1 0.9592 0.9632 0.9553
6 OpenMed-PII-ClinicalBGE-568M-v1 0.9587 0.9636 0.9538
7 OpenMed-PII-mClinicalE5-Large-560M-v1 0.9582 0.9631 0.9533
8 OpenMed-PII-ModernMed-Large-395M-v1 0.9579 0.9639 0.9520
9 OpenMed-PII-BioClinicalModern-Large-395M-v1 0.9579 0.9656 0.9502
10 OpenMed-PII-ClinicalE5-Large-335M-v1 0.9577 0.9604 0.9550

Best Performing Entities

Entity F1 Precision Recall Support
biometric_identifier 1.000 1.000 1.000 232
medical_record_number 1.000 1.000 1.000 264
date_of_birth 0.996 0.993 1.000 273
email 0.995 0.996 0.995 757
ipv4 0.994 0.994 0.994 176

Challenging Entities

These entity types have lower performance and may benefit from additional post-processing:

Entity F1 Precision Recall Support
time 0.861 0.876 0.846 468
pin 0.858 0.849 0.868 136
sexuality 0.857 0.815 0.904 83
gender 0.844 0.813 0.878 188
occupation 0.636 0.671 0.604 717

Supported Entity Types

This model detects 54 PII entity types organized into categories:

Usage

Quick Start

from transformers import pipeline

# Load the PII detection pipeline
ner = pipeline("ner", model="openmed/OpenMed-PII-ClinicDischarge-110M-v1", aggregation_strategy="simple")

text = """
Patient John Smith (DOB: 03/15/1985, SSN: 123-45-6789) was seen today.
Contact: john.smith@email.com, Phone: (555) 123-4567.
Address: 456 Oak Street, Boston, MA 02108.
"""

entities = ner(text)
for entity in entities:
 print(f"{entity['entity_group']}: {entity['word']} (score: {entity['score']:.3f})")

De-identification Example

def redact_pii(text, entities, placeholder='[REDACTED]'):
 """Replace detected PII with placeholders."""
 # Sort entities by start position (descending) to preserve offsets
 sorted_entities = sorted(entities, key=lambda x: x['start'], reverse=True)
 redacted = text
 for ent in sorted_entities:
 redacted = redacted[:ent['start']] + f"[{ent['entity_group']}]" + redacted[ent['end']:]
 return redacted

# Apply de-identification
redacted_text = redact_pii(text, entities)
print(redacted_text)

Batch Processing

from transformers import AutoModelForTokenClassification, AutoTokenizer
import torch

model_name = "openmed/OpenMed-PII-ClinicDischarge-110M-v1"
model = AutoModelForTokenClassification.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)

texts = [
 "Contact Dr. Jane Doe at jane.doe@hospital.org",
 "Patient SSN: 987-65-4321, MRN: 12345678",
]

inputs = tokenizer(texts, return_tensors='pt', padding=True, truncation=True)
with torch.no_grad():
 outputs = model(**inputs)
 predictions = torch.argmax(outputs.logits, dim=-1)

Training Details

Dataset

  • Source: NVIDIA Nemotron-PII
  • Format: BIO-tagged token classification
  • Labels: 106 total (53 entity types × 2 BIO tags + O)
  • Splits: 50K train / 5K validation / 45K test

Training Configuration

  • Max Sequence Length: 384 tokens
  • Label Strategy: First token only (label_all_tokens=False)
  • Framework: Hugging Face Transformers + Trainer API

Intended Use & Limitations

Intended Use

  • De-identification: Automated redaction of PII in clinical notes, medical records, and documents
  • Compliance: Supporting HIPAA, GDPR, and privacy regulation compliance
  • Data Preprocessing: Preparing datasets for research by removing sensitive information
  • Audit Support: Identifying PII in document collections

Limitations

⚠️ Important: This model is intended as an assistive tool, not a replacement for human review.

  • False Negatives: Some PII may not be detected; always verify critical applications
  • Context Sensitivity: Performance may vary with domain-specific terminology
  • Challenging Categories: occupation, time, and sexuality have lower F1 scores
  • Language: Primarily trained on English text

Citation

@misc{openmed-pii-2026,
 title = {OpenMed-PII-ClinicDischarge-110M-v1: PII Detection Model},
 author = {OpenMed Science},
 year = {2026},
 publisher = {Hugging Face},
 url = {https://huggingface.co/openmed/OpenMed-PII-ClinicDischarge-110M-v1}
}

Links

Downloads last month
7,641
Safetensors
Model size
0.1B params
Tensor type
F32
·

Model tree for OpenMed/OpenMed-PII-ClinicDischarge-Base-110M-v1

Finetuned
(10)
this model
Finetunes
1 model

Dataset used to train OpenMed/OpenMed-PII-ClinicDischarge-Base-110M-v1

Collection including OpenMed/OpenMed-PII-ClinicDischarge-Base-110M-v1

Evaluation results