alt.freeweights.vision / privacy-filter
From: openai <huggingface.co/openai>Newsgroups: alt.freeweights.visionSubject:

privacy-filter

Date: 2026-11-14Commit: 7ffa9a0Signed: 2DC28CC7B26A283B ✓

Token classification model with 1.4B parameters. Onnx and safetensors weights, 17.4 GB in all. Published by openai under Apache-2.0.

1.4B params17.4GBprivacy-filteronnx safetensorspermissive
FactsParams1.4BSize17.4 GBFormatsonnx, safetensorsTasktoken classificationLicenseApache-2.0From sourcepermissive
$ fw get openai/privacy-filter
# manifest sha256 851e7204a80a… · 17.4 GB · 25 files
$ fw verify ./privacy-filter openai/privacy-filter
From sourceHosted (signed)openai/privacy-filterLast check: 2026-11-14 21:38 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Overview

Size
17.4 GB
Weights
5.60 GB (safetensors)
Parameters
1.4B
Formats
onnx, safetensors
Task
token classification
License
Apache-2.0 (permissive)
Files
25, each with a sha256
Publisher
openai
Added
2026-11-14
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-14 21:38 UTCpassed

Model card

From the publisher at commit 7ffa9a0. Shown as plain text with links; images open at the publisher.

OpenAI Privacy Filter#

OpenAI Privacy Filter is a bidirectional token-classification model for personally identifiable information (PII) detection and masking in text. It is intended for high-throughput data sanitization workflows where teams need a model that they can run on-premises that is fast, context-aware, and tunable.

OpenAI Privacy Filter is pretrained autoregressively to arrive at a checkpoint with similar architecture to gpt-oss, albeit of a smaller size. We then converted that checkpoint into a bidirectional token classifier over a privacy label taxonomy, and post-trained with a supervised classification loss. (For architecture details about gpt-oss, please see the gpt-oss model card.) Instead of generating text token-by-token, this model labels an input sequence in a single forward pass, then decodes coherent spans with a constrained Viterbi procedure. For each input token, the model predicts a probability distribution over the label taxonomy which consists of 8 output categories described below.

Highlights:

  • Permissive Apache 2.0 license: ideal for experimentation, customization, and commercial deployment.
  • Small size: Runs in a web browser or on a laptop – 1.5B parameters total and 50M active parameters.
  • Fine-tunable: Adapt the model to specific data distributions through easy and data efficient finetuning.
  • Long-context: 128,000-token context window enables processing long text with high throughput and no chunking.
  • Runtime control: configure precision/recall tradeoffs and detected span lengths through preset operating points.

Usage#

Transformers#
  1. Using the pipeline API:
from transformers import pipeline

classifier = pipeline(
    task="token-classification",
    model="openai/privacy-filter",
)
classifier("My name is Alice Smith")
  1. Using as AutoModelForTokenClassification model:
import torch
from transformers import AutoModelForTokenClassification, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("openai/privacy-filter")
model = AutoModelForTokenClassification.from_pretrained("openai/privacy-filter", device_map="auto")

inputs = tokenizer("My name is Alice Smith", return_tensors="pt").to(model.device)

with torch.no_grad():
    outputs = model(**inputs)

predicted_token_class_ids = outputs.logits.argmax(dim=-1)
predicted_token_classes = [model.config.id2label[token_id.item()] for token_id in predicted_token_class_ids[0]]
print(predicted_token_classes)
Transformers.js#
  1. Using the pipeline API:
import { pipeline } from "@huggingface/transformers";

const classifier = await pipeline(
  "token-classification", "openai/privacy-filter",
  { device: "webgpu", dtype: "q4" },
);

const input = "My name is Harry Potter and my email is harry.potter@hogwarts.edu.";
const output = await classifier(input, { aggregation_strategy: "simple" });
console.dir(output, { depth: null });

See example output

[
  {
    entity_group: 'private_person',
    score: 0.9999957978725433,
    word: ' Harry Potter'
  },
  {
    entity_group: 'private_email',
    score: 0.9999990728166368,
    word: ' harry.potter@hogwarts.edu'
  }
]

Model Details#

Model Description#

Privacy Filter is a bidirectional token classification model with span decoding. It is trained in phases, beginning with autoregressive pretraining. The pretrained language model is then modified and post-trained as a bidirectional banded attention token classifier with band size 128 (effective attention window: 257 tokens including self). This means:

  • The base model is an autoregressive pretrained checkpoint.
  • The language-model output head is replaced with a token-classification head over privacy labels.
  • Post-training is supervised token-level classification rather than next-token prediction.
  • Inference applies constrained sequence decoding to produce coherent BIOES (Begin, Inside, Outside, End, Single) span labels.

Architecturally, the implementation in this repo is a pre-norm transformer encoder-style stack with:

  • token embeddings
  • 8 repeated transformer blocks
  • grouped-query attention with rotary positional embeddings, with 14 query heads and 2 KV heads (group size = 7 queries per KV head)
  • sparse mixture-of-experts feed-forward blocks with 128 experts total (top-4 routing per token)
  • a final token-classification head over privacy labels (rather than natural language vocabulary tokens), with residual stream width d_model = 640.

Relative to iterative autoregressive approaches, this design allows all tokens to be labeled in one pass, which improves throughput. Relative to classical masked-language-model pretraining approaches, this is a post-training conversion of an autoregressive model rather than a native masked-LM setup.

Output Shape#

Privacy Filter can detect 8 privacy span categories:

  1. account_number
  2. private_address
  3. private_email
  4. private_person
  5. private_phone
  6. private_url
  7. private_date
  8. secret

To perform token-classification, each non-background span category is expanded into boundary-tagged token classes: B-<label>, I-<label>, E-<label>, S-<label>, plus the background class, O. So the total number of token-level output classes is 33: 1 background class \+ 8 span labels \* 4 boundary tags \= 33 classes. This means the output head emits 33 logits for each token. For a sequence of length T, the output has shape [T, 33]; for a batch of size B, it has shape [B, T, 33].

The token-label vocabulary consists of the background label O plus BIOES-tagged variants of each privacy category: account_number, private_address, private_email, private_person, private_phone, private_url, private_date, and secret. In other words, for each category, the model predicts B-, I-, E-, and S- forms corresponding to begin, inside, end, and single-token spans. At inference time, these per-token logits are decoded into coherent BIOES span labels using constrained sequence decoding.

Sequence Decoding Rationale and Calibration#
Rationale#

After the token classifier produces per-token logits, we decode labels with a constrained Viterbi decoder using linear-chain transition scoring, rather than taking an independent argmax for each token. The decoder enforces allowed BIOES boundary transitions and scores complete label paths with start, transition, and end terms, plus six transition-bias parameters that control background persistence, span entry, span continuation, span closure, and boundary-to-boundary handoff. This global path optimization is intended to improve span coherence and boundary stability by making each token decision depend on sequence-level structure, not just local logits, especially in noisy or mixed-format text where local token decisions alone can produce fragmented or inconsistent boundaries.

Operating-Point Calibration#

Sequence Decoding parameters can discourage staying in background while encouraging span entry and continuation, yielding broader and more contiguous masking for improved recall, or vice versa for improved precision. At runtime, users can tune parameters that control this tradeoff.

Model Metadata#

Bias, Risks, and Limitations#

Risk: Over-reliance#

Privacy Filter is a redaction and data minimization aid, not an anonymization, compliance, or a safety guarantee. Over-reliance on the tool as a blanket anonymization claim would risk missing desired privacy objectives. Privacy Filter is best used as one of multiple layers in a holistic end-to-end privacy-by-design approach.

Limitation: Static Label Policy#

The model will only identify personal data spans that match the trained label taxonomy and definitions. Real-life privacy use cases are varied and complex and definitions of appropriate label policies and decision boundaries can differ. Thus model defaults may not satisfy organization-specific governance requirements without calibration/fine-tuning.

Privacy Filter does not support configuring label policies dynamically at runtime; instead changing policies requires further finetuning of the model. The native label set and associated decision boundaries may not be appropriate for every use case. For example, the model's training policy aims to prioritize personal identifiers, often preserving context that is not strongly person-linked by design; some users may want to adjust this choice.

Performance may drop on non-English text, non-Latin scripts, protected-group naming patterns, or domains that are out of distribution compared to model training.

Failure Modes#

Like all models, Privacy Filter can make mistakes, such as: under-detection of uncommon personal names, regional naming conventions, initials, honorific-heavy references, or domain-specific identifiers; over-redaction of public entities, organizations, locations, or common nouns when local context is ambiguous; fragmented or shifted span boundaries in mixed-format text, long documents, or text with heavy punctuation and layout artifacts; missed secrets for novel credential formats, project-specific token patterns, or secrets split across surrounding syntax; and over-redaction of benign high-entropy strings, placeholders, hashes, sample credentials, or synthetic examples that resemble secrets.

These limitations can interact with demographic, regional, and domain variation. For example, names and identifiers that are underrepresented in training data, or that follow conventions different from the dominant training distribution, may be more likely to be missed or inconsistently bounded.

High-Risk Deployment Caution#

Additional caution is warranted in high-sensitivity settings such as medical, legal, financial, human resources, education, and government workflows. In these settings, both false negatives and false positives can be costly: missed spans may expose sensitive information, while excess masking can remove material context needed for review, auditing, or downstream decision-making.

Recommendations#
  • Use Privacy Filter as part of a holistic privacy-by-design approach, not as a blanket anonymization claim.
  • Evaluate in-domain with local policy references before production.
  • Use task-specific fine-tuning when policy differs from base boundaries.
  • Keep human review paths for high-sensitivity workflows.

Files

25 files · 17.4 GBWeights 5.60 GB (safetensors). Sizes and sha256 from the signed manifest.
Show all 25 files with their sha256
FileSizesha256
.gitattributes2.06 KB40d7c74330238ddab2bee6bce7ef55dfee237f9ca88590d6e5880cca1a70cf3b
README.md11.1 KB48318ff48819858192dbb59f106dd709c3017e447bcc540807df66840a03a695
config.json3.04 KBb2b26a4a4a000639ad30b0c264adbefe365bdb567fbd7bb27303b8c438375bd1
model.safetensors2.80 GB06f66b87650b988b04e218285f9fe3df6a4943416b6ffa8171f07bc56cf12a9d
model.sig8.69 KBcb1f2ba7878e0796a2ae9fe338d307245da483d59552fe2b688293cbeb1c1414
onnx/model.onnx138 KB6aafae8037498c8785816e4c43014d8a693090fa4ed5bb225234a294595cb436
onnx/model.onnx_data1.82 GB26bfdd86ff0794f92a0164fb8d4cc4a2ff63f1912866355da530a8757dfe9877
onnx/model.onnx_data_11.91 GBb5f641c184d5caf50ad9c026efbc019c14cc528a07491a1c500fd34c983d548f
onnx/model.onnx_data_21.90 GB4c12392ea557a904af3ced6f7c736d1a68b265e65e4a1b310fe0cec5c9e7424c
onnx/model_fp16.onnx143 KB04978ae127ae0922625319bfbf84b8664362ce32a1adc03414cf8215c3e2bc17
onnx/model_fp16.onnx_data2.08 GB744ef21b5311bf8f2e6500c4ef013a23d65277ac79a28679c0ddba964552f084
onnx/model_fp16.onnx_data_1741 MB77d85417c0317a920a13b8c3d21f58734287b6a1393bf1177a641f23996ccfd4
onnx/model_q4.onnx160 KB8f7dee8b46d096f052b359375dfba5d983cc4d18c44a783bf548615c472f8dea
onnx/model_q4.onnx_data917 MBf30998e28c71c5374cc7e8b7de8f0f83e981592c0c2d652d2ad4928454dbb496
onnx/model_q4f16.onnx166 KBeaae4e83cf1345a60abe333ed882b55fe5775d1dfbf34b9b269e5e5416f45e5b
onnx/model_q4f16.onnx_data809 MB6d4dde787e03ace283c45d4e32a94eec32b6cfcc242e7219bea96f5b4c13569d
onnx/model_quantized.onnx162 KBa325fb5341567a73c94e91ec5e49060d38d9b16111f518ad34773039a0c9c098
onnx/model_quantized.onnx_data1.62 GB50f4c8c7f3c27fbc1fe16d4f74f6f7c3b74ba8f18a262e8b6911854c64c33a6d
original/config.json707 B048a20604a3622de208d30df57cd5424bb583639b9ba20ddd7da593d3f89a248
original/dtypes.json4.11 KBe936acb3d039b35ec55438af2fffd424a53c7685b895775c186b26c7df79fcc7
original/model.safetensors2.80 GB9c262cbe68a0c8a50590a648ef8341a2b7d3be1fa11dfb79893fe0b03ce57b5c
original/viterbi_calibration.json372 Bbbc8611ef08a55ed72d64856cbbbb9a91db8dfa881f0a92e2afbad6e4bbc775a
tokenizer.json27.9 MB0614fe83cadab421296e664e1f48f4261fa8fef6e03e63bb75c20f38e37d07d3
tokenizer_config.json234 B6c14af9ce1a284d3c3c5146b26efe4cd589c68e1dd4e9d94455606ec911ba774
viterbi_calibration.json372 Bbbc8611ef08a55ed72d64856cbbbb9a91db8dfa881f0a92e2afbad6e4bbc775a
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
7ffa9a043d pinned now manifest updated, same commit2026-11-14 21:38 UTC25 files · 17.4 GB
7ffa9a043d2026-11-14 21:38 UTC25 files · 17.4 GB

Use it

$ fw get openai/privacy-filter
# manifest sha256 851e7204a80a… · 17.4 GB · 25 files
$ fw verify ./privacy-filter openai/privacy-filter
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/openai/privacy-filter.json --dir ./privacy-filter $ python3 fw.py verify ./privacy-filter ./openai__privacy-filter.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download openai/privacy-filter --revision 7ffa9a043d54d1be65afb281eddf0ffbe629385b --local-dir ./privacy-filter

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-14
Text in
README.md
Text sha256
48318ff48819858192dbb59f106dd709c3017e447bcc540807df66840a03a695
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: openai <huggingface.co/openai>Newsgroups: alt.freeweights.visionSubject: privacy-filterDate: 2026-11-14Commit: 7ffa9a0Signed: 2DC28CC7B26A283B ✓
Upstream
openai/privacy-filter
Pinned commit
7ffa9a043d54d1be65afb281eddf0ffbe629385b
Manifest
privacy-filter.json · .minisig
Manifest sha256
851e7204a80a67e970e0966a42603fd347594921b31c0ffa1b9f00eac2262e97
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-14 21:38 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/openai/privacy-filter.json $ curl -O https://freeweights.allternit.com/manifests/openai/privacy-filter.json.minisig $ minisign -Vm privacy-filter.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download openai/privacy-filter
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. privacy-filter.json. Provenance. Takedown history: none.
From: dima806 <huggingface.co/dima806>Subject: ai_vs_real_image_detection
From: legekka <huggingface.co/legekka>Subject: AI-Anime-Image-Detector-ViT
From: onnx-community <huggingface.co/onnx-community>Subject: AI-Anime-Image-Detector-ViT-ONNX
From: AICodexLab <huggingface.co/AICodexLab>Subject: answerdotai-ModernBERT-base-ai-detector
From: onnx-community <huggingface.co/onnx-community>Subject: answerdotai-ModernBERT-base-ai-detector-ONNX
From: onnx-community <huggingface.co/onnx-community>Subject: bart-large-cnn-ONNX