Token Classification
Transformers
Safetensors
modernbert
pii
pii-redaction
privacy
ner
secrets-detection
multilingual
from-scratch
kava-privacy
Eval Results (legacy)
Instructions to use KvcHub/Kava-Privacy-30M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KvcHub/Kava-Privacy-30M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="KvcHub/Kava-Privacy-30M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("KvcHub/Kava-Privacy-30M") model = AutoModelForTokenClassification.from_pretrained("KvcHub/Kava-Privacy-30M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download eval_results.json from KvcHub/Kava-Privacy-30M: direct link, hf CLI and curl.
- Browser
- Download file 13.6 kB
-
https://huggingface.co/KvcHub/Kava-Privacy-30M/resolve/main/eval_results.json
- Command line
-
hf download hf://KvcHub/Kava-Privacy-30M/eval_results.json
-
curl -L -o eval_results.json https://huggingface.co/KvcHub/Kava-Privacy-30M/resolve/main/eval_results.json
13.6 kB
| { | |
| "model": "KvcHub/Kava-Privacy-30M", | |
| "trained_on_dataset": "KvcHub/Kava-Privacy-30M-Dataset", | |
| "num_parameters": 30457021, | |
| "overall": { | |
| "precision": 0.8952, | |
| "recall": 0.9348, | |
| "f1": 0.9146, | |
| "support": 54326, | |
| "hard_negative_docs": 605, | |
| "hard_negative_fpr": 0.0, | |
| "test_docs": 8503, | |
| "throughput_docs_per_sec": 33.3 | |
| }, | |
| "per_source": { | |
| "gretelai/synthetic_pii_finance_multilingual": { | |
| "precision": 0.6205, | |
| "recall": 0.7058, | |
| "f1": 0.6604, | |
| "support": 6921 | |
| }, | |
| "kava_synthetic_36lang": { | |
| "precision": 0.9467, | |
| "recall": 0.9724, | |
| "f1": 0.9593, | |
| "support": 37360 | |
| }, | |
| "nvidia/Nemotron-PII": { | |
| "precision": 0.9131, | |
| "recall": 0.9529, | |
| "f1": 0.9326, | |
| "support": 10045 | |
| } | |
| }, | |
| "per_entity": { | |
| "PERSON": { | |
| "precision": 0.8065, | |
| "recall": 0.8442, | |
| "f1": 0.8249, | |
| "support": 7747 | |
| }, | |
| "USERNAME": { | |
| "precision": 0.8178, | |
| "recall": 0.8245, | |
| "f1": 0.8211, | |
| "support": 1698 | |
| }, | |
| "EMAIL": { | |
| "precision": 0.9664, | |
| "recall": 0.9787, | |
| "f1": 0.9725, | |
| "support": 3759 | |
| }, | |
| "PHONE": { | |
| "precision": 0.8949, | |
| "recall": 0.9185, | |
| "f1": 0.9066, | |
| "support": 2995 | |
| }, | |
| "ADDRESS": { | |
| "precision": 0.8121, | |
| "recall": 0.9134, | |
| "f1": 0.8597, | |
| "support": 3406 | |
| }, | |
| "CITY": { | |
| "precision": 0.7468, | |
| "recall": 0.9, | |
| "f1": 0.8163, | |
| "support": 2150 | |
| }, | |
| "POSTAL_CODE": { | |
| "precision": 0.9116, | |
| "recall": 0.9755, | |
| "f1": 0.9425, | |
| "support": 1840 | |
| }, | |
| "DATE_OF_BIRTH": { | |
| "precision": 0.9798, | |
| "recall": 0.981, | |
| "f1": 0.9804, | |
| "support": 1583 | |
| }, | |
| "AGE": { | |
| "precision": 0.9762, | |
| "recall": 0.9914, | |
| "f1": 0.9837, | |
| "support": 1157 | |
| }, | |
| "NATIONAL_ID": { | |
| "precision": 0.9699, | |
| "recall": 0.9876, | |
| "f1": 0.9787, | |
| "support": 1208 | |
| }, | |
| "PASSPORT": { | |
| "precision": 0.9972, | |
| "recall": 0.9908, | |
| "f1": 0.994, | |
| "support": 1092 | |
| }, | |
| "DRIVER_LICENSE": { | |
| "precision": 0.9848, | |
| "recall": 0.9778, | |
| "f1": 0.9813, | |
| "support": 1128 | |
| }, | |
| "TAX_ID": { | |
| "precision": 0.9972, | |
| "recall": 0.9991, | |
| "f1": 0.9981, | |
| "support": 1062 | |
| }, | |
| "CREDIT_CARD": { | |
| "precision": 0.9789, | |
| "recall": 0.9768, | |
| "f1": 0.9778, | |
| "support": 948 | |
| }, | |
| "CVV_PIN": { | |
| "precision": 0.9359, | |
| "recall": 0.9458, | |
| "f1": 0.9408, | |
| "support": 941 | |
| }, | |
| "BANK_ACCOUNT": { | |
| "precision": 0.9376, | |
| "recall": 0.9807, | |
| "f1": 0.9587, | |
| "support": 1608 | |
| }, | |
| "CRYPTO_WALLET": { | |
| "precision": 1.0, | |
| "recall": 1.0, | |
| "f1": 1.0, | |
| "support": 580 | |
| }, | |
| "MEDICAL_ID": { | |
| "precision": 0.9893, | |
| "recall": 0.9952, | |
| "f1": 0.9923, | |
| "support": 840 | |
| }, | |
| "MEDICAL_INFO": { | |
| "precision": 0.8515, | |
| "recall": 0.9774, | |
| "f1": 0.9101, | |
| "support": 839 | |
| }, | |
| "IP_ADDRESS": { | |
| "precision": 0.961, | |
| "recall": 0.9867, | |
| "f1": 0.9737, | |
| "support": 1349 | |
| }, | |
| "MAC_ADDRESS": { | |
| "precision": 0.9895, | |
| "recall": 0.9958, | |
| "f1": 0.9926, | |
| "support": 949 | |
| }, | |
| "DEVICE_ID": { | |
| "precision": 0.9836, | |
| "recall": 0.9948, | |
| "f1": 0.9892, | |
| "support": 967 | |
| }, | |
| "URL_SENSITIVE": { | |
| "precision": 0.9664, | |
| "recall": 0.9759, | |
| "f1": 0.9711, | |
| "support": 1620 | |
| }, | |
| "PASSWORD": { | |
| "precision": 0.9278, | |
| "recall": 0.9579, | |
| "f1": 0.9426, | |
| "support": 926 | |
| }, | |
| "API_KEY": { | |
| "precision": 0.974, | |
| "recall": 0.9905, | |
| "f1": 0.9822, | |
| "support": 1058 | |
| }, | |
| "AUTH_TOKEN": { | |
| "precision": 0.9804, | |
| "recall": 0.9923, | |
| "f1": 0.9863, | |
| "support": 909 | |
| }, | |
| "DB_CONNECTION": { | |
| "precision": 1.0, | |
| "recall": 1.0, | |
| "f1": 1.0, | |
| "support": 670 | |
| }, | |
| "VEHICLE_ID": { | |
| "precision": 0.9804, | |
| "recall": 0.9971, | |
| "f1": 0.9887, | |
| "support": 1052 | |
| }, | |
| "ORGANIZATION": { | |
| "precision": 0.7945, | |
| "recall": 0.8621, | |
| "f1": 0.8269, | |
| "support": 5583 | |
| }, | |
| "ACCOUNT_ID": { | |
| "precision": 0.9668, | |
| "recall": 0.9835, | |
| "f1": 0.975, | |
| "support": 2662 | |
| } | |
| }, | |
| "per_language": { | |
| "en": { | |
| "precision": 0.856, | |
| "recall": 0.914, | |
| "f1": 0.8841, | |
| "support": 14545 | |
| }, | |
| "es": { | |
| "precision": 0.7898, | |
| "recall": 0.842, | |
| "f1": 0.8151, | |
| "support": 1633 | |
| }, | |
| "fr": { | |
| "precision": 0.8567, | |
| "recall": 0.9086, | |
| "f1": 0.8819, | |
| "support": 1553 | |
| }, | |
| "de": { | |
| "precision": 0.8488, | |
| "recall": 0.882, | |
| "f1": 0.8651, | |
| "support": 1687 | |
| }, | |
| "it": { | |
| "precision": 0.819, | |
| "recall": 0.8706, | |
| "f1": 0.844, | |
| "support": 1538 | |
| }, | |
| "pt": { | |
| "precision": 0.9489, | |
| "recall": 0.9657, | |
| "f1": 0.9572, | |
| "support": 1020 | |
| }, | |
| "nl": { | |
| "precision": 0.7919, | |
| "recall": 0.8263, | |
| "f1": 0.8087, | |
| "support": 1727 | |
| }, | |
| "pl": { | |
| "precision": 0.9775, | |
| "recall": 0.9877, | |
| "f1": 0.9826, | |
| "support": 1056 | |
| }, | |
| "ru": { | |
| "precision": 0.98, | |
| "recall": 0.9847, | |
| "f1": 0.9823, | |
| "support": 1044 | |
| }, | |
| "uk": { | |
| "precision": 0.9511, | |
| "recall": 0.9755, | |
| "f1": 0.9631, | |
| "support": 978 | |
| }, | |
| "tr": { | |
| "precision": 0.9761, | |
| "recall": 0.9884, | |
| "f1": 0.9822, | |
| "support": 1033 | |
| }, | |
| "ar": { | |
| "precision": 0.8863, | |
| "recall": 0.9473, | |
| "f1": 0.9158, | |
| "support": 1119 | |
| }, | |
| "he": { | |
| "precision": 0.9435, | |
| "recall": 0.9723, | |
| "f1": 0.9577, | |
| "support": 1048 | |
| }, | |
| "fa": { | |
| "precision": 0.9694, | |
| "recall": 0.9794, | |
| "f1": 0.9744, | |
| "support": 1068 | |
| }, | |
| "hi": { | |
| "precision": 0.8952, | |
| "recall": 0.9572, | |
| "f1": 0.9252, | |
| "support": 982 | |
| }, | |
| "bn": { | |
| "precision": 0.9023, | |
| "recall": 0.963, | |
| "f1": 0.9317, | |
| "support": 1055 | |
| }, | |
| "ur": { | |
| "precision": 0.963, | |
| "recall": 0.9867, | |
| "f1": 0.9747, | |
| "support": 1054 | |
| }, | |
| "ta": { | |
| "precision": 0.9523, | |
| "recall": 0.9686, | |
| "f1": 0.9604, | |
| "support": 1051 | |
| }, | |
| "zh": { | |
| "precision": 0.9647, | |
| "recall": 0.9787, | |
| "f1": 0.9717, | |
| "support": 1034 | |
| }, | |
| "zh-TW": { | |
| "precision": 0.9499, | |
| "recall": 0.9676, | |
| "f1": 0.9587, | |
| "support": 1019 | |
| }, | |
| "ja": { | |
| "precision": 0.8909, | |
| "recall": 0.9437, | |
| "f1": 0.9165, | |
| "support": 1030 | |
| }, | |
| "ko": { | |
| "precision": 0.9581, | |
| "recall": 0.9738, | |
| "f1": 0.9659, | |
| "support": 1032 | |
| }, | |
| "vi": { | |
| "precision": 0.9586, | |
| "recall": 0.9836, | |
| "f1": 0.9709, | |
| "support": 1035 | |
| }, | |
| "th": { | |
| "precision": 0.8344, | |
| "recall": 0.9165, | |
| "f1": 0.8735, | |
| "support": 1006 | |
| }, | |
| "id": { | |
| "precision": 0.9709, | |
| "recall": 0.9853, | |
| "f1": 0.978, | |
| "support": 1017 | |
| }, | |
| "ms": { | |
| "precision": 0.941, | |
| "recall": 0.9682, | |
| "f1": 0.9544, | |
| "support": 1037 | |
| }, | |
| "tl": { | |
| "precision": 0.9702, | |
| "recall": 0.9823, | |
| "f1": 0.9762, | |
| "support": 962 | |
| }, | |
| "sv": { | |
| "precision": 0.8006, | |
| "recall": 0.8195, | |
| "f1": 0.8099, | |
| "support": 1612 | |
| }, | |
| "no": { | |
| "precision": 0.9621, | |
| "recall": 0.9751, | |
| "f1": 0.9685, | |
| "support": 884 | |
| }, | |
| "da": { | |
| "precision": 0.9633, | |
| "recall": 0.9749, | |
| "f1": 0.9691, | |
| "support": 1077 | |
| }, | |
| "fi": { | |
| "precision": 0.9666, | |
| "recall": 0.9865, | |
| "f1": 0.9765, | |
| "support": 1114 | |
| }, | |
| "cs": { | |
| "precision": 0.9698, | |
| "recall": 0.9888, | |
| "f1": 0.9792, | |
| "support": 1073 | |
| }, | |
| "ro": { | |
| "precision": 0.9542, | |
| "recall": 0.9737, | |
| "f1": 0.9638, | |
| "support": 1026 | |
| }, | |
| "hu": { | |
| "precision": 0.8763, | |
| "recall": 0.9379, | |
| "f1": 0.906, | |
| "support": 1095 | |
| }, | |
| "el": { | |
| "precision": 0.8823, | |
| "recall": 0.9451, | |
| "f1": 0.9126, | |
| "support": 1039 | |
| }, | |
| "sw": { | |
| "precision": 0.9441, | |
| "recall": 0.9722, | |
| "f1": 0.958, | |
| "support": 1043 | |
| } | |
| }, | |
| "demos": [ | |
| { | |
| "tag": "en", | |
| "input": "Hi, I'm Elena Vance (DOB 1989-04-12). Email: elena.vance@proton.me, SSN 412-88-9021, API key sk-proj-9kLm2PqR8vTx4YzA7bCdEfGhIjKlMnOpQrSt.", | |
| "redacted": "Hi, I'm [PERSON] (DOB [DATE_OF_BIRTH]). Email: [EMAIL], SSN [NATIONAL_ID], API key [API_KEY].", | |
| "spans": [ | |
| { | |
| "start": 8, | |
| "end": 19, | |
| "label": "PERSON", | |
| "text": "Elena Vance", | |
| "score": 0.9797 | |
| }, | |
| { | |
| "start": 25, | |
| "end": 35, | |
| "label": "DATE_OF_BIRTH", | |
| "text": "1989-04-12", | |
| "score": 0.9818 | |
| }, | |
| { | |
| "start": 45, | |
| "end": 66, | |
| "label": "EMAIL", | |
| "text": "elena.vance@proton.me", | |
| "score": 0.981 | |
| }, | |
| { | |
| "start": 72, | |
| "end": 83, | |
| "label": "NATIONAL_ID", | |
| "text": "412-88-9021", | |
| "score": 0.9764 | |
| }, | |
| { | |
| "start": 93, | |
| "end": 137, | |
| "label": "API_KEY", | |
| "text": "sk-proj-9kLm2PqR8vTx4YzA7bCdEfGhIjKlMnOpQrSt", | |
| "score": 0.9826 | |
| } | |
| ] | |
| }, | |
| { | |
| "tag": "es", | |
| "input": "Hola, soy Mateo García, correo mateo.garcia@gmail.com, teléfono +34 612 345 678, DNI 48291034K.", | |
| "redacted": "Hola, soy [PERSON], correo [EMAIL], teléfono [PHONE], DNI [NATIONAL_ID].", | |
| "spans": [ | |
| { | |
| "start": 10, | |
| "end": 22, | |
| "label": "PERSON", | |
| "text": "Mateo García", | |
| "score": 0.9284 | |
| }, | |
| { | |
| "start": 31, | |
| "end": 53, | |
| "label": "EMAIL", | |
| "text": "mateo.garcia@gmail.com", | |
| "score": 0.9824 | |
| }, | |
| { | |
| "start": 64, | |
| "end": 79, | |
| "label": "PHONE", | |
| "text": "+34 612 345 678", | |
| "score": 0.9833 | |
| }, | |
| { | |
| "start": 85, | |
| "end": 94, | |
| "label": "NATIONAL_ID", | |
| "text": "48291034K", | |
| "score": 0.9579 | |
| } | |
| ] | |
| }, | |
| { | |
| "tag": "zh", | |
| "input": "您好,患者张伟,手机号 +86 138 0013 8000,身份证号 110101199001011234,诊断:2型糖尿病。", | |
| "redacted": "您好,患者[PERSON],手机号 [PHONE],身份证号 [NATIONAL_ID]1234,诊断:2型糖尿病。", | |
| "spans": [ | |
| { | |
| "start": 5, | |
| "end": 7, | |
| "label": "PERSON", | |
| "text": "张伟", | |
| "score": 0.9579 | |
| }, | |
| { | |
| "start": 12, | |
| "end": 29, | |
| "label": "PHONE", | |
| "text": "+86 138 0013 8000", | |
| "score": 0.9784 | |
| }, | |
| { | |
| "start": 35, | |
| "end": 49, | |
| "label": "NATIONAL_ID", | |
| "text": "11010119900101", | |
| "score": 0.7894 | |
| } | |
| ] | |
| }, | |
| { | |
| "tag": "ar", | |
| "input": "مرحباً، الاسم الكامل: عمر المنصور، البريد الإلكتروني: omar.mansour@outlook.com، رقم الهاتف: +971 501 234 5678.", | |
| "redacted": "مرحباً[CITY] الاسم الكامل: [PERSON] البريد الإلكتروني: [EMAIL] رقم الهاتف: [PHONE].", | |
| "spans": [ | |
| { | |
| "start": 6, | |
| "end": 7, | |
| "label": "CITY", | |
| "text": "،", | |
| "score": 0.577 | |
| }, | |
| { | |
| "start": 22, | |
| "end": 34, | |
| "label": "PERSON", | |
| "text": "عمر المنصور،", | |
| "score": 0.9376 | |
| }, | |
| { | |
| "start": 54, | |
| "end": 79, | |
| "label": "EMAIL", | |
| "text": "omar.mansour@outlook.com،", | |
| "score": 0.9798 | |
| }, | |
| { | |
| "start": 92, | |
| "end": 109, | |
| "label": "PHONE", | |
| "text": "+971 501 234 5678", | |
| "score": 0.9822 | |
| } | |
| ] | |
| }, | |
| { | |
| "tag": "ja", | |
| "input": "氏名: 佐藤 蓮、住所: 渋谷区道玄坂 24、メールアドレス: ren.sato@icloud.com。", | |
| "redacted": "氏名: [PERSON]、住所: [ADDRESS]、メールアドレス: [EMAIL]", | |
| "spans": [ | |
| { | |
| "start": 4, | |
| "end": 8, | |
| "label": "PERSON", | |
| "text": "佐藤 蓮", | |
| "score": 0.9838 | |
| }, | |
| { | |
| "start": 13, | |
| "end": 22, | |
| "label": "ADDRESS", | |
| "text": "渋谷区道玄坂 24", | |
| "score": 0.9795 | |
| }, | |
| { | |
| "start": 32, | |
| "end": 52, | |
| "label": "EMAIL", | |
| "text": "ren.sato@icloud.com。", | |
| "score": 0.9299 | |
| } | |
| ] | |
| }, | |
| { | |
| "tag": "hard_neg", | |
| "input": "Release v2.14.8 fixes a memory leak in the cache layer and passes 184 unit tests for SKU-90412-XL.", | |
| "redacted": "Release v2.14.8 fixes a memory leak in the cache layer and passes 184 unit tests for SKU-90412-XL.", | |
| "spans": [] | |
| } | |
| ], | |
| "training_summary": { | |
| "from_scratch": true, | |
| "wall_seconds": 7281.1, | |
| "stage1_mlm_tokens": 13853153, | |
| "stage2_ner_tokens": 20713710, | |
| "total_tokens": 34566863, | |
| "best_val_f1": 0.90493 | |
| }, | |
| "swap_check": "total = 0.00M used = 0.00M free = 0.00M (encrypted)" | |
| } |