Token Classification
Transformers
ONNX
Safetensors
Transformers.js
modernbert
pii
pii-detection
redaction
anonymization
privacy
secrets-detection
data-masking
ner
presidio
mmbert
Instructions to use Horizon-Labs/pii-redactor-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Horizon-Labs/pii-redactor-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="Horizon-Labs/pii-redactor-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("Horizon-Labs/pii-redactor-base") model = AutoModelForTokenClassification.from_pretrained("Horizon-Labs/pii-redactor-base", device_map="auto") - Transformers.js
How to use Horizon-Labs/pii-redactor-base with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('token-classification', 'Horizon-Labs/pii-redactor-base'); - Notebooks
- Google Colab
- Kaggle
Card: third-party Arabic, French, Korean and Turkish PII benchmarks
Browse files
README.md
CHANGED
|
@@ -196,6 +196,27 @@ This base model is still v1.0. We trained a v1.1 with extra payment and bank sni
|
|
| 196 |
but it lowered this model's external mean redaction F1 (0.683 and 0.666 over two seeds vs 0.694), so we kept v1.0. If
|
| 197 |
card expiry dates and CVVs matter for you, pii-redactor-small v1.1 handles them better.
|
| 198 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 199 |
### In-distribution held-out sets
|
| 200 |
|
| 201 |
These come from the same generators as the training data, so they overstate real-world quality.
|
|
|
|
| 196 |
but it lowered this model's external mean redaction F1 (0.683 and 0.666 over two seeds vs 0.694), so we kept v1.0. If
|
| 197 |
card expiry dates and CVVs matter for you, pii-redactor-small v1.1 handles them better.
|
| 198 |
|
| 199 |
+
### Third-party multilingual benchmarks (checked October 2026)
|
| 200 |
+
|
| 201 |
+
Four public PII benchmarks released after this model was trained, never used for training or tuning:
|
| 202 |
+
[Bayanat-Labs/arabic-pii-eval](https://huggingface.co/datasets/Bayanat-Labs/arabic-pii-eval) (1,000 Arabic texts, several dialects),
|
| 203 |
+
[JaqueBill/fr-pii-bench](https://huggingface.co/datasets/JaqueBill/fr-pii-bench) (300 French documents),
|
| 204 |
+
[1T/veil-pii-ko-stress](https://huggingface.co/datasets/1T/veil-pii-ko-stress) (KDPII Korean dialogue test, 1,000 sampled) and
|
| 205 |
+
[newmindai/nm-kvkk-pii-6K](https://huggingface.co/datasets/newmindai/nm-kvkk-pii-6K) (602 Turkish documents). Same label-agnostic redaction
|
| 206 |
+
metric as above (`code/pii/evaluate_pii.py`); direct identifiers must be redacted, while company names, dates (Korean), job titles and
|
| 207 |
+
medical fields (Turkish) count as optional.
|
| 208 |
+
|
| 209 |
+
| model | mean redaction F1 | Arabic F1 (recall / precision) | French F1 (recall / precision) | Korean F1 (recall / precision) | Turkish F1 (recall / precision) |
|
| 210 |
+
|---|---|---|---|---|---|
|
| 211 |
+
| **Horizon-Labs/pii-redactor-base (v1.0)** | 0.898 | 0.917 (0.92 / 0.91) | 0.905 (0.91 / 0.90) | 0.917 (0.90 / 0.93) | 0.851 (0.85 / 0.85) |
|
| 212 |
+
| **Horizon-Labs/pii-redactor-small (v1.1)** | 0.883 | 0.891 (0.88 / 0.91) | 0.897 (0.88 / 0.92) | 0.874 (0.86 / 0.89) | 0.869 (0.86 / 0.88) |
|
| 213 |
+
| [openai/privacy-filter](https://huggingface.co/openai/privacy-filter) | 0.787 | 0.859 (0.90 / 0.83) | 0.871 (0.94 / 0.81) | 0.748 (0.70 / 0.80) | 0.667 (0.60 / 0.76) |
|
| 214 |
+
| [OpenMed/OpenMed-PII-SuperClinical-Small-44M-v1](https://huggingface.co/OpenMed/OpenMed-PII-SuperClinical-Small-44M-v1) | 0.761 | 0.688 (0.71 / 0.67) | 0.882 (0.90 / 0.86) | 0.825 (0.92 / 0.75) | 0.650 (0.56 / 0.78) |
|
| 215 |
+
| [iiiorg/piiranha-v1-detect-personal-information](https://huggingface.co/iiiorg/piiranha-v1-detect-personal-information) | 0.702 | 0.649 (0.51 / 0.90) | 0.676 (0.51 / 0.98) | 0.796 (0.67 / 0.98) | 0.687 (0.53 / 0.99) |
|
| 216 |
+
| [gravitee-io/bert-small-pii-detection](https://huggingface.co/gravitee-io/bert-small-pii-detection) | 0.491 | 0.559 (0.92 / 0.40) | 0.863 (0.84 / 0.89) | 0.351 (0.86 / 0.22) | 0.189 (0.35 / 0.13) |
|
| 217 |
+
|
| 218 |
+
- This model has the highest mean redaction F1 of the models tested.
|
| 219 |
+
|
| 220 |
### In-distribution held-out sets
|
| 221 |
|
| 222 |
These come from the same generators as the training data, so they overstate real-world quality.
|