An out-of-vocabulary word is represented by a reserved <UNK> token when the tokenizer does not recognize it. Frequent <UNK> tokens reduce performance because they erase information from the input. section 2.1.1
The problem becomes concrete in code. A whitespace-based tokenizer can turn `def add_two_numbers_together(x, y):` into `[def, [UNK], y]`, losing punctuation and the function’s descriptive name. section 2.1.1
Treat unknown tokens as a tokenization-design warning:
- Increase or adapt the vocabulary when ordinary words are repeatedly mapped to <UNK>. section 2.1.1
- Choose a strategy suited to code, mathematics, multilingual text, and languages without alphabetic whitespace conventions. section 2.5 section 4.4.1
- Prefer tokenization that preserves meaningful digits and text units instead of collapsing them into unknown tokens. section 4.4.1
Code completion
A tokenizer that recognizes only whitespace-separated words may fail on identifiers, punctuation, and syntax. A morphology-aware or subword-oriented strategy can preserve more of `add_two_numbers_together` for the model. section 2.1.1 section 4.4.1
Figure 4.3 Llama’s tokenization of the first arithmetic problem in the comparison table. Notice that each digit is highlighted individually, meaning that the model will eventually see all the digits.
Use the digit-level tokenization figure to see how a strategy can expose every digit instead of hiding important numeric structure. section 4.4.1







