LIPI — compact Hindi Devanagari → Roman transliteration
LIPI romanizes Hindi the way people actually type it — natural "Hinglish" spellings for messaging, search, dictation, and social media — with a 534,314-parameter non-autoregressive akshara-CTC model built for CPU and edge inference.
नमस्ते दुनिया → namaste duniya
कैसे हो दोस्त → kaise ho dost
A Hindi-only model ~20× smaller than the standard multilingual baseline (IndicXlit, 11 M), LIPI matches it on standard transliteration and is far stronger on naturally typed Hindi.
Model details
| Property | Value |
|---|---|
| Parameters | 534,314 |
| Architecture | codepoint-composed akshara encoder → learned slot expansion → 2-layer BiGRU → CTC |
| Source / target vocab | 87 / 42 |
| Max codepoints per cluster | 16 · slots per akshara 6 · model dim 96 · GRU hidden 128×2 |
| Decoding | greedy CTC (default); optional prefix beam |
| Size | fp32 2.2 MB · dynamic int8 ~0.57 MB |
| Framework | PyTorch (custom runtime, not transformers) |
| SHA-256 | ea5013c9… · seed 20260814 · PyTorch 2.6.0 / Python 3.11 |
Usage
LIPI ships a small runtime (the lipi package),
not a transformers pipeline.
pip install torch huggingface_hub
pip install git+https://github.com/ABHISHEKgauti25/lipi.git
from huggingface_hub import snapshot_download
from lipi import Transliterator
model_dir = snapshot_download("abhishekgautamm/lipi") # weights + configs
t = Transliterator(model_dir=model_dir) # backend="lipi"
t.transliterate_text("नमस्ते दुनिया") # "namaste duniya"
t.transliterate_word("एक्सप्रेस") # "express"
Benchmarks
Standalone LIPI vs. IndicXlit (11 M) and ITRANS (rule-based) on held-out test splits, one consistent harness. Higher is better for accuracy; lower for CER.
| Benchmark (test) | Metric | LIPI | IndicXlit | ITRANS |
|---|---|---|---|---|
| FIRE 2013 (typed search) | exact | 72.48 | 34.83 | 43.84 |
| Aksharantar | exact | 40.73 | 39.67 | 11.82 |
| Dakshina words | in-attested | 77.76 | 73.04 | 26.68 |
| Dakshina sentences | word-match | 65.63 | 32.97 | 30.07 |
| IndoNLP 2025 (Set 1) | word-match | 66.24 | 32.96 | 31.68 |
| FIRE 2013 | CER ↓ | 8.31 | 21.17 | 20.32 |
Dev + test with all metrics: see the GitHub benchmarks.
Training data & evaluation integrity
LIPI is trained on a usage-ranked lexicon built train-only from open resources (Aksharantar train, Dakshina train lexicon, Xlit-Crowd), ranked by attestation plus a Roman-usage prior from L3Cube-HingCorpus (train split). No development or test material from any benchmark is used in training, and dataset-intrinsic train↔test vocabulary overlap is ≈ 0 — so the numbers above are genuinely held out.
Optional: lexicon-first deployment
This repo also ships lipi_map.json (~45 MB), a curated exact-lookup lexicon. For
deployments that want frequent forms canonicalized at full coverage, use the map_lipi
backend (lexicon first, LIPI on a miss):
t = Transliterator(backend="map_lipi", model_dir=model_dir,
map_path=f"{model_dir}/lipi_map.json")
t.transliterate_text("मैंने कहा कि भारत महान है") # "maine kaha ki bharat mahan hai"
The lexicon is training-data-derived and is not part of LIPI's reported benchmarks.
Limitations
- Multiple Roman spellings can be valid (
nahi/nahin); strict exact-match undercounts. - Schwa deletion and context-dependent forms are hard; transliteration is per-token.
- Proper names, rare words, and borrowings may romanize unexpectedly.
- Output style reflects the training distribution and annotator preferences. Not a formal ISO/IAST/ITRANS romanizer, a translator, or a Roman→Devanagari model.
License
CC BY-NC-SA 4.0 (NonCommercial, ShareAlike). LIPI is trained on data derived from Xlit-Crowd (CC BY-NC-SA 4.0) and Dakshina (CC BY-SA 4.0), so the weights and the lexicon inherit these terms. For commercial use, retrain on commercially-licensed data. Please attribute Dakshina, Xlit-Crowd, Aksharantar, and L3Cube-HingCorpus. The accompanying source code is Apache-2.0.
Citation
@software{lipi_2026,
title = {LIPI: A Compact Devanagari-to-Roman Transliteration Model for Natural Hindi},
author = {Gautam, Abhishek},
year = {2026},
url = {https://huggingface.co/abhishekgautamm/lipi}
}

