language:
- en license: mit tags:
- pii
- privacy
- redaction
- ner
- token-classification
- mlx
- apple-silicon metrics:
- f1
- accuracy library_name: mlx pipeline_tag: token-classification
🚀 Kava Privacy (Apple Silicon MLX Transformer)
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.
💻 CLI Usage
Pass text directly via command line arguments or stdin:
python3 kava_privacy.py "Email me at jane.doe@gmail.com or call 555-123-4567. SSN is 501-22-9384."
# Output: Email me at [EMAIL] or call [PHONE]. SSN is [SSN].
Or pipe text from stdin:
cat log.txt | python3 kava_privacy.py
🐍 Python API Usage
from kava_privacy import KavaPrivacy
# 1. Load default 2.01M Parameter Model (KVCHub/Kava-Privacy-2M-mlx)
kp = KavaPrivacy(model_name="2.01M")
redacted, entities = kp.redact("Email me at jane.doe@gmail.com or call 555-123-4567.")
print(redacted)
# Output: "Email me at [EMAIL] or call [PHONE]."
# 2. Load 636k Parameter Lightweight Model (KVCHub/Kava-Privacy-636k-mlx)
kp_636k = KavaPrivacy(model_name="636k")
print(kp_636k.redact("Call 555-987-6543.")[0])
📊 Model Performance
- Hard Adversarial Benchmark: 100.0% Pass (12/12 Passed)
- Zero-Shot Out-Of-Distribution Benchmark: 87.5% Pass Rate
- Inference Speed: 2.2ms / document on Apple Silicon GPU
- Zero False Positives: Ignores physics constants (
299,792,458 m/s), subnets (255.255.255.0), legal rules (12(b)(6)), and stock tickers ($182.50).
⚙️ Model Architecture & Specs
- Parameters: 2,011,233 (2.01M Parameters)
- Model File Size: 8.0 MB (
kava_privacy.safetensors) - Supported Entities (16):
NAME,EMAIL,PHONE,DOB,ADDRESS,SSN,CREDIT_CARD,IP,HANDLE,PASSPORT,VISA,DRIVER_LICENSE,BANK_ACCOUNT,ACCOUNT_NUMBER,URL,SECRET.
📄 License
Licensed under the permissive MIT License. Free for commercial and open-source applications.
Metadata
Release files for kava-privacy 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kava_privacy-1.0.0.tar.gz | 9.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kava_privacy-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.3 kB
Release files / kava_privacy-1.0.0.tar.gz
| Download URL | kava_privacy-1.0.0.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7dba77ecca9becdf7b2f98781d39f23708a3586160c359b3f24e117ddf2a98da
|
|
BLAKE2b-256 checksum How to use checksums |
d8ec6c76b0ec30c0d2da1be838d25ea8aa3d8e72d239aecaddb16b2bb1ae74d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / kava_privacy-1.0.0-py3-none-any.whl
| Download URL | kava_privacy-1.0.0-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a92c5f90f3dccecd88e5a1ad49d83f1126539cd14f80465d665286d8692bb5b
|
|
BLAKE2b-256 checksum How to use checksums |
d73802b1aded763e9bd3f3524439622d42af63f9f787edc8eb75382e8bc8a0d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|