Aegis

A privacy-filter model for detecting and redacting personally identifiable information (PII) in Urdu text across legal, financial, healthcare, government, and other domains. The model is fine-tuned from openai/privacy-filter on mahwizzzz/uopf-sipar, a 100K Urdu dataset spanning twelve domains.

The model performs span level detection of names, phone numbers, email addresses, addresses, dates, and account/CNIC-style identifiers in Urdu text.

Training Dataset

The model was trained on mahwizzzz/uopf-sipar, a Urdu dataset for OPF style privacy span detection.

Split Records
Train 80,000
Validation 10,000
Test 10,000

Domain Distribution (Train)

Domain Records
legal 21,986
finance 13,850
telecom 6,315
healthcare 5,410
travel 4,876
social_media 4,845
news_channel 4,818
government 3,965
ecommerce 3,923
insurance 3,382
education 3,319
hr_jobs 3,311

Evaluation

The model was evaluated on a held out test split with character level PII spans. The primary comparison is between the original base model, openai/privacy-filter, and this fine-tuned checkpoint.

The headline metric is same label overlap span F1. This metric counts a prediction as correct when it overlaps the gold span and has the correct entity label. It is more appropriate for redaction-oriented systems than exact character matching, because small boundary differences usually do not prevent a sensitive region from being detected.

Exact span F1 is also reported. It requires the predicted label, start offset, and end offset to match the gold annotation exactly.

Base vs Fine-tuned Model

Metric Base openai/privacy-filter Fine-tuned model Absolute Gain
Overlap Detection F1 0.517 0.957 +0.440
Overlap Precision 0.497 0.997 +0.500
Overlap Recall 0.538 0.920 +0.382
Macro F1 0.468 0.931 +0.463
Exact Span F1 0.021 0.406 +0.385

Per-Entity Overlap F1

Entity Base F1 Fine-tuned F1 Absolute Gain
private_person 0.509 0.966 +0.457
private_phone 0.386 0.755 +0.369
private_email 0.646 0.999 +0.353
private_address 0.015 0.986 +0.971
private_date 0.657 0.989 +0.332
account_number 0.597 0.893 +0.296

Citation

If you use this model in research or production, please cite:

@misc{mahwiz2026urdu_privacy_filter,
  title        = {Aegis},
  author       = {Mahwiz Khalil},
  year         = {2026},
  howpublished = {Hugging Face Model Hub},
  url          = {https://huggingface.co/mahwizzzz/aegis}
}

License

Apache 2.0. See LICENSE for details.

Downloads last month
27
Safetensors
Model size
1B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for mahwizzzz/aegis

Quantized
(7)
this model

Space using mahwizzzz/aegis 1