Predict how cl100k_base tokenizes '1024', '2048', and '100000', and explain how inconsistent splitting causes LLM arithmetic failures.
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Using tiktoken with cl100k_base, tokenize the following number strings: - '1024' - '2048' - '100000' Predict whether each is a single token or splits, and describe how inconsistent number tokenization causes LLMs to fail at multi-digit arithmetic.
cl100k_base caps digit runs at three digits, so even 1024 splits into ['102','4']; that non place value chunking is why LLMs fail at exact arithmetic.
Imagine doing long addition, but instead of seeing each digit, you only get colored cards. The number 1024 is one blue card; the number 100000 is two green cards glued in a weird spot. You were taught to add by lining up the ones, tens, and hundreds, but the cards do not split along those lines. Worse, the number right next to 1024 might come as totally different cards, so a trick that worked for one number is useless for its neighbor. That is how a language model sees numbers. It rarely gets clean single-digit pieces, so it cannot line up place values, and it ends up guessing from patterns it memorized rather than actually calculating.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: three-digit chunk cap + no place-value primitive + carries crossing chunk boundaries + right to left grouping + tool-use mitigation.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Assuming the model adds digit by digit; cl100k hands it multi-digit chunks split at three-digit boundaries, not place-value boundaries, so it pattern-matches instead of computing.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.