I tested the privacy cleaner by OpenAI:
Get it via git clone https://github.com/openai/privacy-filter.git
Install via cd privacy-filter and then via uv:
uv venv
source .venv/bin/activate
uv pip install -e .
On Mac M-series, you can use MPS GPU, but need to switch off Triton first.
So, you can use e.g. OPF_MOE_TRITON=0 uv run python -m opf --device mps "Max Mustermann wohnt in der Hauptstraße 12, 10115 Berlin. Seine E-Mail ist max@max.de und seine Faxnummer ist 030 123456. Konto ist 4221740036751929"
Which gives you <PRIVATE_PERSON> wohnt in der <PRIVATE_ADDRESS>. Seine E-Mail ist <PRIVATE_EMAIL> und seine Faxnummer ist <PRIVATE_PHONE>. Konto ist <ACCOUNT_NUMBER>.
You can build encode/decode pipelines (e.g. for encoding before sending to LLM and decode the answer) with using the --format json option.
I tested the privacy cleaner by OpenAI:
Get it via
git clone https://github.com/openai/privacy-filter.gitInstall via
cd privacy-filterand then viauv:On Mac M-series, you can use MPS GPU, but need to switch off Triton first.
So, you can use e.g.
OPF_MOE_TRITON=0 uv run python -m opf --device mps "Max Mustermann wohnt in der Hauptstraße 12, 10115 Berlin. Seine E-Mail ist max@max.de und seine Faxnummer ist 030 123456. Konto ist 4221740036751929"Which gives you
<PRIVATE_PERSON> wohnt in der <PRIVATE_ADDRESS>. Seine E-Mail ist <PRIVATE_EMAIL> und seine Faxnummer ist <PRIVATE_PHONE>. Konto ist <ACCOUNT_NUMBER>.You can build encode/decode pipelines (e.g. for encoding before sending to LLM and decode the answer) with using the
--format jsonoption.