--- license: mit tags: - tokenizer - bpe - from-scratch - bilingual - kawi pretty_name: Kawi tokenizer (BPE 32k) --- # KawiLM/kawi-tokenizer Byte-level BPE tokenizer (vocab 32,000) trained from scratch for **Kawi**, a bilingual English/Indonesian LLM built on an Rp0 budget. Trained on a 120k-document mix of code, English, and Indonesian text; runs on the standard `tokenizers`/`transformers` stack. ## Contents - `tokenizer.json` — full BPE model (drop-in for `PreTrainedTokenizerFast`). - `tokenizer_meta.json` — vocab size, special tokens, training stats. ## Special tokens Chat and code-aware controls: `<|pad|>`, `<|bos|>`, `<|eos|>`, `<|system|>`, `<|user|>`, `<|assistant|>`, `<|end|>`, `<|fim_prefix|>`, `<|fim_middle|>`, `<|fim_suffix|>`, `<|repo_name|>`, `<|file_sep|>`, `<|think|>`, `<|/think|>`, `<|tool_call|>`, `<|tool_result|>`, plus 8 reserved slots. ## Usage ```python from transformers import PreTrainedTokenizerFast tok = PreTrainedTokenizerFast(tokenizer_file="tokenizer.json") print(tok("Saya dan kamu pergi ke pasar.").input_ids) ``` Trained on and used to shard [KawiLM/kawi-corpus](https://huggingface.co/datasets/KawiLM/kawi-corpus) (11.7B tokens). Pipeline: [github.com/aryasep-a/kawi](https://github.com/aryasep-a/kawi). License: MIT.