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
| { | |
| "add_cross_attention": false, | |
| "architectures": [ | |
| "BertForTokenClassification" | |
| ], | |
| "attention_probs_dropout_prob": 0.1, | |
| "bos_token_id": null, | |
| "classifier_dropout": null, | |
| "dtype": "float32", | |
| "eos_token_id": null, | |
| "eos_token_ids": null, | |
| "finetuning_task": null, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 768, | |
| "id2label": { | |
| "0": "O", | |
| "1": "B-MEDICAL_RECORD", | |
| "2": "I-MEDICAL_RECORD", | |
| "3": "B-DIAGNOSIS", | |
| "4": "I-DIAGNOSIS", | |
| "5": "B-MEDICATION", | |
| "6": "I-MEDICATION" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "is_decoder": false, | |
| "label2id": { | |
| "B-DIAGNOSIS": 3, | |
| "B-MEDICAL_RECORD": 1, | |
| "B-MEDICATION": 5, | |
| "I-DIAGNOSIS": 4, | |
| "I-MEDICAL_RECORD": 2, | |
| "I-MEDICATION": 6, | |
| "O": 0 | |
| }, | |
| "layer_norm_eps": 1e-12, | |
| "max_position_embeddings": 512, | |
| "model_type": "bert", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "output_past": true, | |
| "pad_token_id": 0, | |
| "pruned_heads": {}, | |
| "tie_word_embeddings": true, | |
| "torchscript": false, | |
| "transformers_version": "5.14.1", | |
| "type_vocab_size": 2, | |
| "use_bfloat16": false, | |
| "use_cache": true, | |
| "vocab_size": 30522 | |
| } | |