Run this model with HF Jobs

Run mlx-community/openai-privacy-filter-mxfp4 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/mlx-community/openai-privacy-filter-mxfp4. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/mlx-community/openai-privacy-filter-mxfp4 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

mlx-community/openai-privacy-filter-mxfp4

The Model mlx-community/openai-privacy-filter-mxfp4 was converted to MLX format from 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

pip install mlx-embeddings
from itertools import groupby
import mlx.core as mx
from mlx_embeddings.utils import load

model, tokenizer = load("mlx-community/openai-privacy-filter-mxfp4")
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}")
Downloads last month
93
Safetensors
Model size
1B params
Tensor type
U32
ยท
F16
ยท
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for mlx-community/openai-privacy-filter-mxfp4

Finetuned
(54)
this model