The world’s 3rd most spoken language, typed on the world’s most used keyboard. In under 8 MB.
Hindi typed in English letters → Devanagari, fully offline. Context-aware, as you type. The whole thing is under 8 MB, starts typing at 0.6 MB and runs inside this tab; nothing you write ever leaves your device.
in the world
(first or second language)
no server and no GPU
Source: Ethnologue 200, 2026 (29th edition, SIL Global). Speaker counts include second-language speakers.
By the numbers
Each tile is generated by the release build from measured results and appears only if its rule holds.
All measured results
| Result | What | Details |
|---|
Same input, typed casually
Left: a real phone screenshot of a popular keyboard (supplied by the author, cropped to its text lines, text unaltered). Right: AksharaLP v2 in this tab, offline. Measured 2026-11-01.
Computed live by the released runtime.
Standard Hindi spelling: बहुत अच्छे है भाई. Words in standard spelling: keyboard 1 of 4, AksharaLP v2 3 of 4; AksharaLP v2 writes बोहत (standard: बहुत). One sentence, shown as a showcase: not a test or tuning item and not an accuracy measurement.
Try an example
Every preview below is computed live by the model in your browser.
What it brings on-device
No server in the loop. Every example below is computed right now, inside this page.
Small model. Serious accuracy.
Built for keyboards, chat apps and browsers where every kilobyte and millisecond counts.
Fits where big models can’t
Download size of the core and of core + dictionary versus a widely used open transliteration model.
Accuracy, measured
Aksharantar Hindi test set (9,991 romanized words) for top-1/3/8, and the Dakshina Hindi sentence test (4,976 sentences) for whole-sentence word accuracy; the same scoring script for every system. Brackets are 95% bootstrap intervals; — means not measured.
| System | Download | Top-1 % | Top-3 % | Top-8 % | Sentences word % |
|---|---|---|---|---|---|
| AksharaLP-1M-v2 · core + dictionary pack | 7.92 MB | 70.04[69.16–70.90] | 88.31 | 93.63 | 89.02 |
| AksharaLP-1M-v2 · core only | 0.57 MB | 56.01[55.06–56.96] | 76.91 | 85.09 | 70.23 |
| IndicXlit full package | 404 MB | 69.33[68.44–70.23] | 85.40 | 88.29 | — |
| IndicXlit model only | 46.0 MB | 59.16[58.14–60.13] | 79.95 | 88.29 | 67.55 |
| AksharaLP-1M (v1) | 4.53 MB | 70.37[69.50–71.26] | 87.66 | 92.79 | 87.55 |
Our training pairs contain no Aksharantar test or validation native words (checked). The 3M-word dictionary pack is built from IndicCorp v2 text and naturally contains most test words: with every test reference word removed from the dictionary the same system scores 16.37% top-1 (42.51% top-3, 70.33% top-8), and the core alone scores 56.01% top-1. All tuning, the reranker fits, the dictionary size and the sentence weights used validation and internal dev data only; each test number comes from a single run.
Chat spelling, handled
Hand-written chat-style sentences (h, nhi, bht, thk, dropped vowels, stretched letters): held-out half of an internal dev set, never used for fitting. Word accuracy per spelling pattern, v1 vs v2.
| Spelling pattern | Example | Sentences | v1 word % | v2 word % |
|---|---|---|---|---|
| Single letter for a doubled consonant | acha theek hai | 26 | 79.3 | 92.4 |
| Extra doubled letters | tumm kahan ho | 25 | 95.2 | 98.4 |
| Missing h in kh / th / bh | kana bana do | 26 | 54.2 | 71.2 |
| Extra h | thera naam kya hai | 25 | 76.4 | 85.5 |
| Long / short vowel spelling | khana khaya | 26 | 85.7 | 96.4 |
| e for ai | kese ho | 25 | 89.3 | 96.4 |
| o for au | kon hai | 25 | 70.5 | 84.1 |
| Dropped or added a | karna hai | 25 | 76.9 | 97.4 |
| Dropped vowels | kya kr rhe ho | 25 | 62.5 | 90.0 |
| Missing nasal (n) | mai ghar ja raha hu | 25 | 70.0 | 86.0 |
| w / v, z / j, f / ph | vo kaun hai | 26 | 97.8 | 100.0 |
| s for sh | sukriya | 25 | 72.7 | 86.4 |
| ri / ru for ऋ | krupya dhyan de | 26 | 96.4 | 100.0 |
| Word-final y / h endings | hy na | 25 | 55.3 | 83.0 |
| Stretched letters | haaan | 25 | 75.0 | 82.1 |
| Chat abbreviations (h, nhi, yr) | ok yr | 25 | 45.8 | 91.7 |
| English words in Hindi chat | phone karo | 25 | 96.8 | 98.4 |
| Ambiguous short words | ghar main hai | 25 | 94.9 | 93.6 |
| Standard spelling (control) | mera naam rahul hai | 25 | 97.9 | 97.9 |
| All chat-spelling sentences | 480 | 80.2 | 91.5 |
480 sentences. Overall word accuracy 80.16% → 91.54% (paired bootstrap gain +11.38 points, 95% CI 9.14 to 13.71); whole-sentence exact match 62.92% → 82.50%. Internal set written by the author; small per-pattern counts, so per-row numbers are indicative.
Three lines of JavaScript
Load the 0.57 MB core, start typing, and let the 7.35 MB dictionary pack download once in the background. It is cached by the browser (Cache API), so later visits work offline.
import { AksharaLP } from "https://huggingface.co/sourojitdotcom/AksharaLP-1M-v2/resolve/main/aksharalp.mjs";
const aklp = await AksharaLP.load("https://huggingface.co/sourojitdotcom/AksharaLP-1M-v2/resolve/main/", { dict: false }); // core: usable now
aklp.loadDict(); // dictionary pack: fetched once, cached, attached when ready
aklp.transliterate("Boht ache h Bhai").output; // → बोहत अच्छे है भाई
How it works
- 1Generate
A 4-bit character Transformer (the core) proposes spellings. With the dictionary pack attached it also searches a lexicon trie and consonant-skeleton matches, and adds acronym and spelling-variant candidates.
- 2Rerank
A tiny learned reranker scores every candidate with model, lexicon and frequency features.
- 3Decide in context
With the dictionary pack, a compact word-bigram language model chooses the best sentence, e.g. मैं vs में. Without it, each word keeps its top-ranked spelling.
License & attribution
Free for commercial use. Credit AksharaLP and Sourojit Dhua when you ship it.
Commercial use allowed
Use, modify and ship the model and runtime in commercial products, free of charge, under the Apache License 2.0.
Attribution required
Apache-2.0 §4(d): every redistribution or derivative (apps, web pages, extensions, SDKs, fine-tuned or converted models) must include the NOTICE file. The runtime keeps its /*! … */ header, including when minified.
Transliteration by AksharaLP (Sourojit Dhua) — https://huggingface.co/sourojitdotcom/AksharaLP-1M-v2
Hindi typing powered by <a href="https://huggingface.co/sourojitdotcom/AksharaLP-1M-v2">AksharaLP by Sourojit Dhua</a>
@software{dhua_aksharalp_2026,
author = {Dhua, Sourojit},
title = {AksharaLP: Tiny, Context-Aware Hindi Transliteration for the Browser},
year = {2026},
url = {https://huggingface.co/sourojitdotcom/AksharaLP-1M-v2},
license = {Apache-2.0}
}