The lighter of the two Rakshya models. It finds personal data in Nepali, romanised Nepali, Hindi and English text and redacts it, with the labels, the rules and the code of Rakshya 1.1. Its network has 6 layers where Rakshya 1.1 has 12, so it is smaller and faster.
| Rakshya 1.1 Lite | Rakshya 1.1 | |
|---|---|---|
| 8-bit ONNX file | 29.8 MB | 40.8 MB |
| Time per text of news in a browser, one thread | 23 ms | 50 ms |
| Seven sets of real text, mean exact F1 | 0.903 | 0.913 |
| Practical test, exact F1 with label | 0.948 | 0.956 |
| 180 further cases, exact F1 with label | 0.919 | 0.960 |
| NepPIIBench, exact F1 | 0.9468 | 0.9555 |
Take the Lite model where the download or the time per text counts, as in a web page or on a phone. Take Rakshya 1.1 where the score counts more.
# pip install git+https://github.com/fiste-ai/rakshya
from rakshya import Rakshya
pii = Rakshya(model="lite") # the three files that run, 33 MB in all, without the 32-bit weights
text = "मेरो नाम सीता थापा हो, फोन ९८४१२३४५६७।"
pii.find(text) # [(9, 18, 'PERSON'), (27, 37, 'PHONE')]
pii.find(text, labels="personal") # personal data only
pii.redact(text) # मेरो नाम [PERSON_1] हो, फोन [PHONE_1]।
In a web page, with the browser module of Rakshya 1.1:
const dist = "https://cdn.jsdelivr.net/npm/onnxruntime-web@1.31.1/dist/";
const ort = await import(dist + "ort.wasm.min.mjs");
const { load } = await import("https://cdn.jsdelivr.net/gh/fiste-ai/rakshya@v1.1/docs/rakshya.js");
const rakshya = await load({ ort, model: "https://huggingface.co/fiste-ai/rakshya-lite/resolve/v1.1", runtime: dist });
const { spans, redacted } = await rakshya.detect("मेरो नाम सीता थापा हो, फोन ९८४१२३४५६७।");
The folder can also be loaded with transformers.js, which then gives the tags of the model without the rules.
| File | Content |
|---|---|
onnx/model_quantized.onnx |
8-bit model, 29.8 MB, the one the runtime loads |
model.safetensors, config.json |
32-bit weights, 117 MB |
tokenizer.json, tokenizer_config.json |
Tokenizer, 48,000 pieces, the one of Rakshya 1.1 |
tagger.json |
Version, labels, base model, weight file name |
release.json |
SHA-256 of the model files, and of the code they were checked with |
LICENSE.md, NOTICE.md |
Terms, third-party notices and training data |
The code is not in this repository. It is the Python package and the browser module of Rakshya 1.1, at github.com/fiste-ai/rakshya and beside the model at fiste-ai/rakshya.
| Label | What it marks |
|---|---|
PERSON |
Name of a person, including a surname or given name used alone later |
LOCATION |
A place named for itself: country, province, district, city, ward, tole |
ORGANIZATION |
A body: office, company, school, bank, hospital, party |
DATE |
A date that is not a date of birth |
ADDRESS |
Where a person lives, owns land or receives deliveries, as one span |
DOB |
Date of birth |
PHONE |
Personal or direct work phone number |
EMAIL |
Personal or named work e-mail address |
URL |
A web address |
DIGITAL_SECRET |
Client IP address, device identifier, login or social handle, password, key, personal profile link |
NATIONAL_ID |
Citizenship number, national identity number, Aadhaar, SSN, NINO, SIN and similar |
TAX_ID |
Personal tax number: Nepal PAN, India PAN, ITIN, UTR, TFN |
PASSPORT |
Passport number |
DRIVER_LICENSE |
Driving licence number |
VOTER_ID |
Voter or election identity number |
MEDICAL_ID |
Patient, hospital record, health insurance or national health identity |
EMPLOYEE_STUDENT_ID |
Staff number, provident fund number, permit, university registration, symbol number |
PROPERTY_UTILITY_ID |
Plot, sheet, survey, ration card, electricity, water or fibre consumer number |
ID_NUMBER |
Any other number that names one person |
BANK_ACCOUNT |
Bank account, IBAN, DEMAT or BOID number |
CREDIT_CARD |
Debit or credit card number |
PAYMENT_ID |
UPI handle, wallet identity, payment handle, personal crypto address |
VEHICLE_ID |
Vehicle registration plate of a private vehicle, chassis or VIN |
OFFICE_PHONE |
Phone number of an office, helpline or public service |
OFFICE_EMAIL |
Shared or institutional mailbox |
Two profiles decide what is returned:
labels="all" returns every label.labels="personal" returns personal data only. It leaves LOCATION,
ORGANIZATION, DATE, URL, OFFICE_PHONE and OFFICE_EMAIL in the text,
and also leaves a number that is already masked.Measured with labels="personal" on the 380 rows of
NepPIIBench, with the scorer
that ships with the benchmark. Those rows are in no training or development row.
| Language | Rows | Character precision | Character recall | Character F1 | Exact precision | Exact recall | Exact F1 |
|---|---|---|---|---|---|---|---|
| Nepali | 130 | 0.9823 | 0.9910 | 0.9867 | 0.9438 | 0.9651 | 0.9543 |
| Hindi | 127 | 0.9698 | 0.9954 | 0.9825 | 0.9355 | 0.9618 | 0.9485 |
| English | 123 | 0.9790 | 0.9762 | 0.9776 | 0.9293 | 0.9460 | 0.9376 |
| All | 380 | 0.9769 | 0.9875 | 0.9822 | 0.9362 | 0.9576 | 0.9468 |
Character F1 counts overlapping characters, so a short boundary difference costs little. Exact F1 counts spans with the same start, end and label. On the same rows Rakshya 1.1 has an exact F1 of 0.9555 and a character F1 of 0.9824.
On the 837 strings that the benchmark marks as not personal, 59 were covered by a prediction, 7.0 percent. On the 15 rows with no personal data, 2 received a mark.
The model learned from the training part of the collection these rows are cut from, so this is a score on the kind of text it was trained for. Beside it stand seven sets of real news, web pages, government pages and comments, a larger practical test and 180 further cases:
| Test | Lite | Rakshya 1.1 | Rakshya 1.1 ahead by, with its 95 percent interval |
|---|---|---|---|
| Seven sets of real text, 1,034 texts, mean exact F1 | 0.903 | 0.913 | 0.0102 (0.0005 to 0.0207) |
| Practical test, 578 paragraphs, exact F1 with label | 0.948 | 0.956 | 0.0073 (0.0020 to 0.0119) |
| 180 further cases, exact F1 with label | 0.919 | 0.960 | 0.0412 (0.0168 to 0.0705) |
The interval comes from drawing the test texts again, the same ones for both models.
By set, exact F1 on real text:
| System | News (ne) | Web (ne) | Government (ne) | Comments (ne, Latin) | News (en) | Web (en) | News (hi) | Mean |
|---|---|---|---|---|---|---|---|---|
| Rakshya 1.1 Lite | 0.928 | 0.923 | 0.937 | 0.841 | 0.920 | 0.932 | 0.841 | 0.903 |
| Rakshya 1.1 | 0.930 | 0.937 | 0.944 | 0.864 | 0.934 | 0.933 | 0.851 | 0.913 |
All of these test sets were scored before: once by the models of release 1.0 and once by Rakshya 1.1. The Lite model was fixed before it was scored on them, by a rule on other data, it was scored once, and nothing was changed afterwards. Every score of Rakshya 1.1, beside those of 25 published systems, is in BENCHMARK.md.
The model is fine-tuned from nreimers/mMiniLMv2-L6-H384-distilled-from-XLMR-Large, with
its vocabulary cut to the 48,000 pieces that Nepali, Hindi and English text
use most; it has the tokenizer of Rakshya 1.1. It learned from the rows that
Rakshya 1.1 learned from:
On every row it also followed the tag probabilities of Rakshya 1.1, which is its teacher.
None of the public sets is redistributed here. HiNER and Few-NERD are licensed
CC BY-SA 4.0; the other sets are MIT or CC BY 4.0. The full list and the terms of
each are in NOTICE.md.
Like Rakshya 1.1, and unlike release 1.0, it was trained without EverestNER, DanfeNER and CoNLL-2003: they are in none of its rows, its teacher was trained without them, and its vocabulary was chosen without them. What remains of them that is not data is said on the card of Rakshya 1.1.
| Rakshya 1.1 Lite | Rakshya 1.1 | |
|---|---|---|
| 8-bit file | 29.8 MB | 40.8 MB |
| 32-bit weights | 117 MB | 160 MB |
| Layers | 6 | 12 |
| Median per text of news in a browser, 1 thread | 23 ms | 50 ms |
| Median per sentence with ONNX Runtime, 1 thread | 6.3 ms | 13.4 ms |
The two models were timed one after the other, twice each, on Intel Core i5-13420H: in headless Chromium on 175 texts of Nepali news, and with ONNX Runtime on sentences of 21 tokens. The Lite model takes 46 percent of the time of Rakshya 1.1 in the browser. In headless Chromium its 8-bit file gives the same spans as Python on every one of the 1,792 test texts.
labels="personal", only dates of birth are marked among dates. Other
dates are returned as DATE under labels="all" and stay in the text under
labels="personal".The model weights and the files that describe them are licensed under the
Apache License, Version 2.0. The
code that runs them is at github.com/fiste-ai/rakshya under the MIT
License. See LICENSE.md and NOTICE.md, which names the training sets and their
terms.
Fiste AI. Rakshya 1.1: personal data detection in Nepali, Hindi and English.
2026. https://huggingface.co/fiste-ai/rakshya
model.safetensors 112 MiBonnx/model_quantized.onnx 28 MiB