savitr โ€” terse electoral-roll OCR (distilled Surya)

gojiberries/savitr is datalab-to/surya-ocr-2 (650M Qwen3.5-VL-style OCR) self-distilled to read Indian electoral-roll pages and emit one compact, pipe-delimited line per voter instead of verbose HTML:

epic|name|relation(F/H/M)|relative_name|house|age|sex

That is ~5ร— fewer decode tokens than the HTML output, so it runs ~2.7ร— faster end-to-end at the teacher's accuracy. Converted to MLX 8-bit for Apple Silicon.

Usage

pip install savitr
savitr ocr roll.pdf --terse          # auto-downloads this model
from huggingface_hub import snapshot_download
from savitr import MLXSuryaOCR, parse_terse
from savitr.rolls.parse import TERSE_PROMPT
path = snapshot_download("gojiberries/savitr")
eng = MLXSuryaOCR(path, prompt=TERSE_PROMPT)
voters = parse_terse(eng.ocr_image("page.png")[0])

How it was trained

Teacher = full Surya (surya-ocr-2) OCRs roll pages to HTML; a parser cleans them into terse targets; the model is LoRA-fine-tuned on (page image โ†’ terse rows) โ€” 450 pages drawn from constituencies held out of the eval, 1 epoch, for $0 on a free Kaggle T4. The terse format is the only behavioral change โ€” reading ability is inherited from Surya.

Evaluation (out-of-sample, vs the Surya teacher)

Held-out constituencies never seen in training (37 pages, 1,076 teacher voters):

Field Fidelity Field Fidelity
voter recall 99.3% relative name 96.2%
EPIC 97.2% relation code (F/H/M) 97.9%
name 96.2% house 98.8%
age 97.5% sex 98.2%

Per-voter record similarity 98.7%, whole-page similarity 92.9% (1 โˆ’ normalized edit distance). Fidelity = agreement with the teacher's output; absolute accuracy โ‰ˆ these ร— Surya's own ~93โ€“95%.

Limitations

v0.2 (450 training pages, AC-holdout). All fields are teacher-grade out-of-sample โ€” EPIC, house, age, sex, the relation code, names, and recall all 96โ€“99% (the relation code, the weak spot of the earlier 77-page model, is now 98%). Trained on Manipur 2025 English rolls; other states/scripts are out of distribution. Pair with savitr's value-anchored parse_terse, which stays column-aligned even when the model drops a field.

License & attribution

Derived from datalab-to/surya-ocr-2; its license governs use of these weights. savitr's code is MIT. Electoral rolls are public records published by the Election Commission of India.

Downloads last month
16
Safetensors
Model size
0.3B params
Tensor type
BF16
ยท
U32
ยท
MLX
Hardware compatibility
Log In to add your hardware

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for gojiberries/savitr

Quantized
(7)
this model