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 αž“αŸ…αž₯ទូវ

architecture

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

benchmark

  • 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

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}
}
Downloads last month
385
Safetensors
Model size
0.3B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for muyleanging/Akkhara-ByT5-Small-Khmer

Finetuned
(348)
this model

Dataset used to train muyleanging/Akkhara-ByT5-Small-Khmer

Space using muyleanging/Akkhara-ByT5-Small-Khmer 1

Collection including muyleanging/Akkhara-ByT5-Small-Khmer