# OpenAI Privacy Filter — Apache 2.0 PII Detection Model for On-Prem Data Pipelines

> A small, fast Apache 2.0 model from OpenAI for detecting and masking PII in text — designed to run entirely on-premises.

- Org: OpenAI
- Date: 2026-04-22
- Category: model, tool
- Source: https://huggingface.co/openai/privacy-filter
- Canonical page: https://ai-tldr.dev/releases/openai-privacy-filter/

## In short

OpenAI releases an Apache 2.0 PII detection model: 1.5B params, 50M active, 128k context, detects 8 PII categories via BIOES token classification. Designed for on-prem data sanitization — no data leaves your stack.

## What it is

OpenAI Privacy Filter is a token-classification model that identifies 8 types of personally identifiable information — names, private addresses, emails, phone numbers, account numbers, URLs, dates, and secrets — in long text documents. It outputs BIOES span labels (Begin, Inside, Outside, End, Single) and processes sequences in a single forward pass. Apache 2.0 licensed and designed to run on-prem without sending data to any external API.

## How it works

The model has 1.5B parameters with 50M active during inference, keeping latency low despite the large nominal size. A 128k-token context window lets it process long documents without chunking. Constrained Viterbi decoding ensures coherent BIOES labels. Precision/recall tradeoffs are configurable at runtime via a threshold parameter.

## Why it matters

Enterprises doing LLM fine-tuning or building RAG pipelines on sensitive data must strip PII before it touches a cloud model. On-prem PII detection has historically meant expensive proprietary tools or brittle regex heuristics. An Apache 2.0 model from a recognized lab that runs locally removes a real compliance barrier for teams working with healthcare, legal, or financial data.

## Who it's for

Data engineers and ML teams doing LLM fine-tuning or RAG on enterprise data with PII exposure constraints.

## Try it

pip install transformers && from transformers import pipeline; p = pipeline('token-classification', model='openai/privacy-filter'); p('My name is Alice Smith')

## Links

- [Model Card](https://huggingface.co/openai/privacy-filter)
- [Repo](https://github.com/openai/privacy-filter)
- [Model Card PDF](https://cdn.openai.com/pdf/c66281ed-b638-456a-8ce1-97e9f5264a90/OpenAI-Privacy-Filter-Model-Card.pdf)
