Instructions to use lethalantidote/phi-detector-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lethalantidote/phi-detector-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="lethalantidote/phi-detector-model")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("lethalantidote/phi-detector-model") model = AutoModelForTokenClassification.from_pretrained("lethalantidote/phi-detector-model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("lethalantidote/phi-detector-model")
model = AutoModelForTokenClassification.from_pretrained("lethalantidote/phi-detector-model", device_map="auto")Quick Links
Synthetic PHI Detector
This token-classification model was fine-tuned from StanfordAIMI/stanford-deidentifier-base using
Synthetic Synthea-derived clinical templates. It recognizes three entity types
with the BIO labels stored in config.json.
Training examples: 5997
| Entity | Strict seqeval F1 |
|---|---|
| MEDICAL_RECORD | 1.0000 |
| DIAGNOSIS | 1.0000 |
| MEDICATION | 1.0000 |
Overall strict seqeval F1: 1.0000
Limitations
Synthetic templates do not represent every institution, document style, or identifier format. False negatives and false positives are expected. This model assists PHI detection and is not a compliance guarantee or substitute for human review and layered detection controls.
- Downloads last month
- 3
Model tree for lethalantidote/phi-detector-model
Base model
StanfordAIMI/stanford-deidentifier-base
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="lethalantidote/phi-detector-model")