MaziyarPanahi commited on
Commit
98e5d99
·
verified ·
1 Parent(s): c3240ce

Upload Turkish PII detection model OpenMed-PII-Turkish-ClinicDischarge-Base-110M-v1

Browse files
README.md ADDED
@@ -0,0 +1,309 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - ar
4
+ license: apache-2.0
5
+ base_model: emilyalsentzer/Bio_Discharge_Summary_BERT
6
+ tags:
7
+ - token-classification
8
+ - ner
9
+ - pii
10
+ - pii-detection
11
+ - de-identification
12
+ - privacy
13
+ - healthcare
14
+ - medical
15
+ - clinical
16
+ - phi
17
+ - arabic
18
+ - pytorch
19
+ - transformers
20
+ - openmed
21
+ pipeline_tag: token-classification
22
+ library_name: transformers
23
+ metrics:
24
+ - f1
25
+ - precision
26
+ - recall
27
+ model-index:
28
+ - name: OpenMed-PII-Arabic-ClinicDischarge-Base-110M-v1
29
+ results:
30
+ - task:
31
+ type: token-classification
32
+ name: Named Entity Recognition
33
+ dataset:
34
+ name: AI4Privacy + Synthetic Arabic PII
35
+ type: ai4privacy/pii-masking-200k
36
+ split: test
37
+ metrics:
38
+ - type: f1
39
+ value: 0.8833
40
+ name: F1 (micro)
41
+ - type: precision
42
+ value: 0.8746
43
+ name: Precision
44
+ - type: recall
45
+ value: 0.8922
46
+ name: Recall
47
+ widget:
48
+ - text: "د. أحمد محمد (رقم الهوية: 1234567890) يمكن التواصل معه عبر ahmed.mohammed@hospital.sa أو +966 50 123 4567. العنوان: شارع الملك فهد 25، الرياض 11564."
49
+ example_title: Clinical Note with PII (Arabic)
50
+ ---
51
+
52
+ # OpenMed-PII-Arabic-ClinicDischarge-Base-110M-v1
53
+
54
+ **Arabic PII Detection Model** | 110M Parameters | Open Source
55
+
56
+ [![F1 Score](https://img.shields.io/badge/F1-88.33%25-brightgreen)]() [![Precision](https://img.shields.io/badge/Precision-87.46%25-blue)]() [![Recall](https://img.shields.io/badge/Recall-89.22%25-orange)]()
57
+
58
+ ## Model Description
59
+
60
+ **OpenMed-PII-Arabic-ClinicDischarge-Base-110M-v1** is a transformer-based token classification model fine-tuned for **Personally Identifiable Information (PII) detection in Arabic text**. This model identifies and classifies **54 types of sensitive information** including names, addresses, social security numbers, medical record numbers, and more.
61
+
62
+ ### Key Features
63
+
64
+ - **Arabic-Optimized**: Specifically trained on Arabic text for optimal performance
65
+ - **High Accuracy**: Achieves strong F1 scores across diverse PII categories
66
+ - **Comprehensive Coverage**: Detects 55+ entity types spanning personal, financial, medical, and contact information
67
+ - **Privacy-Focused**: Designed for de-identification and compliance with GDPR and other privacy regulations
68
+ - **Production-Ready**: Optimized for real-world text processing pipelines
69
+
70
+ ## Performance
71
+
72
+ Evaluated on the Arabic test split (AI4Privacy + synthetic data):
73
+
74
+ | Metric | Score |
75
+ |:---|:---:|
76
+ | **Micro F1** | **0.8833** |
77
+ | Precision | 0.8746 |
78
+ | Recall | 0.8922 |
79
+ | Macro F1 | 0.6395 |
80
+ | Weighted F1 | 0.8779 |
81
+ | Accuracy | 0.9161 |
82
+
83
+ ### Top 10 Arabic PII Models
84
+
85
+ | Rank | Model | F1 | Precision | Recall |
86
+ |:---:|:---|:---:|:---:|:---:|
87
+ | 1 | [OpenMed-PII-Arabic-SnowflakeMed-Large-568M-v1](https://huggingface.co/OpenMed/OpenMed-PII-Arabic-SnowflakeMed-Large-568M-v1) | 0.8976 | 0.8909 | 0.9045 |
88
+ | 2 | [OpenMed-PII-Arabic-BigMed-Large-560M-v1](https://huggingface.co/OpenMed/OpenMed-PII-Arabic-BigMed-Large-560M-v1) | 0.8965 | 0.8898 | 0.9034 |
89
+ | 3 | [OpenMed-PII-Arabic-ClinicalBGE-Large-568M-v1](https://huggingface.co/OpenMed/OpenMed-PII-Arabic-ClinicalBGE-Large-568M-v1) | 0.8962 | 0.8881 | 0.9043 |
90
+ | 4 | [OpenMed-PII-Arabic-NomicMed-Large-395M-v1](https://huggingface.co/OpenMed/OpenMed-PII-Arabic-NomicMed-Large-395M-v1) | 0.8945 | 0.8920 | 0.8970 |
91
+ | 5 | [OpenMed-PII-Arabic-BigMed-Large-278M-v1](https://huggingface.co/OpenMed/OpenMed-PII-Arabic-BigMed-Large-278M-v1) | 0.8942 | 0.8873 | 0.9013 |
92
+ | 6 | [OpenMed-PII-Arabic-SuperClinical-Large-434M-v1](https://huggingface.co/OpenMed/OpenMed-PII-Arabic-SuperClinical-Large-434M-v1) | 0.8940 | 0.8858 | 0.9024 |
93
+ | 7 | [OpenMed-PII-Arabic-BioClinicalModern-Large-395M-v1](https://huggingface.co/OpenMed/OpenMed-PII-Arabic-BioClinicalModern-Large-395M-v1) | 0.8932 | 0.8899 | 0.8966 |
94
+ | 8 | [OpenMed-PII-Arabic-ModernMed-Large-395M-v1](https://huggingface.co/OpenMed/OpenMed-PII-Arabic-ModernMed-Large-395M-v1) | 0.8928 | 0.8894 | 0.8962 |
95
+ | 9 | [OpenMed-PII-Arabic-mSuperClinical-Large-279M-v1](https://huggingface.co/OpenMed/OpenMed-PII-Arabic-mSuperClinical-Large-279M-v1) | 0.8926 | 0.8813 | 0.9042 |
96
+ | 10 | [OpenMed-PII-Arabic-SuperMedical-Large-355M-v1](https://huggingface.co/OpenMed/OpenMed-PII-Arabic-SuperMedical-Large-355M-v1) | 0.8918 | 0.8854 | 0.8983 |
97
+
98
+ ## Supported Entity Types
99
+
100
+ This model detects **54 PII entity types** organized into categories:
101
+
102
+ <details>
103
+ <summary><strong>Identifiers</strong> (22 types)</summary>
104
+
105
+ | Entity | Description |
106
+ |:---|:---|
107
+ | `ACCOUNTNAME` | Accountname |
108
+ | `BANKACCOUNT` | Bankaccount |
109
+ | `BIC` | Bic |
110
+ | `BITCOINADDRESS` | Bitcoinaddress |
111
+ | `CREDITCARD` | Creditcard |
112
+ | `CREDITCARDISSUER` | Creditcardissuer |
113
+ | `CVV` | Cvv |
114
+ | `ETHEREUMADDRESS` | Ethereumaddress |
115
+ | `IBAN` | Iban |
116
+ | `IMEI` | Imei |
117
+ | ... | *and 12 more* |
118
+
119
+ </details>
120
+
121
+ <details>
122
+ <summary><strong>Personal Info</strong> (11 types)</summary>
123
+
124
+ | Entity | Description |
125
+ |:---|:---|
126
+ | `AGE` | Age |
127
+ | `DATEOFBIRTH` | Dateofbirth |
128
+ | `EYECOLOR` | Eyecolor |
129
+ | `FIRSTNAME` | Firstname |
130
+ | `GENDER` | Gender |
131
+ | `HEIGHT` | Height |
132
+ | `LASTNAME` | Lastname |
133
+ | `MIDDLENAME` | Middlename |
134
+ | `OCCUPATION` | Occupation |
135
+ | `PREFIX` | Prefix |
136
+ | ... | *and 1 more* |
137
+
138
+ </details>
139
+
140
+ <details>
141
+ <summary><strong>Contact Info</strong> (2 types)</summary>
142
+
143
+ | Entity | Description |
144
+ |:---|:---|
145
+ | `EMAIL` | Email |
146
+ | `PHONE` | Phone |
147
+
148
+ </details>
149
+
150
+ <details>
151
+ <summary><strong>Location</strong> (9 types)</summary>
152
+
153
+ | Entity | Description |
154
+ |:---|:---|
155
+ | `BUILDINGNUMBER` | Buildingnumber |
156
+ | `CITY` | City |
157
+ | `COUNTY` | County |
158
+ | `GPSCOORDINATES` | Gpscoordinates |
159
+ | `ORDINALDIRECTION` | Ordinaldirection |
160
+ | `SECONDARYADDRESS` | Secondaryaddress |
161
+ | `STATE` | State |
162
+ | `STREET` | Street |
163
+ | `ZIPCODE` | Zipcode |
164
+
165
+ </details>
166
+
167
+ <details>
168
+ <summary><strong>Organization</strong> (3 types)</summary>
169
+
170
+ | Entity | Description |
171
+ |:---|:---|
172
+ | `JOBDEPARTMENT` | Jobdepartment |
173
+ | `JOBTITLE` | Jobtitle |
174
+ | `ORGANIZATION` | Organization |
175
+
176
+ </details>
177
+
178
+ <details>
179
+ <summary><strong>Financial</strong> (5 types)</summary>
180
+
181
+ | Entity | Description |
182
+ |:---|:---|
183
+ | `AMOUNT` | Amount |
184
+ | `CURRENCY` | Currency |
185
+ | `CURRENCYCODE` | Currencycode |
186
+ | `CURRENCYNAME` | Currencyname |
187
+ | `CURRENCYSYMBOL` | Currencysymbol |
188
+
189
+ </details>
190
+
191
+ <details>
192
+ <summary><strong>Temporal</strong> (2 types)</summary>
193
+
194
+ | Entity | Description |
195
+ |:---|:---|
196
+ | `DATE` | Date |
197
+ | `TIME` | Time |
198
+
199
+ </details>
200
+
201
+ ## Usage
202
+
203
+ ### Quick Start
204
+
205
+ ```python
206
+ from transformers import pipeline
207
+
208
+ # Load the PII detection pipeline
209
+ ner = pipeline("ner", model="OpenMed/OpenMed-PII-Arabic-ClinicDischarge-Base-110M-v1", aggregation_strategy="simple")
210
+
211
+ text = """
212
+ المريض خالد العتيبي (تاريخ الميلاد: 15/03/1985، رقم الهوية: 9876543210) تم فحصه اليوم.
213
+ التواصل: khaled.otaibi@email.sa، الهاتف: +966 50 123 4567.
214
+ العنوان: شارع العليا 42، الرياض 11432.
215
+ """
216
+
217
+ entities = ner(text)
218
+ for entity in entities:
219
+ print(f"{entity['entity_group']}: {entity['word']} (score: {entity['score']:.3f})")
220
+ ```
221
+
222
+ ### De-identification Example
223
+
224
+ ```python
225
+ def redact_pii(text, entities, placeholder='[REDACTED]'):
226
+ """Replace detected PII with placeholders."""
227
+ # Sort entities by start position (descending) to preserve offsets
228
+ sorted_entities = sorted(entities, key=lambda x: x['start'], reverse=True)
229
+ redacted = text
230
+ for ent in sorted_entities:
231
+ redacted = redacted[:ent['start']] + f"[{ent['entity_group']}]" + redacted[ent['end']:]
232
+ return redacted
233
+
234
+ # Apply de-identification
235
+ redacted_text = redact_pii(text, entities)
236
+ print(redacted_text)
237
+ ```
238
+
239
+ ### Batch Processing
240
+
241
+ ```python
242
+ from transformers import AutoModelForTokenClassification, AutoTokenizer
243
+ import torch
244
+
245
+ model_name = "OpenMed/OpenMed-PII-Arabic-ClinicDischarge-Base-110M-v1"
246
+ model = AutoModelForTokenClassification.from_pretrained(model_name)
247
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
248
+
249
+ texts = [
250
+ "المريض خالد العتيبي (تاريخ الميلاد: 15/03/1985، رقم الهوية: 9876543210) تم فحصه اليوم.",
251
+ "التواصل: khaled.otaibi@email.sa، الهاتف: +966 50 123 4567.",
252
+ ]
253
+
254
+ inputs = tokenizer(texts, return_tensors='pt', padding=True, truncation=True)
255
+ with torch.no_grad():
256
+ outputs = model(**inputs)
257
+ predictions = torch.argmax(outputs.logits, dim=-1)
258
+ ```
259
+
260
+ ## Training Details
261
+
262
+ ### Dataset
263
+
264
+ This model was trained on a combination of:
265
+
266
+ - **[AI4Privacy PII Masking 200K](https://huggingface.co/datasets/ai4privacy/pii-masking-200k)**: Multilingual base dataset (200K records across 8 languages)
267
+ - **[NVIDIA Nemotron-PII](https://huggingface.co/datasets/nvidia/Nemotron-PII)**: Seed dataset for synthetic data generation
268
+ - **Synthetic Arabic Data**: ~25K high-quality samples generated with locale-specific formatting (National ID format, +966 phones, Arabic names, SAR/ر.س currency)
269
+
270
+ - **Format**: BIO-tagged token classification
271
+ - **Labels**: 76 BIO tags (54 entity types)
272
+
273
+ ### Training Configuration
274
+
275
+ - **Max Sequence Length**: 512 tokens
276
+ - **Framework**: Hugging Face Transformers + Trainer API
277
+
278
+ ## Intended Use & Limitations
279
+
280
+ ### Intended Use
281
+
282
+ - **De-identification**: Automated redaction of PII in Arabic clinical notes, medical records, and documents
283
+ - **Compliance**: Supporting GDPR, and other privacy regulation compliance
284
+ - **Data Preprocessing**: Preparing datasets for research by removing sensitive information
285
+ - **Audit Support**: Identifying PII in document collections
286
+
287
+ ### Limitations
288
+
289
+ **Important**: This model is intended as an **assistive tool**, not a replacement for human review.
290
+
291
+ - **False Negatives**: Some PII may not be detected; always verify critical applications
292
+ - **Context Sensitivity**: Performance may vary with domain-specific terminology
293
+ - **Language**: Optimized for Arabic text; may not perform well on other languages
294
+
295
+ ## Citation
296
+
297
+ ```bibtex
298
+ @misc{openmed-pii-2026,
299
+ title = {OpenMed-PII-Arabic-ClinicDischarge-Base-110M-v1: Arabic PII Detection Model},
300
+ author = {OpenMed Science},
301
+ year = {2026},
302
+ publisher = {Hugging Face},
303
+ url = {https://huggingface.co/OpenMed/OpenMed-PII-Arabic-ClinicDischarge-Base-110M-v1}
304
+ }
305
+ ```
306
+
307
+ ## Links
308
+
309
+ - **Organization**: [OpenMed](https://huggingface.co/OpenMed)
all_results.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "eval_accuracy": 0.9236629353233831,
4
+ "eval_f1": 0.8919790546866873,
5
+ "eval_loss": 0.46898552775382996,
6
+ "eval_macro_f1": 0.6290302907192191,
7
+ "eval_precision": 0.8856828042145858,
8
+ "eval_recall": 0.8983654652137468,
9
+ "eval_runtime": 1.4535,
10
+ "eval_samples_per_second": 2064.005,
11
+ "eval_steps_per_second": 32.336,
12
+ "eval_weighted_f1": 0.8857407368679008,
13
+ "test_accuracy": 0.9160631789237108,
14
+ "test_f1": 0.8832929782082325,
15
+ "test_loss": 0.5109255313873291,
16
+ "test_macro_f1": 0.6395460064050418,
17
+ "test_precision": 0.8745804507158025,
18
+ "test_recall": 0.8921808399133534,
19
+ "test_runtime": 1.5424,
20
+ "test_samples_per_second": 1944.989,
21
+ "test_steps_per_second": 30.471,
22
+ "test_weighted_f1": 0.8778663255222474,
23
+ "total_flos": 1997675486511104.0,
24
+ "train_loss": 1.7540530310736762,
25
+ "train_runtime": 129.5263,
26
+ "train_samples_per_second": 555.872,
27
+ "train_steps_per_second": 8.685
28
+ }
classification_report.txt ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Classification Report for Turkish PII Detection
2
+ Model: emilyalsentzer/Bio_Discharge_Summary_BERT
3
+ ============================================================
4
+
5
+ precision recall f1-score support
6
+
7
+ ACCOUNTNAME 0.78 0.88 0.83 260
8
+ AGE 0.85 0.85 0.85 264
9
+ AMOUNT 0.57 0.68 0.62 780
10
+ BANKACCOUNT 0.00 0.00 0.00 10
11
+ BIC 0.86 0.88 0.87 42
12
+ BITCOINADDRESS 0.94 0.97 0.95 63
13
+ BUILDINGNUMBER 0.44 0.81 0.57 77
14
+ CITY 0.70 0.86 0.77 219
15
+ COUNTY 0.46 0.33 0.39 18
16
+ CREDITCARD 0.92 0.92 0.92 166
17
+ CREDITCARDISSUER 0.62 0.38 0.48 13
18
+ CURRENCY 0.17 0.02 0.04 133
19
+ CURRENCYCODE 0.44 0.74 0.55 62
20
+ CURRENCYNAME 0.00 0.00 0.00 8
21
+ CURRENCYSYMBOL 0.75 0.26 0.39 57
22
+ CVV 0.88 0.88 0.88 56
23
+ DATE 0.90 0.90 0.90 582
24
+ DATEOFBIRTH 0.90 0.94 0.92 263
25
+ EMAIL 0.92 0.96 0.94 139
26
+ EYECOLOR 0.80 0.89 0.84 18
27
+ FIRSTNAME 0.97 0.97 0.97 2620
28
+ GENDER 0.61 0.73 0.67 15
29
+ GPSCOORDINATES 0.90 0.96 0.93 27
30
+ HEIGHT 0.61 0.54 0.57 26
31
+ IBAN 0.98 0.98 0.98 1585
32
+ IMEI 0.90 0.95 0.92 19
33
+ IPADDRESS 0.97 0.97 0.97 37
34
+ JOBDEPARTMENT 0.75 0.83 0.79 140
35
+ JOBTITLE 0.31 0.21 0.25 104
36
+ LASTNAME 0.98 0.98 0.98 2593
37
+ MACADDRESS 1.00 1.00 1.00 33
38
+ MASKEDNUMBER 0.28 0.41 0.33 22
39
+ MIDDLENAME 0.34 0.31 0.33 42
40
+ OCCUPATION 0.00 0.00 0.00 50
41
+ ORDINALDIRECTION 0.00 0.00 0.00 15
42
+ ORGANIZATION 0.53 0.55 0.54 227
43
+ PASSWORD 0.73 0.93 0.82 29
44
+ PHONE 0.99 0.98 0.99 619
45
+ PIN 0.83 0.73 0.77 33
46
+ PREFIX 0.93 0.97 0.95 1581
47
+ SECONDARYADDRESS 0.00 0.00 0.00 14
48
+ SEX 0.00 0.00 0.00 1
49
+ SSN 0.69 0.78 0.73 630
50
+ STATE 0.00 0.00 0.00 13
51
+ STREET 0.46 0.48 0.47 132
52
+ TIME 0.80 0.96 0.88 308
53
+ URL 0.91 0.87 0.89 23
54
+ USERNAME 0.84 0.32 0.46 50
55
+ VIN 0.81 1.00 0.89 17
56
+ VRM 0.98 0.87 0.92 46
57
+ ZIPCODE 0.83 0.97 0.89 30
58
+
59
+ micro avg 0.87 0.89 0.88 14311
60
+ macro avg 0.64 0.66 0.64 14311
61
+ weighted avg 0.87 0.89 0.88 14311
config.json ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_cross_attention": false,
3
+ "architectures": [
4
+ "BertForTokenClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": null,
8
+ "classifier_dropout": null,
9
+ "dtype": "float32",
10
+ "eos_token_id": null,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 768,
14
+ "id2label": {
15
+ "0": "O",
16
+ "1": "B-ACCOUNTNAME",
17
+ "2": "B-AGE",
18
+ "3": "B-AMOUNT",
19
+ "4": "B-BANKACCOUNT",
20
+ "5": "B-BIC",
21
+ "6": "B-BITCOINADDRESS",
22
+ "7": "B-BUILDINGNUMBER",
23
+ "8": "B-CITY",
24
+ "9": "B-COUNTY",
25
+ "10": "B-CREDITCARD",
26
+ "11": "B-CREDITCARDISSUER",
27
+ "12": "B-CURRENCY",
28
+ "13": "B-CURRENCYCODE",
29
+ "14": "B-CURRENCYNAME",
30
+ "15": "B-CURRENCYSYMBOL",
31
+ "16": "B-CVV",
32
+ "17": "B-DATE",
33
+ "18": "B-DATEOFBIRTH",
34
+ "19": "B-EMAIL",
35
+ "20": "B-ETHEREUMADDRESS",
36
+ "21": "B-EYECOLOR",
37
+ "22": "B-FIRSTNAME",
38
+ "23": "B-GENDER",
39
+ "24": "B-GPSCOORDINATES",
40
+ "25": "B-HEIGHT",
41
+ "26": "B-IBAN",
42
+ "27": "B-IMEI",
43
+ "28": "B-IPADDRESS",
44
+ "29": "B-JOBDEPARTMENT",
45
+ "30": "B-JOBTITLE",
46
+ "31": "B-LASTNAME",
47
+ "32": "B-LITECOINADDRESS",
48
+ "33": "B-MACADDRESS",
49
+ "34": "B-MASKEDNUMBER",
50
+ "35": "B-MIDDLENAME",
51
+ "36": "B-OCCUPATION",
52
+ "37": "B-ORDINALDIRECTION",
53
+ "38": "B-ORGANIZATION",
54
+ "39": "B-PASSWORD",
55
+ "40": "B-PHONE",
56
+ "41": "B-PIN",
57
+ "42": "B-PREFIX",
58
+ "43": "B-SECONDARYADDRESS",
59
+ "44": "B-SEX",
60
+ "45": "B-SSN",
61
+ "46": "B-STATE",
62
+ "47": "B-STREET",
63
+ "48": "B-TIME",
64
+ "49": "B-URL",
65
+ "50": "B-USERAGENT",
66
+ "51": "B-USERNAME",
67
+ "52": "B-VIN",
68
+ "53": "B-VRM",
69
+ "54": "B-ZIPCODE",
70
+ "55": "I-ACCOUNTNAME",
71
+ "56": "I-AGE",
72
+ "57": "I-AMOUNT",
73
+ "58": "I-CITY",
74
+ "59": "I-COUNTY",
75
+ "60": "I-CURRENCY",
76
+ "61": "I-CURRENCYNAME",
77
+ "62": "I-DATE",
78
+ "63": "I-DATEOFBIRTH",
79
+ "64": "I-EYECOLOR",
80
+ "65": "I-GENDER",
81
+ "66": "I-HEIGHT",
82
+ "67": "I-JOBTITLE",
83
+ "68": "I-ORGANIZATION",
84
+ "69": "I-PHONE",
85
+ "70": "I-SECONDARYADDRESS",
86
+ "71": "I-SSN",
87
+ "72": "I-STATE",
88
+ "73": "I-STREET",
89
+ "74": "I-TIME",
90
+ "75": "I-USERAGENT"
91
+ },
92
+ "initializer_range": 0.02,
93
+ "intermediate_size": 3072,
94
+ "is_decoder": false,
95
+ "label2id": {
96
+ "B-ACCOUNTNAME": 1,
97
+ "B-AGE": 2,
98
+ "B-AMOUNT": 3,
99
+ "B-BANKACCOUNT": 4,
100
+ "B-BIC": 5,
101
+ "B-BITCOINADDRESS": 6,
102
+ "B-BUILDINGNUMBER": 7,
103
+ "B-CITY": 8,
104
+ "B-COUNTY": 9,
105
+ "B-CREDITCARD": 10,
106
+ "B-CREDITCARDISSUER": 11,
107
+ "B-CURRENCY": 12,
108
+ "B-CURRENCYCODE": 13,
109
+ "B-CURRENCYNAME": 14,
110
+ "B-CURRENCYSYMBOL": 15,
111
+ "B-CVV": 16,
112
+ "B-DATE": 17,
113
+ "B-DATEOFBIRTH": 18,
114
+ "B-EMAIL": 19,
115
+ "B-ETHEREUMADDRESS": 20,
116
+ "B-EYECOLOR": 21,
117
+ "B-FIRSTNAME": 22,
118
+ "B-GENDER": 23,
119
+ "B-GPSCOORDINATES": 24,
120
+ "B-HEIGHT": 25,
121
+ "B-IBAN": 26,
122
+ "B-IMEI": 27,
123
+ "B-IPADDRESS": 28,
124
+ "B-JOBDEPARTMENT": 29,
125
+ "B-JOBTITLE": 30,
126
+ "B-LASTNAME": 31,
127
+ "B-LITECOINADDRESS": 32,
128
+ "B-MACADDRESS": 33,
129
+ "B-MASKEDNUMBER": 34,
130
+ "B-MIDDLENAME": 35,
131
+ "B-OCCUPATION": 36,
132
+ "B-ORDINALDIRECTION": 37,
133
+ "B-ORGANIZATION": 38,
134
+ "B-PASSWORD": 39,
135
+ "B-PHONE": 40,
136
+ "B-PIN": 41,
137
+ "B-PREFIX": 42,
138
+ "B-SECONDARYADDRESS": 43,
139
+ "B-SEX": 44,
140
+ "B-SSN": 45,
141
+ "B-STATE": 46,
142
+ "B-STREET": 47,
143
+ "B-TIME": 48,
144
+ "B-URL": 49,
145
+ "B-USERAGENT": 50,
146
+ "B-USERNAME": 51,
147
+ "B-VIN": 52,
148
+ "B-VRM": 53,
149
+ "B-ZIPCODE": 54,
150
+ "I-ACCOUNTNAME": 55,
151
+ "I-AGE": 56,
152
+ "I-AMOUNT": 57,
153
+ "I-CITY": 58,
154
+ "I-COUNTY": 59,
155
+ "I-CURRENCY": 60,
156
+ "I-CURRENCYNAME": 61,
157
+ "I-DATE": 62,
158
+ "I-DATEOFBIRTH": 63,
159
+ "I-EYECOLOR": 64,
160
+ "I-GENDER": 65,
161
+ "I-HEIGHT": 66,
162
+ "I-JOBTITLE": 67,
163
+ "I-ORGANIZATION": 68,
164
+ "I-PHONE": 69,
165
+ "I-SECONDARYADDRESS": 70,
166
+ "I-SSN": 71,
167
+ "I-STATE": 72,
168
+ "I-STREET": 73,
169
+ "I-TIME": 74,
170
+ "I-USERAGENT": 75,
171
+ "O": 0
172
+ },
173
+ "layer_norm_eps": 1e-12,
174
+ "max_position_embeddings": 512,
175
+ "model_type": "bert",
176
+ "num_attention_heads": 12,
177
+ "num_hidden_layers": 12,
178
+ "pad_token_id": 0,
179
+ "tie_word_embeddings": true,
180
+ "transformers_version": "5.8.1",
181
+ "type_vocab_size": 2,
182
+ "use_cache": false,
183
+ "vocab_size": 28996
184
+ }
eval_results.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "eval_accuracy": 0.9236629353233831,
4
+ "eval_f1": 0.8919790546866873,
5
+ "eval_loss": 0.46898552775382996,
6
+ "eval_macro_f1": 0.6290302907192191,
7
+ "eval_precision": 0.8856828042145858,
8
+ "eval_recall": 0.8983654652137468,
9
+ "eval_runtime": 1.4535,
10
+ "eval_samples_per_second": 2064.005,
11
+ "eval_steps_per_second": 32.336,
12
+ "eval_weighted_f1": 0.8857407368679008
13
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:19caa7be86f107099f4d5e0ee98c5efe2f56792c1a90e4892d67dc9bdc4f0a48
3
+ size 431135832
test_results.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "test_accuracy": 0.9160631789237108,
3
+ "test_f1": 0.8832929782082325,
4
+ "test_loss": 0.5109255313873291,
5
+ "test_macro_f1": 0.6395460064050418,
6
+ "test_precision": 0.8745804507158025,
7
+ "test_recall": 0.8921808399133534,
8
+ "test_runtime": 1.5424,
9
+ "test_samples_per_second": 1944.989,
10
+ "test_steps_per_second": 30.471,
11
+ "test_weighted_f1": 0.8778663255222474
12
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "cls_token": "[CLS]",
4
+ "do_lower_case": true,
5
+ "is_local": false,
6
+ "local_files_only": false,
7
+ "mask_token": "[MASK]",
8
+ "model_max_length": 1000000000000000019884624838656,
9
+ "pad_token": "[PAD]",
10
+ "sep_token": "[SEP]",
11
+ "strip_accents": null,
12
+ "tokenize_chinese_chars": true,
13
+ "tokenizer_class": "BertTokenizer",
14
+ "unk_token": "[UNK]"
15
+ }
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "total_flos": 1997675486511104.0,
4
+ "train_loss": 1.7540530310736762,
5
+ "train_runtime": 129.5263,
6
+ "train_samples_per_second": 555.872,
7
+ "train_steps_per_second": 8.685
8
+ }