Large language models fragment Kazakh text into many more tokens than equivalent English text, because their tokenizers were built for high-resource languages. This tokenizer tax inflates compute, shortens the effective context window, and weakens the model's grip on Kazakh morphology. We propose to bypass the tokenizer entirely by feeding raw bytes through a small adapter that learns to speak the internal language of a frozen Qwen2.5-7B. Once the adapter is trained, we freeze it and fine-tune only the attention layers of Qwen on Kazakh text. Our central hypothesis is that this two-stage process -- first teach the interface, then adapt the model -- should match or exceed the accuracy of the original Qwen2.5-7B on standard Kazakh benchmarks. This report describes the ByteKaz architecture and training protocol. Empirical validation is ongoing; this version stakes the design and hypotheses for the record.
Figures & tables
Figure 1: The ByteKaz architecture. Blue modules are trained in Stage A. The Qwen2.5-7B stack is frozen during adapter training; in Stage B the adapter is frozen and attention sublayers in Qwen are updated on Kazakh data. Bytes are grouped into entropy-based patches, projected into Qwen’s space, and processed by the transformer; the local decoder predicts bytes autoregressively.
Component
Role
Dim
Params
Status
BLT Local Encoder
Bytes → patches
512
≈ 150M
Trained
Projection Wenc
Patches → Qwen space
512→4096
≈ 2M
Trained
Qwen2.5-7B body
Sequence modelling
4096
≈ 7B
Stage A: frozen; Stage B: attention trainable
Projection Wdec
Qwen space → patches
4096→512
≈ 2M
Trained
BLT Local Decoder
Patches → bytes
512
≈ 150M
Trained
Trainable total
≈ 304M
Table 1: Components of ByteKaz , their sizes, and training status.
LLaVA
ByteKaz
Input modality
Image patches (CLIP)
Byte patches (BLT encoder)
Output modality
Text tokens (BPE LM head)
Byte sequence (BLT decoder)
Frozen body
LLaMA / Vicuna
Qwen2.5-7B (Stage A)
Trainable components
CLIP encoder + projection
Encoder + decoder + projections
Bidirectional interface
Input only
Input and output
Target application
Vision-language tasks
Agglutinative language NLP
Table 2: Comparison of LLaVA and ByteKaz .
Stage
Tokens
Hardware
Est. Time
A — Adapter alignment (Qwen frozen)
1–2B
4 × A100 80 GB
1–2 weeks
B — Kazakh LM, attention-only Qwen
5–10B
4 × A100 80 GB
2–4 weeks
C — Task SFT
50–200M
2 × A100 80 GB
2–3 days
Table 3: Training stages and resource estimates (indicative).