Instructions to use aule13/pii-guard-distilbert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aule13/pii-guard-distilbert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="aule13/pii-guard-distilbert")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("aule13/pii-guard-distilbert") model = AutoModelForTokenClassification.from_pretrained("aule13/pii-guard-distilbert", device_map="auto") - Notebooks
- Google Colab
- Kaggle
PII Guard DistilBERT
Fine-tuned DistilBERT-multilingual for Russian PII detection. 21 entity types in BIO format. F1=0.9938 on pii_benchmark.
Usage
from transformers import AutoModelForTokenClassification, AutoTokenizer
model = AutoModelForTokenClassification.from_pretrained("astralinux/pii-guard-distilbert")
tokenizer = AutoTokenizer.from_pretrained("astralinux/pii-guard-distilbert")
Entity Types
| Tag | Description |
|---|---|
| B-FIRST_NAME | First name |
| B-LAST_NAME | Last name |
| B-MIDDLE_NAME | Middle name / patronymic |
| B-PHONE | Phone number |
| B-EMAIL | Email address |
| B-CITY | City |
| B-STREET | Street |
| B-HOUSE | House number |
| B-COUNTRY | Country |
| B-REGION | Region |
| B-DISTRICT | District |
| B-PASSPORT | Passport number |
| B-SNILS | SNILS |
| B-INN | INN (tax ID) |
| B-OMS | Medical insurance |
| B-CREDIT_CARD | Credit card / bank account |
| B-DRIVER_LICENSE | Driver license |
| B-MILITARY_ID | Military ID |
| B-BIRTH_CERTIFICATE | Birth certificate |
| B-URL | URL |
| B-IP_ADDRESS | IP address |
Part of PII Guard
github.com/astralinux/pii-guard
Designed for 152-ФЗ compliance. Self-hosted. No data leaves your perimeter.
- Downloads last month
- 44