Instructions to use daslabhq/pii-proxy with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER
How to use daslabhq/pii-proxy with GLiNER:
from gliner import GLiNER model = GLiNER.from_pretrained("daslabhq/pii-proxy") text = "Cristiano Ronaldo dos Santos Aveiro was born on 5 February 1985 in Funchal, Madeira, Portugal." labels = ["person", "date", "location"] entities = model.predict_entities(text, labels) for entity in entities: print(entity["text"], "=>", entity["label"]) - Notebooks
- Google Colab
- Kaggle
|
Download README.md from daslabhq/pii-proxy: direct link, hf CLI and curl.
- Browser
- Download file 1.18 kB
-
https://huggingface.co/daslabhq/pii-proxy/resolve/main/README.md
- Command line
-
hf download hf://daslabhq/pii-proxy/README.md
-
curl -L -o README.md https://huggingface.co/daslabhq/pii-proxy/resolve/main/README.md
1.18 kB
metadata
license: apache-2.0
base_model: urchade/gliner_small-v2.1
library_name: gliner
pipeline_tag: token-classification
tags:
- gliner
- token-classification
- pii
- ner
pii-proxy
A GLiNER model fine-tuned for PII detection. GLiNER does zero-shot NER over arbitrary labels — you pass the entity types you care about at inference time, so there is no fixed label schema to work around.
Fine-tuned from urchade/gliner_small-v2.1 on the full Nemotron-PII dataset (~100k).
Results
Held-out test set (100 examples), 24 fine-grained PII labels:
| Metric | F1 |
|---|---|
| Fine-grained | 92.8% |
| Coarse-grained | 94.4% |
NVIDIA's Nemotron-PII reference: fine 96.2%, coarse 96.7%.
Usage
from gliner import GLiNER
model = GLiNER.from_pretrained("daslabhq/pii-proxy")
labels = ["first_name", "last_name", "email", "phone_number", "ssn", "street_address"]
entities = model.predict_entities("Patient Marcus Weber, marcus.weber@gmail.com", labels)
for e in entities:
print(e["text"], "->", e["label"])
Training
- Base model:
urchade/gliner_small-v2.1 - Epochs: 5, batch size 16
- Train examples: 98215
- Focal loss (alpha 0.75, gamma 2)