πŸš€ Kava Privacy (Apple Silicon MLX Transformer)

License: MIT Framework: Apple MLX Latency: 2.2ms

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:

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 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].

🐍 Python API Usage

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 jane.doe@gmail.com 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"})

πŸ“Š 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.

Downloads last month
-
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