--- license: apache-2.0 new_version: sourojitdotcom/AksharaLP-1M-v2 language: - hi - en pipeline_tag: translation tags: - transliteration - hindi - devanagari - romanized-hindi - on-device - browser - javascript - tiny - indic - input-method - keyboard - offline - aksharalp datasets: - ai4bharat/Aksharantar - ai4bharat/IndicCorpV2 metrics: - accuracy - cer model-index: - name: AksharaLP-1M results: - task: type: translation name: Romanized Hindi → Devanagari transliteration (word level) dataset: type: ai4bharat/Aksharantar name: Aksharantar (Hindi test) split: test metrics: - type: accuracy name: Top-1 accuracy value: 70.37 - type: accuracy name: Top-3 accuracy value: 87.66 - type: accuracy name: Top-8 accuracy value: 92.79 - task: type: translation name: Romanized Hindi → Devanagari transliteration (sentence level) dataset: type: google/dakshina name: Dakshina (Hindi romanized sentences) split: test metrics: - type: accuracy name: Word accuracy value: 87.55 - type: exact_match name: Sentence exact match value: 21.66 - type: cer name: CER value: 4.81 ---
Hindi typed in English letters → Devanagari, fully offline.
### Why it matters | 🌏 **#3** | 🗣️ **611M** | 📦 **4.5 MB** | |:---:|:---:|:---:| | most spoken language in the world | people speak Hindi (first or second language) | is all it takes to type it — no server, no GPU | Source: Ethnologue 200 (Ethnologue: Languages of the World, 29th edition, SIL Global), 2026 — https://www.ethnologue.com/insights/ethnologue200/ (accessed 2026-10-31). Counts first- and second-language speakers. On a Latin (QWERTY) keyboard, Hindi is often typed in English letters: *“kal meeting hai, kaise ho?”*. AksharaLP-1M turns that into proper Devanagari — accurately, in context, and entirely offline in the browser. It transliterates (changes the script); it does not translate. AksharaLP-1M is the 989K-parameter member of the **AksharaLP** family of tiny transliteration models. For *“kal meeting hai, kaise ho?”* AksharaLP writes **कल मीटिंग है, कैसे हो?**, the way a Hindi speaker would. It ships in two tiers: a **0.57 MB core** (character Transformer with 989K parameters, reranker and runtime) that works on its own, and a **3.97 MB dictionary pack** (1.5M-word lexicon and sentence language model) that the runtime fetches on first use and caches. The complete package is **4.53 MB** to download. The complete package is **5× smaller** than the model weights of IndicXlit, the most widely used open Indic transliteration model, and **47× smaller** than IndicXlit with its rescoring dictionary — while scoring **higher top-1 than both** on Aksharantar (70.37% vs 59.16% for the model and 69.33% for the full package; the gap to the full package is within overlapping 95% CIs).
Recorded from the live demo: inference runs in a Web Worker in the browser tab.
|
### ✈️ Fully offline
No network after the first load, so it keeps working in airplane mode, in a lift, or on a train.
`flight mein hoon, land karke call karta hoon` → **फ्लाइट में हूं, लैंड करके कॉल करता हूं** |
### 🔒 Private by design
Text never leaves the device: no API call, no logging server. Suited to banking, health and personal chat.
`mera account balance kitna hai` → **मेरा अकाउंट बैलेंस कितना है** `doctor ne din mein do baar dawai lene ko kaha` → **डॉक्टर ने दिन में दो बार दवाई लेने को कहा** |
### 🌐 Runs wherever JavaScript runs
A browser tab, an Android or iOS WebView, an installable PWA, or Node.js. CPU only: no GPU, no server, no inference bill.
`namaste, aapka swagat hai` → **नमस्ते, आपका स्वागत है** |
|
### ⚡ Real-time, as you type
The sentence is re-decoded on every keystroke in a Web Worker, and earlier words are corrected as context arrives:
`main` → मैं `main theek` → मैं ठीक `main theek hoon` → **मैं ठीक हूं** Browser latency: 219.7 ms per word (p50) on an 8-vCPU Intel Xeon cloud VM (headless Chrome 156, Linux). |
### ⌨️ Keyboard & input-box integration Wire it to any `` or ` |
### 🏷️ Brands your way
English words inside Hindi sentences are transliterated by the same model. Two writing styles for the same input:
Default → **कल व्हाट्सएप पे मीटिंग है** Strict (brands stay in Latin) → **कल whatsapp पे मीटिंग है** |
| ### ☰ Top-k suggestions Ranked candidates for every word, ready for a suggestion bar or candidate picker. Picking one re-decodes the rest of the sentence. `main` → मैं · मैन · मेन · माइन · में |
### 📶 Built for Bharat
A 0.57 MB core to start, 4.53 MB in total, downloaded once and cached; after that, patchy or missing connectivity does not matter. Pure JavaScript on the CPU, with no GPU or native code, designed with entry-level Android phones in mind.
`signal nahi aa raha, baad mein baat karte hain` → **सिग्नल नही आ रहा, बाद में बात करते हैं** |
### ₹0 per call at scale
Inference runs on your users’ devices, so there are no per-request API fees and no GPU servers to scale. Serving is static files from any CDN. Apache-2.0: free for commercial use.
`mera order kab tak deliver hoga` → **मेरा ऑर्डर कब तक डिलीवर होगा** |
70.4%top-1 — higher than IndicXlit (model only) (59.2%)at 5× smaller · Aksharantar Hindi test | 70.4%top-1 — higher than IndicXlit (full package) (69.3%)at 47× smaller · Aksharantar Hindi test | 8.1 pts/MBhighest top-1 accuracy per MB among compared modelsnext: IndicXlit (model only) at 1.28 pts/MB |
87.7%right word in the first 3 suggestions — vs 59.2% top-1 for IndicXlit (model only)Aksharantar Hindi test | 87.7%right word in the first 3 suggestions — vs 69.3% top-1 for IndicXlit (full package)Aksharantar Hindi test | 5×smaller than IndicXlit (model only)8.69 MB vs 46.0 MB on disk (fp32 weights) |
47×smaller than IndicXlit (full package)8.69 MB vs 404 MB on disk (fp32 weights + 358 MB rescoring dictionary) | 219.7 msper word (p50) in the browseran 8-vCPU Intel Xeon cloud VM (headless Chrome 156, Linux) | 4.53 MBcomplete downloadcore + 1.5M-word dictionary pack · 989K parameters |
0.57 MBto start typingthe core works on its own (53.4% top-1 without the pack); the dictionary pack streams in after and is cached |



