You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the model to the supported architectures list and a Token
Classification (PII detection) usage section with a working example.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@ MLX-Embeddings supports a variety of model architectures for text embedding task
21
21
- Qwen3-VL (multimodal Qwen3-VL embedding and reranking model)
22
22
- Llama Bidirectional (Llama-based bidirectional embedding models, e.g. NVIDIA NV-Embed)
23
23
- Llama Nemotron VL (multimodal vision-language embedding model with SigLIP vision + bidirectional Llama)
24
+
- OpenAI Privacy Filter (bidirectional GPT-OSS variant for PII token classification with sparse MoE, GQA + attention sinks, and YARN RoPE)
24
25
25
26
We're continuously working to expand our support for additional model architectures. Check our GitHub repository or documentation for the most up-to-date list of supported models and their specific versions.
26
27
@@ -177,6 +178,30 @@ for idx, logit in enumerate(predictions.tolist()):
177
178
print(f"{label}: {logit:.3f}")
178
179
```
179
180
181
+
#### Token Classification (PII detection)
182
+
183
+
`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).
184
+
185
+
```python
186
+
import mlx.core as mx
187
+
from mlx_embeddings.utils import load
188
+
189
+
model, tokenizer = load("openai/privacy-filter")
190
+
id2label = model.config.id2label
191
+
192
+
text ="My name is Alice Smith and my email is alice@example.com. Phone: 555-1234."
0 commit comments