Downloads · 30 days
0
Msok99/km-improved-22k-v4
km-improved-22k-v4 is a machine learning model from Msok99. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
The KM Improved 22K V4 is an upgraded version of the KM Improved 22K tokenizer. It refines the Khmer subword segmentation process for higher morphological accuracy, improved reconstruction, and better efficiency on co…
Downloads · 30 days
0
Access
Public
Updated Oct 9, 2025
Repo size
759 KB
Likes
0
Public
Click a slice to open those files.
Other760 KB · 50%
From the Hugging Face model README
The KM Improved 22K V4 is an upgraded version of the KM Improved 22K tokenizer.
It refines the Khmer subword segmentation process for higher morphological accuracy,
improved reconstruction, and better efficiency on complex Khmer text — including
literature, religious content, and formal writing.
Msok99/km-improved-22k| Category | Avg Tokens | Chars/Token |
|---|---|---|
| Formal News | 12.0 | 4.84 |
| Academic / Education | 10.4 | 5.09 |
| Proverbs / Idioms | 5.7 | 8.12 |
| Religious Texts | 8.3 | 5.23 |
| Business / Finance | 11.6 | 4.15 |
| Technical / Scientific | 13.2 | 4.39 |
| Complex Sentences | 45.0 | 4.53 |
| Average Efficiency | — | 4.42 chars/token |
For mixed-language text (Khmer + English), use Msok99/lfm2-khmer-merged-18k
to ensure balanced handling of both alphabets.
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("Msok99/km-improved-22k-v4")
text = "ព្រះសង្ឃចេញធ្វើសូត្រមុនព្រះអាទិត្យរះ។"
tokens = tokenizer.tokenize(text)
print(tokens)
print(tokenizer.decode(tokenizer.encode(text)))