pii-distilbert-v5
personal data detection and masking in five languages
2 min readupdated
The pii-distilbert-v5 model, built on the DistilBERT architecture (66 million parameters), is designed to automatically detect 15 types of sensitive data in English, Spanish, French, German, and Italian texts. It efficiently identifies names, addresses, emails, phone numbers, card numbers, IBANs, and API keys. The model is used to ensure data privacy and security. For convenience, the scrubpii package is available, allowing you to run an 8-bit ONNX version of the model without heavy dependencies.
Key features
- Support for 15 types of sensitive data and personally identifiable information.
- Multilingual support: English, Spanish, French, German, and Italian languages.
- Availability of a compact 8-bit ONNX version (66 MB) for fast deployment.
- Integration with the scrubpii library with support for checksums and English-language rules.
What you can do
- Clean text documents, logs, and chats of personal data using the scrubpii package.
- Integrate the model into text processing pipelines to comply with privacy standards.
- Deploy the solution on lightweight servers without using PyTorch thanks to ONNX Runtime.
Example
pip install scrubpii
from scrubpii import redact
redact("Email sarah.j@example.com or call 415-555-0198")
# Результат: 'Email [EMAIL] or call [PHONE]'
Read more
DetailsBenchmarks: F1 up to 1.00 on the ai4privacy and Nemotron-PII datasets.
Hardware: lightweight 66M parameter model, optimized for CPU.
Limitations: trained on synthetic data, critical results require verification.
Foundation: fine-tuned DistilBERT cased on ~114k texts.










Comments