What is the difference between word-level and subword tokenization?
Word-level tokenization splits text into complete words, while subword tokenization can split words into smaller reusable pieces.
For example:
Word-level:
unhappiness → unhappiness
Subword:
unhappiness → un + happi + nessThe exact subword split depends on the tokenizer.
Word-level tokenization
In word-level tokenization, each complete word is treated as one token.
This is easy to understand, but it creates problems because language contains an enormous number of possible words, including:
- Names
- Technical terms
- Misspellings
- Word variations
- Newly created words
If a word is not in the vocabulary, the tokenizer may need an unknown-word token.
Subword tokenization
Subword tokenization keeps common words or word pieces as tokens and breaks rare words into smaller known pieces.
For example:
playing → play + ingThis allows the tokenizer to represent unfamiliar words without needing every possible word in its vocabulary.
Why are subwords usually preferred for LLMs?
Subword tokenization provides a useful balance:
- It keeps the vocabulary much smaller than a pure word-level vocabulary.
- It handles rare and unseen words more effectively.
- It can reuse meaningful pieces across related words.
- It usually produces shorter sequences than character-level tokenization.
Word-level tokenization may create shorter sequences for known words, but its vocabulary can become extremely large and inflexible.
Simple comparison
- Word-level: one token per known word, but poor handling of unseen words.
- Subword: words may use one or several tokens, but rare words can still be represented from known pieces.
Modern LLM tokenizers therefore commonly use subword-based approaches such as BPE, WordPiece, or Unigram rather than relying only on complete words.
For the broader concept, see “What is subword tokenization?”
In short: word-level tokenization treats complete words as tokens, while subword tokenization breaks uncommon words into reusable pieces, making it more flexible and practical for large language models.
Learning Sequence
Large Language Models Curriculum
How are unknown words handled by LLM tokenizers?
Explore Related Questions
Deepen your understanding across related Large Language Models topics.