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
Reference PII-Masking-300k evaluation benchmark per release announcement
Browse files
README.md
CHANGED
|
@@ -183,17 +183,18 @@ Additional caution is warranted in high-sensitivity settings such as medical, le
|
|
| 183 |
- Use task-specific fine-tuning when policy differs from base boundaries.
|
| 184 |
- Keep human review paths for high-sensitivity workflows.
|
| 185 |
|
| 186 |
-
##
|
| 187 |
|
| 188 |
-
|
|
|
|
|
|
|
| 189 |
|
| 190 |
```bibtex
|
| 191 |
-
@dataset{
|
| 192 |
author = {Ai4Privacy},
|
| 193 |
-
title = {
|
| 194 |
-
year = {
|
| 195 |
publisher = {Hugging Face},
|
| 196 |
-
url = {https://huggingface.co/datasets/ai4privacy/
|
| 197 |
-
doi = {10.57967/hf/4852}
|
| 198 |
}
|
| 199 |
```
|
|
|
|
| 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 |
```
|