Akkhara-ByT5-Small-Khmer (0.3B)
Akkhara converts Sing Khmer (Khmer typed with Latin letters, as in chat) into Khmer script and returns a ranked top-5 list, like a typing assistant (IME). This is the bigger, most accurate Akkhara model on formal text; the small akkhara-mini runs on phones.
| input | output (#1) |
|---|---|
nh jg tv sala rean | ខ្ញុំចង់ទៅសាលារៀន |
sl oun nah | ស្រឡាញ់អូនណាស់ |
sok sbay ot haha bro nv alov | សុខសប្បាយអត់ haha bro នៅឥឡូវ |

Benchmark
Both Akkhara models on the same tests (same beam search, 5 beams): a held-out test split
(7,821 sentences), 39 real chat sentences typed and labeled by a native speaker, 86 context tests
(the same chat word read from its neighbours, e.g. ng = និង / នឹង / ហ្នឹង) and 7 glued-word tests.
| model | test top-1 | test top-5 | test CER | real chat top-1 / top-5 | context #1 / top-5 | glued |
|---|---|---|---|---|---|---|
| akkhara-mini (18M) | 57.9% | 76.6% | 4.55% | 87% / 95% | 81 / 99% | 7/7 |
| akkhara-byt5-small (300M) | 62.0% | 79.7% | 3.73% | 87% / 95% | 80 / 98% | 7/7 |

- Formal news-style text: this model is the most accurate (lowest CER).
- Real chat: both models get 85–87% of sentences right at #1 and 92–95% in the top-5, and 80–81 of 86 context words.
!in chat (jom! loy mes→ ចុម! ឡូយម្ល៉េះ), English chat words (send link,benchmark) and chat abbreviations (tmr→ ស្អែក,sry→ សុំទោស,btw→ ម្យ៉ាងទៀត) are handled.- CER = share of wrong letters (lower is better). Top-5 = the right sentence is among the 5 suggestions.
Use
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_id = "muyleanging/Akkhara-ByT5-Small-Khmer"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
texts = ["nh jg tv sala rean", "sl oun nah"]
inputs = tokenizer(texts, return_tensors="pt", padding=True)
outputs = model.generate(**inputs, num_beams=5, num_return_sequences=5, max_new_tokens=128)
candidates = tokenizer.batch_decode(outputs, skip_special_tokens=True)
for i, text in enumerate(texts):
print(text, "→", candidates[i * 5:(i + 1) * 5])
For live typing, cut long input into ~6-word chunks and cache finished chunks.
Model details
- Developed by: Ing Muyleang
- Model type: byte-level T5 encoder–decoder (fine-tuned from google/byt5-small)
- Parameters: 299.6M · License: Apache-2.0
- Language: Khmer (km); English chat words in mixed input stay English
- Training data: Sing Khmer → Khmer pairs collected, generated, cleaned and checked by the author with AI tools (agy, Claude); see muyleanging/Akkhara-Sing-Khmer (access on request).
- Demo: muyleanging/Akkhara-Demo
- Keyboard app: github.com/MuyleangIng/akkhara-keyboard
Limits
- Trained mostly on synthetic pairs; the real-chat test set is small (39 sentences).
- Short abbreviations are ambiguous (
ng,mn,dl,bn); the right answer is often in the top-5. - It knows rude chat words (they occur in real chat).
Contact
Training details (hardware, time, settings) are not published. Questions: contact the author through the Hugging Face profile or GitHub.
Citation
@misc{ing2026akkhara,
author = {Ing, Muyleang},
title = {Akkhara: a byte-level Sing Khmer to Khmer script transliteration model},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/muyleanging/Akkhara-ByT5-Small-Khmer}
}