TL;DR
Sherkala-Chat (8B) is a new state-of-the-art, open-weight large language model specifically optimized for the Kazakh language. By expanding the vocabulary of Llama-3.1-8B, continually pretraining on 45.3 billion multilingual tokens, and applying localized instruction and safety tuning, the model drastically outperforms existing open models on Kazakh tasks while maintaining competitive English proficiency.
What Problem Does This Paper Address?
Despite being spoken by roughly 80% of Kazakhstan's 20 million residents, the Kazakh language remains severely underrepresented in natural language processing (NLP) research and resources. Large multilingual models like Llama-3.1 or Qwen possess impressive cross-lingual capabilities but remain heavily English-centric. Consequently, they often fail at knowledge-intensive and reasoning tasks specific to Kazakhstan's unique cultural, historical, and administrative context.
Building a high-performing LLM for a moderately resourced language like Kazakh presents a classic chicken-and-egg problem: high-quality data is scarce, making training from scratch impractical, while standard fine-tuning of English-centric models yields suboptimal token efficiency and poor local alignment. The authors introduce Sherkala (8B) and its instruction-tuned variant Sherkala-Chat (8B) to bridge this gap.
Methods
The development of Sherkala-Chat relies on a two-pronged strategy combining architectural adaptation with careful data curation:
- Tokenizer Expansion & Efficiency: The default Llama-3.1 tokenizer is highly inefficient for Kazakh text. The authors trained separate monolingual tokenizers and expanded Llama's vocabulary by 25% (adding frequent Kazakh tokens). To initialize these new embeddings smoothly, they used the Wechsel method—taking a weighted average of the top-5 most semantically similar existing tokens based on OpenAI's
text-embedding-3-largeembeddings. - Continual Pretraining: Starting from the Llama-3.1-8B base, the authors performed continual pretraining across 45.3 billion tokens. They integrated RoPE positional encodings and grouped-query attention to optimize performance.
- Instruction Fine-Tuning (SFT): The model was fine-tuned using the standard Llama-3.1-instruct template across a balanced multilingual mixture.
- Localized Safety Alignment: Beyond standard safety guardrails, the authors introduced a dedicated safety alignment stage to handle region-specific sensitive topics (e.g., local political nuances, regional historical controversies) in accordance with local ethical norms.
Datasets
The authors compiled a robust dataset mix for both training and evaluation:
- Pretraining Corpus (45.3B tokens): Consists of 19.45B Kazakh tokens (sourced from Wikipedia, CommonCrawl, CulturaX, news articles, and synthetic data translated from English Wikipedia), 19.45B English tokens, and 6.4B Russian and Turkish tokens.
- Instruction Tuning Dataset: Approximately 3.5M prompt-response pairs in Kazakh (translated sets + an internally curated native dataset called
CultSetandGovSet), 3.8M in English (Tulu V3 and JAIS data), and 263K in Russian (Grandmaster-PRO-MAX).
- Evaluation Benchmarks: A massive suite including native benchmarks like
KazMMLU(9.8K high-school level questions) andNIS Math, alongside localized variants of standard benchmarks (Hellaswag, BoolQ, TruthfulQA) translated and verified by native speakers.
Key Insights and Ideas
- The Multilingual Mix Sweet Spot: Simply flooding a model with target language data isn't always optimal. The authors experimented with different language ratios during pretraining. Interestingly, adding Russian and Turkish data alone actually reduced performance on Kazakh tasks, but introducing English alongside Kazakh unlocked powerful cross-lingual transfer. A 3:1:3 ratio (Kazakh : Russian/Turkish : English) yielded the highest accuracy.
- Halving Token Fertility: Token "fertility" measures the average number of subword tokens produced per word. By expanding the vocabulary, the authors cut Kazakh fertility by 56.8% (from 4.73 down to 2.04). This effectively halves the sequence length required to represent the same Kazakh text, resulting in a 2× speedup in computational efficiency during both training and inference.
- The Necessity of Localized Safety: Universal safety datasets fail to capture region-specific sensitivities. By building a custom safety dataset covering local historical events and societal concerns, the authors ensured the model behaves responsibly within its primary deployment context without over-refusing benign prompts.
Key Results
Sherkala-Chat (8B) established a new state-of-the-art benchmark for open Kazakh language models:
- Downstream Tasks: On Kazakh language benchmarks, the base
Sherkala (8B)achieved an average score of 45.7, outperforming the original Llama-3.1 (39.8) and the previous specialized model KazLLM-1.0 (43.7). With instruction tuning,Sherkala-Chat (8B)reached an outstanding 47.6 average score.
- Text Generation: Evaluated by GPT-4o as a judge, Sherkala-Chat consistently outperformed Qwen-2.5-7B-Instruct, Llama-3.1-8B-Instruct, and KazLLM-1.0 on Kazakh text generation tasks, particularly on localized government and cultural wiki datasets.
- Safety Metrics: In safety evaluations, Sherkala-Chat achieved a 91.9% safe response rate on Kazakh sensitive topics, matching the original Llama-3.1-Instruct and significantly beating KazLLM-1.0 (81.2%).
Limitations and Future Work
While Sherkala-Chat excels in Kazakh and English, the authors note a few key limitations:
- Russian Generation Bottleneck: Despite being trained on Russian tokens to reflect Kazakhstan's bilingual reality, the model struggles with complex Russian text generation, lagging behind multilingual giants like Qwen-2.5.
- Data Filtering Trade-offs: Due to the scarcity of Kazakh data, the authors had to apply less aggressive data filtering during pretraining than what is typically standard for English pipelines, which may introduce minor noise.
- Scope: The model is strictly optimized as a text assistant for Kazakh and English and should not be relied upon for high-stakes, zero-oversight decisions in legal or medical domains.
Summary updated