VOOZH about

URL: https://huggingface.co/OpenMed/OpenMed-PII-Vietnamese-mSuperClinical-Large-279M-v1

⇱ OpenMed/OpenMed-PII-Vietnamese-mSuperClinical-Large-279M-v1 · Hugging Face


OpenMed-PII-Vietnamese-mSuperClinical-Large-279M-v1

Vietnamese PII Detection Model | 279M Parameters | Open Source

Model Description

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

Key Features

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

Performance

Evaluated on the Vietnamese test split (AI4Privacy + synthetic data):

Metric Score
Micro F1 0.7430
Precision 0.7280
Recall 0.7586
Macro F1 0.6759
Weighted F1 0.7422
Accuracy 0.8800

Top 10 Vietnamese PII Models

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-Vietnamese-mSuperClinical-Large-279M-v1", aggregation_strategy="simple")

text = """
Bệnh nhân Trần Minh Đức (sinh ngày 15/03/1985, CCCD: 098765432109) được khám hôm nay.
Liên hệ: tran.duc@email.vn, Điện thoại: +84 912 345 678.
Địa chỉ: 123 Lê Lợi, Quận 1, TP.HCM.
"""

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-Vietnamese-mSuperClinical-Large-279M-v1"
model = AutoModelForTokenClassification.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)

texts = [
 "Bệnh nhân Trần Minh Đức (sinh ngày 15/03/1985, CCCD: 098765432109) được khám hôm nay.",
 "Liên hệ: tran.duc@email.vn, Điện thoại: +84 912 345 678.",
]

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

This model was trained on a combination of:

  • AI4Privacy PII Masking 200K: Multilingual base dataset (200K records across 8 languages)

  • NVIDIA Nemotron-PII: Seed dataset for synthetic data generation

  • Synthetic Vietnamese Data: ~25K high-quality samples generated with locale-specific formatting (CCCD format, +84 phones, Vietnamese names, ₫ currency)

  • Format: BIO-tagged token classification

  • Labels: 76 BIO tags (54 entity types)

Training Configuration

  • Max Sequence Length: 512 tokens
  • Framework: Hugging Face Transformers + Trainer API

Intended Use & Limitations

Intended Use

  • De-identification: Automated redaction of PII in Vietnamese clinical notes, medical records, and documents
  • Compliance: Supporting GDPR, and other 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
  • Language: Optimized for Vietnamese text; may not perform well on other languages

Citation

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

Links

Downloads last month
26
Safetensors
Model size
0.3B params
Tensor type
F32
·

Model tree for OpenMed/OpenMed-PII-Vietnamese-mSuperClinical-Large-279M-v1

Finetuned
(284)
this model

Collections including OpenMed/OpenMed-PII-Vietnamese-mSuperClinical-Large-279M-v1

Evaluation results