Tokenizer Training
PremiumTrain a BPE tokenizer with RustBPE and export the tiktoken encoding
You must determine the tokenizer before pretraining. The model does not see raw strings, but sequences of token ids; the vocabulary size, special tokens, and pre-tokenization rules all affect the subsequent model configuration and the shape of the training data.
cookllm-bento already ships with a usable tokenizer by default:
tokens/
├── tokenizer.pkl
├── token_bytes.pt
└── metadata.jsonIf you just want to run pretraining directly, you can use the default tokenizer first. Retraining the tokenizer is appropriate when you change the corpus, adjust the vocabulary size, or want to fully reproduce the training flow.
Log in to continue reading
This is premium content. Please log in to access the full article.
CookLLM Docs