Instructions to use ankitcodes/pii_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ankitcodes/pii_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="ankitcodes/pii_model")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("ankitcodes/pii_model") model = AutoModelForTokenClassification.from_pretrained("ankitcodes/pii_model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files45 unmodified lines46474849495152535455565758596061626350515232 unmodified lines858687102103104105106107108109110111112113114115116117118119120121122123124125126127128129130888990919213613793949545 unmodified lines<!-- This model card has been generated automatically according to the information the Trainer had access to. Youshould probably proofread and complete it, then remove this comment. -->
# Personal Identifiable Information (PII Model)
This model is a fine-tuned version of [bert-base-cased](https://huggingface.co/bert-base-cased) on the generator dataset.It achieves the following results:
- Training Loss: 0.003900- Validation Loss: 0.051071- Precision: 95.53%- Recall: 96.60%- F1: 96%- Accuracy:99.11%
## Model description
Meet our digital safeguard, a savvy token classification model with a knack for spotting personally identifiable information (PII) entities. Trained on the illustrious Bert architecture and fine-tuned on a custom dataset, this model is like a superhero for privacy, swiftly detecting names, addresses, dates of birth, and more. With each token it encounters, it acts as a vigilant guardian, ensuring that sensitive information remains shielded from prying eyes, making the digital realm a safer and more secure place to explore.
## Model can Detect Following Entity Group
32 unmodified lines
### Training hyperparametersThe following hyperparameters were used during training:
| Hyperparameter | Value ||------------------------------|---------------|| Learning Rate | 5e-5 || Train Batch Size | 16 || Eval Batch Size | 16 || Number of Training Epochs | 7 || Weight Decay | 0.01 || Save Strategy | Epoch || Load Best Model at End | True || Metric for Best Model | F1 || Push to Hub | True || Evaluation Strategy | Epoch || Early Stopping Patience | 3 |
### Training results
| Epoch | Training Loss | Validation Loss | Precision (%) | Recall (%) | F1 Score (%) | Accuracy (%) ||-------|---------------|-----------------|---------------|------------|--------------|--------------|| 1 | 0.0443 | 0.038108 | 91.88 | 95.17 | 93.50 | 98.80 || 2 | 0.0318 | 0.035728 | 94.13 | 96.15 | 95.13 | 98.90 || 3 | 0.0209 | 0.032016 | 94.81 | 96.42 | 95.61 | 99.01 || 4 | 0.0154 | 0.040221 | 93.87 | 95.80 | 94.82 | 98.88 || 5 | 0.0084 | 0.048183 | 94.21 | 96.06 | 95.13 | 98.93 || 6 | 0.0037 | 0.052281 | 94.49 | 96.60 | 95.53 | 99.07 |
### Authorabhijeet__@outlook.com
### Framework versions
README.md-45