Ask AI without
exposing people.
Maskara is a 4.37M-parameter token-classification model that finds names, Aadhaar, PAN, UPI IDs, passports and 12 more PII types — then masks them locally before a single token reaches the cloud.
Wrap a prompt, call any LLM, restore the reply. 99.98% F1 across 17 entity types, fine-tuned on 200K Indian and global PII samples — raw values never leave the device.
One local pass.
No raw PII leaves.
Pick a realistic prompt — Hinglish included — and watch Maskara detect sensitive spans, swap them for safe twins, and restore the originals after the AI replies.
Small, local,
India-first.
A continued-training BERT checkpoint tuned for Indian PII formats and bilingual Hinglish text. Public on Hugging Face, MIT-licensed, and built to drop in front of any LLM call.
Two ways to run it
Detect tokens straight from Transformers, or wrap the prompt path with the masking SDK.
from maskara import Maskara maskara = Maskara() # loads the 4.37M-param NER head safe, ctx = maskara.protect(prompt) # PII swapped for safe twins reply = llm.complete(safe) # only masked text hits the cloud final = maskara.restore(reply, ctx) # originals re-inserted locally
from transformers import (AutoTokenizer,
AutoModelForTokenClassification, pipeline)
name = "somukandula/maskara"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForTokenClassification.from_pretrained(name)
ner = pipeline("token-classification", model=model, tokenizer=tok)
text = "Mera naam Rohit Kumar hai, Aadhaar 4220-4122-1200 aur email rohit.k@gmail.com."
print(ner(text))
Built for code-mixed text
Trained on Hinglish and English-mixed prompts, so it catches PII even when sentences switch languages mid-stream.
Drop-in middleware
Wrap a prompt, call your provider, restore the response. No new app architecture, no data sent out to detect.
17 entity types
Five Indian-specific formats added in this checkpoint, on top of twelve global identifiers.