Upload 10 files
Browse files- .gitattributes +35 -35
- README.md +153 -0
- config.json +127 -0
- model.safetensors +3 -0
- onnx/model.onnx +3 -0
- onnx/model.quant.onnx +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +57 -0
- vocab.txt +0 -0
.gitattributes
CHANGED
|
@@ -1,35 +1,35 @@
|
|
| 1 |
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,156 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
datasets:
|
| 4 |
+
- beki/privy
|
| 5 |
+
- gretelai/synthetic_pii_finance_multilingual
|
| 6 |
+
- eriktks/conll2003
|
| 7 |
+
language:
|
| 8 |
+
- en
|
| 9 |
+
base_model:
|
| 10 |
+
- prajjwal1/bert-small
|
| 11 |
+
pipeline_tag: token-classification
|
| 12 |
---
|
| 13 |
+
# gravitee-io/bert-small-pii-detection 🚀
|
| 14 |
+
|
| 15 |
+
**A more accurate PII detector** fine-tuned from [`prajjwal1/bert-small`](https://huggingface.co/prajjwal1/bert-small) on the datasets described in metatada.
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
### About the dataset:
|
| 19 |
+
|
| 20 |
+
We combined various datasets in order to cover wide range of document formats like:
|
| 21 |
+
1. JSON,
|
| 22 |
+
2. HTML,
|
| 23 |
+
3. XML,
|
| 24 |
+
4. SQL
|
| 25 |
+
5. Documents
|
| 26 |
+
|
| 27 |
+
### Label Set
|
| 28 |
+
|
| 29 |
+
```
|
| 30 |
+
AGE, COORDINATE, CREDIT_CARD, DATE_TIME, EMAIL_ADDRESS, FINANCIAL, IBAN_CODE, IMEI,
|
| 31 |
+
IP_ADDRESS, LOCATION, MAC_ADDRESS, NRP, ORGANIZATION, PASSWORD, PERSON, PHONE_NUMBER,
|
| 32 |
+
TITLE, URL, US_BANK_NUMBER, US_DRIVER_LICENSE, US_ITIN, US_LICENSE_PLATE, US_PASSPORT, US_SSN
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
## How to Use
|
| 36 |
+
|
| 37 |
+
### Quick start (pipeline)
|
| 38 |
+
|
| 39 |
+
```python
|
| 40 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
|
| 41 |
+
|
| 42 |
+
repo = "gravitee-io/bert-small-pii-detection"
|
| 43 |
+
tok = AutoTokenizer.from_pretrained(repo)
|
| 44 |
+
model = AutoModelForTokenClassification.from_pretrained(repo)
|
| 45 |
+
|
| 46 |
+
pipe = pipeline("token-classification", model=model, tokenizer=tok, aggregation_strategy="simple")
|
| 47 |
+
text = ""
|
| 48 |
+
pipe(text)
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
## Evaluation
|
| 53 |
+
|
| 54 |
+
**Metric:** precision / recall / F1 per entity, micro/macro averages
|
| 55 |
+
|
| 56 |
+
| Entity | Precision | Recall | F1-score | Support |
|
| 57 |
+
|--------------------|-----------|--------|----------|---------|
|
| 58 |
+
| AGE | 0.9898 | 0.8858 | 0.9349 | 219 |
|
| 59 |
+
| COORDINATE | 0.9627 | 0.8738 | 0.9161 | 325 |
|
| 60 |
+
| CREDIT_CARD | 0.9273 | 0.8870 | 0.9067 | 115 |
|
| 61 |
+
| DATE_TIME | 0.8598 | 0.7364 | 0.7933 | 3255 |
|
| 62 |
+
| EMAIL_ADDRESS | 0.9428 | 0.8941 | 0.9178 | 387 |
|
| 63 |
+
| FINANCIAL | 0.9862 | 0.9565 | 0.9711 | 299 |
|
| 64 |
+
| IBAN_CODE | 0.9577 | 0.9252 | 0.9412 | 147 |
|
| 65 |
+
| IMEI | 0.9885 | 0.9663 | 0.9773 | 89 |
|
| 66 |
+
| IP_ADDRESS | 0.9338 | 0.8812 | 0.9068 | 160 |
|
| 67 |
+
| LOCATION | 0.8849 | 0.8222 | 0.8524 | 4264 |
|
| 68 |
+
| MAC_ADDRESS | 0.9889 | 1.0000 | 0.9944 | 89 |
|
| 69 |
+
| NRP | 1.0000 | 0.9818 | 0.9908 | 494 |
|
| 70 |
+
| ORGANIZATION | 0.7454 | 0.6688 | 0.7051 | 3551 |
|
| 71 |
+
| PASSWORD | 0.8384 | 0.8137 | 0.8259 | 102 |
|
| 72 |
+
| PERSON | 0.9123 | 0.8826 | 0.8972 | 4454 |
|
| 73 |
+
| PHONE_NUMBER | 0.9462 | 0.8199 | 0.8785 | 322 |
|
| 74 |
+
| TITLE | 0.9887 | 0.9734 | 0.9810 | 451 |
|
| 75 |
+
| URL | 1.0000 | 0.9787 | 0.9892 | 188 |
|
| 76 |
+
| US_BANK_NUMBER | 1.0000 | 0.9579 | 0.9785 | 95 |
|
| 77 |
+
| US_DRIVER_LICENSE | 0.9167 | 0.9167 | 0.9167 | 120 |
|
| 78 |
+
| US_ITIN | 0.9659 | 0.8763 | 0.9189 | 97 |
|
| 79 |
+
| US_LICENSE_PLATE | 1.0000 | 0.9000 | 0.9474 | 90 |
|
| 80 |
+
| US_PASSPORT | 0.9200 | 0.9200 | 0.9200 | 100 |
|
| 81 |
+
| US_SSN | 0.9744 | 0.9580 | 0.9661 | 119 |
|
| 82 |
+
| **micro avg** | 0.8804 | 0.8141 | 0.8460 | 19532 |
|
| 83 |
+
| **macro avg** | 0.9429 | 0.8948 | 0.9178 | 19532 |
|
| 84 |
+
| **weighted avg** | 0.8785 | 0.8141 | 0.8446 | 19532 |
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
## Intended Uses & Limitations
|
| 88 |
+
|
| 89 |
+
**Use this model for:**
|
| 90 |
+
|
| 91 |
+
* **Low resource environmens**
|
| 92 |
+
* Redacting PII in customer support logs, dev/test environments, API traces and articles
|
| 93 |
+
* Real-time hints in form fields or data entry systems
|
| 94 |
+
|
| 95 |
+
**Limitations:**
|
| 96 |
+
|
| 97 |
+
* English-focused; other languages will degrade
|
| 98 |
+
* Domain drift is real: audit on your own data
|
| 99 |
+
|
| 100 |
+
---
|
| 101 |
+
|
| 102 |
+
## Citation
|
| 103 |
+
|
| 104 |
+
If you use the model, please consider citing the papers:
|
| 105 |
+
|
| 106 |
+
```
|
| 107 |
+
@misc{bhargava2021generalization,
|
| 108 |
+
title={Generalization in NLI: Ways (Not) To Go Beyond Simple Heuristics},
|
| 109 |
+
author={Prajjwal Bhargava and Aleksandr Drozd and Anna Rogers},
|
| 110 |
+
year={2021},
|
| 111 |
+
eprint={2110.01518},
|
| 112 |
+
archivePrefix={arXiv},
|
| 113 |
+
primaryClass={cs.CL}
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
@article{DBLP:journals/corr/abs-1908-08962,
|
| 117 |
+
author = {Iulia Turc and
|
| 118 |
+
Ming{-}Wei Chang and
|
| 119 |
+
Kenton Lee and
|
| 120 |
+
Kristina Toutanova},
|
| 121 |
+
title = {Well-Read Students Learn Better: The Impact of Student Initialization
|
| 122 |
+
on Knowledge Distillation},
|
| 123 |
+
journal = {CoRR},
|
| 124 |
+
volume = {abs/1908.08962},
|
| 125 |
+
year = {2019},
|
| 126 |
+
url = {http://arxiv.org/abs/1908.08962},
|
| 127 |
+
eprinttype = {arXiv},
|
| 128 |
+
eprint = {1908.08962},
|
| 129 |
+
timestamp = {Thu, 29 Aug 2019 16:32:34 +0200},
|
| 130 |
+
biburl = {https://dblp.org/rec/journals/corr/abs-1908-08962.bib},
|
| 131 |
+
bibsource = {dblp computer science bibliography, https://dblp.org}
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
@online{WinNT,
|
| 135 |
+
author = {Benjamin Kilimnik},
|
| 136 |
+
title = {{Privy} Synthetic PII Protocol Trace Dataset},
|
| 137 |
+
year = 2022,
|
| 138 |
+
url = {https://huggingface.co/datasets/beki/privy},
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
@online{gretel2023,
|
| 142 |
+
author = {Gretel.ai},
|
| 143 |
+
title = {{Synthetic PII Finance Multilingual Dataset}},
|
| 144 |
+
year = 2023,
|
| 145 |
+
url = {https://huggingface.co/datasets/gretelai/synthetic_pii_finance_multilingual},
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
@inproceedings{tjong-kim-sang-de-meulder-2003-introduction,
|
| 149 |
+
title = "Introduction to the CoNLL-2003 Shared Task: Language-Independent Named Entity Recognition",
|
| 150 |
+
author = "Tjong Kim Sang, Erik F. and De Meulder, Fien",
|
| 151 |
+
booktitle = "Proceedings of the Seventh Conference on Natural Language Learning at HLT-NAACL 2003",
|
| 152 |
+
year = "2003",
|
| 153 |
+
url = "https://aclanthology.org/W03-0419",
|
| 154 |
+
}
|
| 155 |
+
}
|
| 156 |
+
```
|
config.json
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "prajjwal1/bert-small",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"BertForTokenClassification"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"classifier_dropout": null,
|
| 8 |
+
"hidden_act": "gelu",
|
| 9 |
+
"hidden_dropout_prob": 0.1,
|
| 10 |
+
"hidden_size": 512,
|
| 11 |
+
"id2label": {
|
| 12 |
+
"0": "O",
|
| 13 |
+
"1": "B-AGE",
|
| 14 |
+
"2": "I-AGE",
|
| 15 |
+
"3": "B-COORDINATE",
|
| 16 |
+
"4": "I-COORDINATE",
|
| 17 |
+
"5": "B-CREDIT_CARD",
|
| 18 |
+
"6": "I-CREDIT_CARD",
|
| 19 |
+
"7": "B-DATE_TIME",
|
| 20 |
+
"8": "I-DATE_TIME",
|
| 21 |
+
"9": "B-EMAIL_ADDRESS",
|
| 22 |
+
"10": "I-EMAIL_ADDRESS",
|
| 23 |
+
"11": "B-FINANCIAL",
|
| 24 |
+
"12": "I-FINANCIAL",
|
| 25 |
+
"13": "B-IBAN_CODE",
|
| 26 |
+
"14": "I-IBAN_CODE",
|
| 27 |
+
"15": "B-IMEI",
|
| 28 |
+
"16": "I-IMEI",
|
| 29 |
+
"17": "B-IP_ADDRESS",
|
| 30 |
+
"18": "I-IP_ADDRESS",
|
| 31 |
+
"19": "B-LOCATION",
|
| 32 |
+
"20": "I-LOCATION",
|
| 33 |
+
"21": "B-MAC_ADDRESS",
|
| 34 |
+
"22": "I-MAC_ADDRESS",
|
| 35 |
+
"23": "B-NRP",
|
| 36 |
+
"24": "I-NRP",
|
| 37 |
+
"25": "B-ORGANIZATION",
|
| 38 |
+
"26": "I-ORGANIZATION",
|
| 39 |
+
"27": "B-PASSWORD",
|
| 40 |
+
"28": "I-PASSWORD",
|
| 41 |
+
"29": "B-PERSON",
|
| 42 |
+
"30": "I-PERSON",
|
| 43 |
+
"31": "B-PHONE_NUMBER",
|
| 44 |
+
"32": "I-PHONE_NUMBER",
|
| 45 |
+
"33": "B-TITLE",
|
| 46 |
+
"34": "I-TITLE",
|
| 47 |
+
"35": "B-URL",
|
| 48 |
+
"36": "I-URL",
|
| 49 |
+
"37": "B-US_BANK_NUMBER",
|
| 50 |
+
"38": "I-US_BANK_NUMBER",
|
| 51 |
+
"39": "B-US_DRIVER_LICENSE",
|
| 52 |
+
"40": "I-US_DRIVER_LICENSE",
|
| 53 |
+
"41": "B-US_ITIN",
|
| 54 |
+
"42": "I-US_ITIN",
|
| 55 |
+
"43": "B-US_LICENSE_PLATE",
|
| 56 |
+
"44": "I-US_LICENSE_PLATE",
|
| 57 |
+
"45": "B-US_PASSPORT",
|
| 58 |
+
"46": "I-US_PASSPORT",
|
| 59 |
+
"47": "B-US_SSN",
|
| 60 |
+
"48": "I-US_SSN"
|
| 61 |
+
},
|
| 62 |
+
"initializer_range": 0.02,
|
| 63 |
+
"intermediate_size": 2048,
|
| 64 |
+
"label2id": {
|
| 65 |
+
"B-AGE": 1,
|
| 66 |
+
"B-COORDINATE": 3,
|
| 67 |
+
"B-CREDIT_CARD": 5,
|
| 68 |
+
"B-DATE_TIME": 7,
|
| 69 |
+
"B-EMAIL_ADDRESS": 9,
|
| 70 |
+
"B-FINANCIAL": 11,
|
| 71 |
+
"B-IBAN_CODE": 13,
|
| 72 |
+
"B-IMEI": 15,
|
| 73 |
+
"B-IP_ADDRESS": 17,
|
| 74 |
+
"B-LOCATION": 19,
|
| 75 |
+
"B-MAC_ADDRESS": 21,
|
| 76 |
+
"B-NRP": 23,
|
| 77 |
+
"B-ORGANIZATION": 25,
|
| 78 |
+
"B-PASSWORD": 27,
|
| 79 |
+
"B-PERSON": 29,
|
| 80 |
+
"B-PHONE_NUMBER": 31,
|
| 81 |
+
"B-TITLE": 33,
|
| 82 |
+
"B-URL": 35,
|
| 83 |
+
"B-US_BANK_NUMBER": 37,
|
| 84 |
+
"B-US_DRIVER_LICENSE": 39,
|
| 85 |
+
"B-US_ITIN": 41,
|
| 86 |
+
"B-US_LICENSE_PLATE": 43,
|
| 87 |
+
"B-US_PASSPORT": 45,
|
| 88 |
+
"B-US_SSN": 47,
|
| 89 |
+
"I-AGE": 2,
|
| 90 |
+
"I-COORDINATE": 4,
|
| 91 |
+
"I-CREDIT_CARD": 6,
|
| 92 |
+
"I-DATE_TIME": 8,
|
| 93 |
+
"I-EMAIL_ADDRESS": 10,
|
| 94 |
+
"I-FINANCIAL": 12,
|
| 95 |
+
"I-IBAN_CODE": 14,
|
| 96 |
+
"I-IMEI": 16,
|
| 97 |
+
"I-IP_ADDRESS": 18,
|
| 98 |
+
"I-LOCATION": 20,
|
| 99 |
+
"I-MAC_ADDRESS": 22,
|
| 100 |
+
"I-NRP": 24,
|
| 101 |
+
"I-ORGANIZATION": 26,
|
| 102 |
+
"I-PASSWORD": 28,
|
| 103 |
+
"I-PERSON": 30,
|
| 104 |
+
"I-PHONE_NUMBER": 32,
|
| 105 |
+
"I-TITLE": 34,
|
| 106 |
+
"I-URL": 36,
|
| 107 |
+
"I-US_BANK_NUMBER": 38,
|
| 108 |
+
"I-US_DRIVER_LICENSE": 40,
|
| 109 |
+
"I-US_ITIN": 42,
|
| 110 |
+
"I-US_LICENSE_PLATE": 44,
|
| 111 |
+
"I-US_PASSPORT": 46,
|
| 112 |
+
"I-US_SSN": 48,
|
| 113 |
+
"O": 0
|
| 114 |
+
},
|
| 115 |
+
"layer_norm_eps": 1e-12,
|
| 116 |
+
"max_position_embeddings": 512,
|
| 117 |
+
"model_type": "bert",
|
| 118 |
+
"num_attention_heads": 8,
|
| 119 |
+
"num_hidden_layers": 4,
|
| 120 |
+
"pad_token_id": 0,
|
| 121 |
+
"position_embedding_type": "absolute",
|
| 122 |
+
"torch_dtype": "float32",
|
| 123 |
+
"transformers_version": "4.41.0",
|
| 124 |
+
"type_vocab_size": 2,
|
| 125 |
+
"use_cache": true,
|
| 126 |
+
"vocab_size": 30522
|
| 127 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:09be1b3b49663c94e7b038b2dae6f195ef3425db5edd3cf883db96ce6ec42bf4
|
| 3 |
+
size 114112684
|
onnx/model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5806bda3f4ba0b79bd39257382c4ceb508a4b683f12dc3d5b36623eaa9f3e124
|
| 3 |
+
size 114202366
|
onnx/model.quant.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a239c348b8249388bf55801d057b8d1294bf357757774c7c30febed0f2a2a5ac
|
| 3 |
+
size 28837321
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"mask_token": "[MASK]",
|
| 4 |
+
"pad_token": "[PAD]",
|
| 5 |
+
"sep_token": "[SEP]",
|
| 6 |
+
"unk_token": "[UNK]"
|
| 7 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "[PAD]",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"100": {
|
| 12 |
+
"content": "[UNK]",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"101": {
|
| 20 |
+
"content": "[CLS]",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"102": {
|
| 28 |
+
"content": "[SEP]",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"103": {
|
| 36 |
+
"content": "[MASK]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"clean_up_tokenization_spaces": true,
|
| 45 |
+
"cls_token": "[CLS]",
|
| 46 |
+
"do_basic_tokenize": true,
|
| 47 |
+
"do_lower_case": true,
|
| 48 |
+
"mask_token": "[MASK]",
|
| 49 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 50 |
+
"never_split": null,
|
| 51 |
+
"pad_token": "[PAD]",
|
| 52 |
+
"sep_token": "[SEP]",
|
| 53 |
+
"strip_accents": null,
|
| 54 |
+
"tokenize_chinese_chars": true,
|
| 55 |
+
"tokenizer_class": "BertTokenizer",
|
| 56 |
+
"unk_token": "[UNK]"
|
| 57 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|