Downloads · 30 days
8
8% of all-time downloads
KVCHub/Kava-Privacy-2.01M-mlx
Kava-Privacy-2.01M-mlx is a token classification model from KVCHub. Use it when you need labels on individual words, such as names. It is set up for mlx. The card lists the license as mit.
[](https://opensource.org/licenses/MIT) [](https://github.com/ml-explore/mlx) [](-model-performance)
Downloads · 30 days
8
8% of all-time downloads
All-time downloads
106
Public
Repo size
23 MB
Likes
0
Public
Click a slice to open those files.
.safetensors8.1 MB · 52%
From the Hugging Face model README
Kava Privacy is a lightweight, ultra-fast 2.01 Million parameter bidirectional Transformer model trained natively on Apple Silicon GPU via Apple MLX. It detects and redacts 16 categories of Personally Identifiable Information (PII) with 2.2ms latency, zero cloud data leakage, and 100% false-positive immunity on technical, financial, legal, and scientific text.
Pass text directly via command line arguments or stdin:
1. Get the files from the Files tab of this repo*
[https://huggingface.co/KVCHub/Kava-Privacy-2.01M-mlx/tree/main/]. Download the zip file
2. Install the dependencies (Apple Silicon Mac required):
Make sure you have pip installed before running the next command
pip install mlx numpy
2. Run it
python3 kava_privacy.py "Email me at [email protected] or call 555-123-4567. SSN is 501-22-9384."
# Output: Email me at [EMAIL] or call [PHONE]. SSN is [SSN].
First install the libary
pip install kava-privacy
Sample Code:
from kava_privacy import KavaPrivacy
kp = KavaPrivacy(model_name="2.01M")
redacted, entities = kp.redact("Email me at [email protected] or call 555-123-4567.")
print(redacted)
# Output: "Email me at [EMAIL] or call [PHONE]."
You can restrict redaction to specific entity types:
redacted, entities = kp.redact(text, entity_types={"EMAIL", "PHONE"})
299,792,458 m/s), subnets (255.255.255.0), legal rules (12(b)(6)), and stock tickers ($182.50).kava_privacy.safetensors)NAME, EMAIL, PHONE, DOB, ADDRESS, SSN, CREDIT_CARD, IP, HANDLE, PASSPORT, VISA, DRIVER_LICENSE, BANK_ACCOUNT, ACCOUNT_NUMBER, URL, SECRET.Licensed under the permissive MIT License. Free for commercial and open-source applications.