# Lekhani, Hindi typing in 0.87 MB that runs on your own device

Canonical: https://udgamlabs.com/blog/lekhani · Updated: 2026-10-30

> Lekhani turns Hindi typed in English letters into Devanagari, from a 0.87 MB download that runs in your browser. 7 points over IndicXlit's model with 14× fewer parameters.

Release · 2026-10-30 · By Jitesh K Prasad

A lot of Hindi is typed in English letters: "kaise ho", "aaj office mein meeting hai". Turning that into Devanagari,
कैसे हो and आज ऑफिस में मीटिंग है, is called transliteration. The tools that do it well usually run on a server, or carry
a word list of hundreds of megabytes.

Lekhani is our attempt to do it from a file small enough to sit inside a web page: **0.87 MB in all, running on your
own device, so nothing you type is sent anywhere**. *Lekhani* (लेखनी) is Hindi for "pen".

<Film src="https://udgamlabs.com/models/lekhani/lekhani-explainer.mp4" poster="/models/lekhani/lekhani-explainer.jpg" caption="Lekhani in 75 seconds: what it does, why it is hard, why the size matters, and where it falls short. Every Hindi word on screen is Lekhani's own output." />

## What we built

- **A small model:** an encoder-decoder transformer with 811,904 parameters (2 + 2 layers, width 128), trained from
  random weights and stored at 4 bits.
- **A word list:** 200,000 common Hindi words, released under CC0.
- **A runner:** 5 KB of JavaScript with no dependencies. It runs in any modern browser, or in Node 18 and newer.
- **871,248 bytes to download in total.** In Chromium on a Mac mini it starts in 0.2 s once the files are downloaded,
  uses about 23 MB of memory and takes 18 ms a word.
- **Open:** Apache-2.0 for the model and the runner, CC0 for the word list.

## Why it is harder than it looks

There is no single way to write a Hindi word in English letters. People type the same word in many ways, and a
transliterator has to land on the one right spelling. These are Lekhani's own outputs:

| What people type | Lekhani writes |
|---|---|
| kaise · kaisay · kaisey | कैसे |
| nahi · nahin | नहीं |
| pyaar · pyar | प्यार |
| zindagi · jindagi | जिंदगी |
| office · meeting | ऑफिस · मीटिंग |

English words used in Hindi matter as much as Hindi ones, because that is how people chat.

## How it fits in 0.87 MB

The model reads a word letter by letter and proposes its 8 best spellings. The word list then moves a common real word
up when the model is unsure. A word that is not in the list, such as a name, still works from the model alone; the
list only re-ranks the model's choices.

The model learned from about 4.3 million pairs of romanised and Devanagari words. They come from AI4Bharat's Aksharantar
(its CC0 and CC-BY parts) and from a teacher: AI4Bharat's IndicXlit wrote the many ways people type common Hindi words,
and the Hindi spellings of English words. No test word was in the training pairs.

## The result

> **Result.** 7 points more than IndicXlit's model on its own, with 14× fewer parameters. IndicXlit's full package is still ahead, with a word list about 400 times the size of all of Lekhani.

We scored every system ourselves on the Aksharantar Hindi test: 9,991 romanised words, top-1 exact match against any
reference spelling, one script and the same words for every system, measured on 28 October 2026.

| System | What you download or hold | Aksharantar Hindi | Hinglish chat set (of 122) |
|---|---|---|---|
| **Lekhani** | **0.87 MB** | **65.9%** | **112** |
| IndicXlit, model on its own | 11.5M parameters | 58.9% | 102 |
| IndicXlit, full Python package | the model + a 4.2M-word list, 358 MB in memory | 68.7% | 112 |

- **Against IndicXlit's model on its own: +7.0 points** (paired 95% interval +6.1 to +8.0).
- **Against IndicXlit's full package: -2.8 points** (-3.6 to -2.1). The package is more accurate, if you can hold its
  358 MB word list.
- **The Hinglish chat set** is our own: 122 words people type in chat, checked word by word by a native Hindi speaker.
  Lekhani gets 112, level with IndicXlit's package. It is too small to call a few words' difference.
- **Every other open transliterator we ran** on the same test, word by word, scored far lower. The best was a 15M model
  at 48.6%.

## Why the size matters

The AI models you hear about are huge and run in data centres. A transliterator that lives in a web page or an app
needs the opposite: it should load in a blink, work without a server, and keep what people type on their own device.

At 0.87 MB, Lekhani is small enough to add to a search box, a form, a chat app or a notes page without a backend, and
it keeps working offline once it has loaded. The model gives every user its 8 candidates, so a keyboard can show the
runners-up as suggestions.

## Where it falls short

- **About one word in three on this test is wrong at top-1.** The test is hard, with many rare words and names. On
  everyday chat words it does much better (41 of 44 in our chat set), but it still makes mistakes there.
- **Some common words come out wrong:** `acha` becomes अच् (it should be अच्छा; `accha` works), `kal` becomes काल (कल is
  its second choice), and `delhi` becomes देल्ही (it should be दिल्ली).
- **No sentence context.** It writes one word at a time, so `main` (I) and `mein` (in) both become में. One tap on a
  suggestion fixes it.
- **IndicXlit's full package is 2.8 points more accurate** on the main test.
- **Hindi only**, Latin letters to Devanagari only. Speed is measured on one Mac mini; phones are not measured yet.

## Try it

- In your browser: [udgamlabs.com/models/lekhani](https://udgamlabs.com/models/lekhani#try)
- Model and files: [huggingface.co/udgamlabs/Lekhani](https://huggingface.co/udgamlabs/Lekhani)
- Code and examples: [github.com/udgamlabs/lekhani](https://github.com/udgamlabs/lekhani)

If you type Hindi in English letters, tell us which words it gets wrong; they are what we want to fix next.

Thank you to AI4Bharat for Aksharantar, IndicXlit and IndicCorp, which this work stands on, and to the CMU Pronouncing
Dictionary for English words.

---

## About Udgam Labs

Udgam Labs is an independent AI research lab. We work from first principles: before we build, we understand why things work, whether we are training a model, fine-tuning one or applying AI to a new problem. Today that means open models such as Gargi, a 384M-parameter language model that comes within 2 points of Qwen2.5-0.5B on three reasoning benchmarks with about 1,000× less training data. Next come products, custom models for businesses, and AI in the physical world. Udgam (उद्गम) is Sanskrit for origin.

Udgam Labs · AI research from first principles · https://udgamlabs.com
