Token Classification
Transformers
ONNX
Safetensors
English
distilbert
pii
privacy
experimental
datafog
Instructions to use DataFog/pii-en-65m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DataFog/pii-en-65m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="DataFog/pii-en-65m")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("DataFog/pii-en-65m") model = AutoModelForTokenClassification.from_pretrained("DataFog/pii-en-65m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download label-mappings.json from DataFog/pii-en-65m: direct link, hf CLI and curl.
- Browser
- Download file 982 Bytes
-
https://huggingface.co/DataFog/pii-en-65m/resolve/5683ef559df6618f563375b632fdab7352ac1628/label-mappings.json
- Command line
-
hf download hf://DataFog/pii-en-65m@5683ef559df6618f563375b632fdab7352ac1628/label-mappings.json
-
curl -L -o label-mappings.json https://huggingface.co/DataFog/pii-en-65m/resolve/5683ef559df6618f563375b632fdab7352ac1628/label-mappings.json
982 Bytes
| { | |
| "id2label": { | |
| "0": "O", | |
| "1": "B-first_name", | |
| "2": "I-first_name", | |
| "3": "B-last_name", | |
| "4": "I-last_name", | |
| "5": "B-email", | |
| "6": "I-email", | |
| "7": "B-phone_number", | |
| "8": "I-phone_number", | |
| "9": "B-street_address", | |
| "10": "I-street_address", | |
| "11": "B-customer_id", | |
| "12": "I-customer_id", | |
| "13": "B-account_number", | |
| "14": "I-account_number" | |
| }, | |
| "label2id": { | |
| "B-account_number": 13, | |
| "B-customer_id": 11, | |
| "B-email": 5, | |
| "B-first_name": 1, | |
| "B-last_name": 3, | |
| "B-phone_number": 7, | |
| "B-street_address": 9, | |
| "I-account_number": 14, | |
| "I-customer_id": 12, | |
| "I-email": 6, | |
| "I-first_name": 2, | |
| "I-last_name": 4, | |
| "I-phone_number": 8, | |
| "I-street_address": 10, | |
| "O": 0 | |
| }, | |
| "mcp": { | |
| "first_name": "PERSON", | |
| "last_name": "PERSON", | |
| "street_address": "STREET_ADDRESS" | |
| }, | |
| "other_model_labels": "Ignored by MCP model adapter; existing Core detectors remain responsible." | |
| } | |