--- license: apache-2.0 base_model: openai/privacy-filter pipeline_tag: token-classification tags: - privacy - pii - token-classification - privacy-filter - partial-ssn library_name: transformers --- # PrivacyFilterTuned PrivacyFilterTuned is a finetuned version of [openai/privacy-filter](https://huggingface.co/openai/privacy-filter). It is adapted for privacy filtering workflows where partial SSNs and related compact identifiers should be captured more consistently. The main target behavior is improved detection of account-number style spans such as: - `SSN ending 1234` - `SSN last four are 1234` - `partial SSN 1234` - nearby MRN, member ID, student ID, and similar identifier patterns The model keeps the original Privacy Filter label space. Partial SSNs are labeled as `account_number`. ## Base Model This checkpoint is based on `openai/privacy-filter`, a bidirectional token classification model for PII detection and masking. The base model detects the following span categories: - `account_number` - `private_address` - `private_date` - `private_email` - `private_person` - `private_phone` - `private_url` - `secret` ## Finetuning This checkpoint was finetuned locally on a small targeted dataset of healthcare, education, and finance-style prompts. The data focuses on partial SSNs and identifier boundary cases. ## Limitations This model is a privacy-filtering aid, not an anonymization or compliance guarantee. It may still miss sensitive spans or redact spans that should remain visible. Evaluate it on your own in-domain data before production use, and keep human review paths for high-sensitivity workflows. The finetuning set is small and targeted, so improvements are expected mainly around partial SSNs and similar compact identifiers rather than broad PII coverage. ## Usage With this repository downloaded locally: ```bash python -m opf "Patient Alice Smith has SSN ending 1234." \ --checkpoint /path/to/privacyfiltertuned \ --device cpu ``` For evaluation: ```bash python -m opf eval /path/to/eval.jsonl \ --checkpoint /path/to/privacyfiltertuned \ --device cpu ```