Downloads · 30 days
80
23% of all-time downloads
ConwayResearch/pii-30M-mlx-4bit-v1.0
pii-30M-mlx-4bit-v1.0 is a token classification model from ConwayResearch. Use it when you need labels on individual words, such as names. It is set up for mlx. The card lists the license as apache-2.0.
A compact, fine-tuned model for local detection and redaction of personally identifiable information (PII), packaged for Apple Silicon with MLX.
Downloads · 30 days
80
23% of all-time downloads
All-time downloads
345
Public
Repo size
17.9 MB
Likes
1
Public
Click a slice to open those files.
.safetensors17.9 MB · 94%
From the Hugging Face model README
A compact, fine-tuned model for local detection and redaction of personally identifiable information (PII), packaged for Apple Silicon with MLX.
Designed for browser observations, form content, documents, and application text. The model is English-focused, with additional multilingual training. Applications can use the detected spans to decide which information to retain, replace, or handle locally.
O, B-PII, and I-PII.Fine-tuned and converted to MLX by ConwayResearch. The merged weights, tokenizer, and Python inference runtime are included.
On an Apple Silicon Mac with Python 3.10 or later, download the repository and install its dependencies:
python -m pip install huggingface-hub
hf download ConwayResearch/pii-30M-mlx-4bit-v1.0 --local-dir pii-model
cd pii-model
python -m pip install -r requirements.txt
python pii.py --text "Contact Alice Smith at [email protected]."
Use the Python API to keep the model loaded across requests:
from pii import PIIDetector
model = PIIDetector()
text = "Contact Alice Smith at [email protected]."
print(model.detect(text))
print(model.redact(text))
detect() returns start, end, and label for each span. Offsets use Unicode characters, with an exclusive end: text[start:end]. redact() replaces detected spans with [PII] by default. Inference uses the included MLX runtime and runs locally after download.
Apache-2.0. See LICENSE.