Instructions to use Preetm-666/mintx-pii-distilbert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use Preetm-666/mintx-pii-distilbert with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('token-classification', 'Preetm-666/mintx-pii-distilbert');
mintx-pii-distilbert
distilbert-base-cased fine-tuned to detect personal data (PII) in web-page text for the
Mintx Assistant browser extension. It runs in the browser with
transformers.js (onnx/model_quantized.onnx, int8), so the text it reads never leaves the device.
Labels (BIO): PERSON, EMAIL, PHONE, ADDRESS, LOCATION, ORGANIZATION, DATE_OF_BIRTH, GOV_ID, CREDIT_CARD, BANK_ACCOUNT, UPI_ID, IP_ADDRESS, SECRET. Public entities such as countries, large organizations and public figures are deliberately left unlabelled (see the dataset's labelling policy).
Results
| index | exact_f1 | partial_f1 | privacy_recall | over_mask_rate | keep_respected |
|---|---|---|---|---|---|
| mintx-pii-distilbert · test_synthetic | 0.893 | 0.948 | 0.993 | 0.039 | 0.851 |
| mintx-pii-distilbert · test_ai4privacy | 0.986 | 0.992 | 0.995 | 0.006 | 0.976 |
| mintx-pii-distilbert · test_realistic | 0.715 | 0.802 | 0.867 | 0.147 | 0.885 |
| baseline: bert-base-NER (CoNLL) · test_synthetic | 0.278 | 0.483 | 0.553 | 0.205 | 0.041 |
| baseline: bert-base-NER (CoNLL) · test_ai4privacy | 0.07 | 0.291 | 0.161 | 0.1 | 0.133 |
| baseline: bert-base-NER (CoNLL) · test_realistic | 0.19 | 0.427 | 0.5 | 0.355 | 0.212 |
Privacy recall = share of personal values fully covered by a predicted span. Keep respected = share of public
entities left visible. test_realistic is small (hand-checked, 61 examples).
Training
26,388 examples (36,153 after oversampling rare labels ×4), 3 epochs, lr 5e-05, batch 32, max length 256, 22 min on Tesla T4.
Data and attribution
Trained on Preetm-666/mintx-pii, which includes data derived from OpenPII 1.5M by Ai4Privacy / Ai Suisse SA (CC-BY-4.0). All personal data in training is synthetic.
Limitations
English only; Indian and Western name and number formats. Not a guarantee: use alongside rule-based detectors.
- Downloads last month
- -
Model tree for Preetm-666/mintx-pii-distilbert
Base model
distilbert/distilbert-base-cased