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
| { | |
| "base_model": "StanfordAIMI/stanford-deidentifier-base", | |
| "base_model_revision": "661b9c1c717d3165512d440abc3700c386aefab6", | |
| "bio_labels": [ | |
| "O", | |
| "B-MEDICAL_RECORD", | |
| "I-MEDICAL_RECORD", | |
| "B-DIAGNOSIS", | |
| "I-DIAGNOSIS", | |
| "B-MEDICATION", | |
| "I-MEDICATION" | |
| ], | |
| "code_fingerprint": "6ca8a25e9d2aa93d901e2f15d984e1d8b497b390b48195775a5f6d85fcc3e54c", | |
| "dataset_manifest_sha256": "77443e9234a02f1b3b9eff317662f3a93c96bdff306e86eb1d5ecbdd508bd57d", | |
| "dependency_versions": { | |
| "python": "3.12.13", | |
| "torch": "2.11.0+cu128", | |
| "transformers": "5.14.1" | |
| }, | |
| "metrics": { | |
| "DIAGNOSIS_f1": 1.0, | |
| "DIAGNOSIS_precision": 1.0, | |
| "DIAGNOSIS_recall": 1.0, | |
| "DIAGNOSIS_support": 940.0, | |
| "MEDICAL_RECORD_f1": 1.0, | |
| "MEDICAL_RECORD_precision": 1.0, | |
| "MEDICAL_RECORD_recall": 1.0, | |
| "MEDICAL_RECORD_support": 300.0, | |
| "MEDICATION_f1": 1.0, | |
| "MEDICATION_precision": 1.0, | |
| "MEDICATION_recall": 1.0, | |
| "MEDICATION_support": 702.0, | |
| "loss": 0.0005009130109101534, | |
| "overall_f1": 1.0, | |
| "overall_precision": 1.0, | |
| "overall_recall": 1.0, | |
| "overall_support": 1942.0, | |
| "runtime": 1.7193, | |
| "samples_per_second": 1129.54, | |
| "steps_per_second": 35.48 | |
| }, | |
| "seed": 42, | |
| "training_parameters": { | |
| "epochs": 4.0, | |
| "eval_batch_size": 32, | |
| "learning_rate": 2e-05, | |
| "max_length": 512, | |
| "train_batch_size": 16, | |
| "weight_decay": 0.01 | |
| } | |
| } | |