Today, Panha AI introduces Bayon, a 100-million-parameter Khmer-focused language model developed to explore a different approach to language modeling for underrepresented languages: instead of adapting a general-purpose multilingual model, what happens when a model is designed around Khmer from the beginning?
Khmer remains underrepresented in large-scale language modeling. General-purpose models often allocate most of their vocabulary and training capacity to higher-resource languages, leaving Khmer text inefficiently tokenized and vulnerable to unwanted cross-lingual interference. These problems are not simply a matter of model size. They also reflect how models represent, tokenize, and learn individual languages.
Bayon explores this problem through a combination of Khmer-specialized tokenization, filtered Khmer pretraining data, and linguistically constrained instruction tuning. The result is a compact model designed to investigate how far native-language specialization can go under limited computational resources.
Bayon is also part of Panha AI's broader work on sovereign Khmer AI, alongside the development of open datasets, training resources, evaluation benchmarks, and infrastructure that allow other researchers and developers to build their own Khmer language models.
Designing Around Khmer
A central design decision in Bayon is its tokenizer.
Most general-purpose language models use shared vocabularies designed to accommodate many languages and writing systems. For languages with less representation in their training data, this can result in excessive subword fragmentation, increasing the number of tokens required to represent the same text.
Bayon instead uses a custom 5,000-token Khmer-focused BPE vocabulary, with byte fallback to preserve representability for characters outside its learned vocabulary.
The tokenizer was developed using a source corpus containing approximately 2.42 million documents and 5.12 billion characters, of which 94.69% were Khmer characters.
On this corpus, Bayon produces approximately 1.389 billion tokens, compared with 6.021 billion using Qwen2.5's tokenizer and 3.057 billion using o200k_base.
This represents a 4.33× reduction in token count against Qwen2.5 and a 2.20× reduction against o200k_base.
These measurements are based on the tokenizer's development corpus rather than a held-out evaluation set. We also tested three representative Khmer passages, where Bayon required between 1.65× and 4.49× fewer tokens than the comparison tokenizers.
Training Bayon
Bayon was pretrained on a filtered Khmer corpus derived from FineWeb-2. The final pretraining dataset contains approximately 1.361 billion tokens, providing the model with its foundational Khmer language exposure.
The model uses a Gemma-inspired architecture with 28 transformer layers, a hidden dimension of 512, and Grouped Query Attention with 8 query heads and 2 key-value heads.
Despite its 100M-parameter scale, the architecture was designed with edge deployment in mind, targeting environments with limited GPU memory.
Pretraining was conducted primarily on a mobile NVIDIA RTX 4050 with 6GB of VRAM. The training run lasted 96 hours on the RTX 4050, followed by another 3 hours on an H100. Training was intentionally stopped at step 18,000 rather than the planned 50,000 steps, reaching a validation loss of 2.54 and perplexity of 12.7.
Following pretraining, Bayon underwent supervised fine-tuning using 18,000 Khmer instruction-tuning pairs covering conversational exchanges, cultural question answering, and story generation.
The instruction data was generated using Gemini teacher models under explicit linguistic constraints, followed by script filtering and deduplication. The fine-tuning stage used LoRA and required just 2.5 additional hours on the RTX 4050.
Evaluating Language Consistency
One of Bayon's primary research objectives is reducing language bleeding: the unprompted appearance of foreign scripts and characters in generated Khmer text.
To measure this, we introduce the Language Bleed Ratio (LBR), a token-level metric that measures the proportion of generated tokens containing characters outside the defined Khmer Unicode ranges.
On our 201-question Khmer historical and regional QA benchmark, Bayon achieved an LBR of just 0.06%, corresponding to 13 non-Khmer tokens among 21,031 generated tokens across three evaluation passes.
An important control experiment evaluated Bayon's pretrained checkpoint before instruction tuning. Using the same tokenizer and evaluation protocol, its LBR was 80.59%.
This comparison provides evidence that the tokenizer alone does not account for Bayon's low post-training LBR. The instruction-tuning stage was associated with a substantial reduction in non-Khmer script output.
However, LBR measures script consistency, not grammatical quality, factual accuracy, or naturalness. It should be interpreted as one dimension of Khmer generation rather than a general measure of language capability.
Task Evaluation
We also evaluated Bayon's ability to answer Khmer historical and regional questions.
On the 201-question benchmark, Bayon obtained 15 correct answers, compared with 4 for Qwen2.5-0.5B-Instruct.
Bayon's evaluation required a question to be answered correctly in at least two of three independent passes. Other models were evaluated once.
These results are preliminary. The benchmark is limited in size and scope, and the evaluation protocols are not fully symmetric. The results suggest improved localized task behavior following instruction tuning, rather than broad Khmer factual competence.
Availability
Bayon's model weights, training code, and evaluation resources are available through the following repositories:
Model: Bayon on Hugging Face
Code and research: AACL-IJCNLP 2026 Repository
For details about the research, see our AACL-IJCNLP 2026 paper:
Small Model, Native Design: Exploring Linguistic Purity and Reduced Language Bleeding in a 100M Khmer Language Model.
For a concise summary of Bayon's architecture, compute requirements, and evaluation results, see the Bayon model card.