---
title: openai-privacy-filter-mxfp8
canonical_url: "https://www.modelscope.cn/models/mlx-community/openai-privacy-filter-mxfp8"
md_url: "https://www.modelscope.cn/models/mlx-community/openai-privacy-filter-mxfp8.md"
repository: mlx-community/openai-privacy-filter-mxfp8
last_updated: 2026-04-24
license: apache-2.0
pipeline_tag: token-classification
tasks:
  - token-classification
model_type:
  - openai_privacy_filter
architectures:
  - OpenAIPrivacyFilterForTokenClassification
base_model:
  - openai/privacy-filter
base_model_relation: finetune
parameters: 395.0M
tensor_type:
  - U8
  - F16
  - U32
library_name:
  - mlx
  - safetensors
  - pytorch
frameworks:
  - pytorch
downloads: 33
stars: 0
tags:
  - transformers.js
  - mlx
  - mlx-embeddings
---

# openai-privacy-filter-mxfp8

> openai-privacy-filter-mxfp8 - mlx-community 在 ModelScope 开源的模型。mlx-community/openai-privacy-filter-mxfp8

mlx-community/openai-privacy-filter-mxfp8 是 ModelScope 魔搭社区上的 395.0M 参数token-classification模型，采用 apache-2.0 许可，基于 openai/privacy-filter 构建。

- **Repository**: mlx-community/openai-privacy-filter-mxfp8
- **License**: apache-2.0
- **Tasks**: token-classification
- **Parameters**: 395.0M
- **Base model**: openai/privacy-filter
- **Tags**: transformers.js, mlx, mlx-embeddings
- **Downloads**: 33
- **Stars**: 0
- **Last updated**: 2026-04-24

Source: https://www.modelscope.cn/models/mlx-community/openai-privacy-filter-mxfp8

---

# mlx-community/openai-privacy-filter-mxfp8

The Model [mlx-community/openai-privacy-filter-mxfp8](https://huggingface.co/mlx-community/openai-privacy-filter-mxfp8) was converted to MLX format from [openai/privacy-filter](https://huggingface.co/openai/privacy-filter) using mlx-embeddings version **0.1.1**.

`openai/privacy-filter` is a bidirectional 1.5B-parameter / 50M-active sparse-MoE token classifier that tags personally identifiable information (PII) with BIOES spans over 8 categories (person, email, phone, URL, address, date, account number, secret).

## Use with mlx

```bash
pip install mlx-embeddings
```

```python
from itertools import groupby
import mlx.core as mx
from mlx_embeddings.utils import load

model, tokenizer = load("mlx-community/openai-privacy-filter-mxfp8")
id2label = model.config.id2label

text = "My name is Alice Smith and my email is alice@example.com. Phone: 555-1234."
inputs = tokenizer(text, return_tensors="mlx")

outputs = model(inputs["input_ids"], attention_mask=inputs["attention_mask"])
preds = mx.argmax(outputs.logits, axis=-1)[0].tolist()

entity = lambda p: id2label[str(p)].split("-", 1)[-1] if id2label[str(p)] != "O" else None

for ent, group in groupby(zip(inputs["input_ids"][0].tolist(), preds), key=lambda x: entity(x[1])):
    if ent:
        span = tokenizer.decode([tid for tid, _ in group]).strip()
        print(f"{ent:18s} -> {span!r}")
```
