Instructions to use openai/privacy-filter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openai/privacy-filter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="openai/privacy-filter")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("openai/privacy-filter") model = AutoModelForTokenClassification.from_pretrained("openai/privacy-filter", device_map="auto") - Transformers.js
How to use openai/privacy-filter with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('token-classification', 'openai/privacy-filter'); - Inference
- Notebooks
- Google Colab
- Kaggle
- AMD Developer Cloud
Add ai4privacy/pii-masking-300k to model card metadata (evaluation benchmark)
Browse files
README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
pipeline_tag: token-classification
|
|
|
|
|
|
|
| 4 |
library_name: transformers
|
| 5 |
tags:
|
| 6 |
- transformers.js
|
|
@@ -182,19 +184,3 @@ Additional caution is warranted in high-sensitivity settings such as medical, le
|
|
| 182 |
- Evaluate in-domain with local policy references before production.
|
| 183 |
- Use task-specific fine-tuning when policy differs from base boundaries.
|
| 184 |
- Keep human review paths for high-sensitivity workflows.
|
| 185 |
-
|
| 186 |
-
## Evaluation Benchmarks and Data Attribution
|
| 187 |
-
|
| 188 |
-
As described in the [release announcement](https://openai.com/index/introducing-openai-privacy-filter/), Privacy Filter was evaluated on the [PII-Masking-300k](https://huggingface.co/datasets/ai4privacy/pii-masking-300k) benchmark by [Ai4Privacy](https://huggingface.co/ai4privacy) (a project affiliated with [Ai Suisse SA](https://www.aisuisse.com/)), where it achieves an F1 score of 96% (94.04% precision, 98.04% recall), and 97.43% F1 on a corrected version of the benchmark.
|
| 189 |
-
|
| 190 |
-
If you use or build on this evaluation, please cite the benchmark:
|
| 191 |
-
|
| 192 |
-
```bibtex
|
| 193 |
-
@dataset{ai4privacy_pii_masking_300k,
|
| 194 |
-
author = {Ai4Privacy},
|
| 195 |
-
title = {PII-Masking-300k},
|
| 196 |
-
year = {2024},
|
| 197 |
-
publisher = {Hugging Face},
|
| 198 |
-
url = {https://huggingface.co/datasets/ai4privacy/pii-masking-300k}
|
| 199 |
-
}
|
| 200 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
pipeline_tag: token-classification
|
| 4 |
+
datasets:
|
| 5 |
+
- ai4privacy/pii-masking-300k
|
| 6 |
library_name: transformers
|
| 7 |
tags:
|
| 8 |
- transformers.js
|
|
|
|
| 184 |
- Evaluate in-domain with local policy references before production.
|
| 185 |
- Use task-specific fine-tuning when policy differs from base boundaries.
|
| 186 |
- Keep human review paths for high-sensitivity workflows.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|