# Subword Tokenization

- **Canonical URL:** https://getaimath.com/dictionary/subword-tokenization/
- **Topics:** [LLM Fundamentals](https://getaimath.com/dictionary/category/llm-fundamentals/)
- **Last updated:** 2026-11-25

## What is Subword Tokenization?

**In one sentence:** Subword tokenization splits words into common smaller pieces, so the model can handle any word using a limited vocabulary.

Common words stay whole, while rare words are built from familiar parts. This means a model never meets a word it cannot represent. It is like building any word out of a box of common LEGO blocks instead of needing a special block for every word.

![How ChatGPT & Claude Talk: Super-Powered Autocomplete — Simple cartoon diagram showing a sentence chopped into Lego word blocks (tokens), an AI brain weighing the odds of the next word ("mat" 75%, "couch" 18%, "roof" 5%), and snapping "mat" onto the end of the sentence.](https://getaimath.com/diagrams/llm-fundamentals.png)
*Napkin Diagram (LLM Fundamentals): Language models don’t plan whole essays at once—they play a super-smart game of "guess the very next word" over and over.*

## What is an example of Subword Tokenization?

"Unhappiness" might become "un," "happi" and "ness."

## Why does Subword Tokenization matter?

Subword tokenization lets models handle new words, names, typos and many languages efficiently.

## Related Concepts

- [Tokenization](https://getaimath.com/dictionary/tokenization/): Tokenization is the process of splitting text into tokens so a language model can work with it.
- [Byte Pair Encoding (BPE)](https://getaimath.com/dictionary/byte-pair-encoding-bpe/): Byte Pair Encoding is a popular way to build a tokenizer by repeatedly merging the most common pairs of characters into new tokens.
- [Vocabulary](https://getaimath.com/dictionary/vocabulary/): A model's vocabulary is the complete list of tokens it knows, each with its own ID number.
- [SentencePiece](https://getaimath.com/dictionary/sentencepiece/): SentencePiece is a free tokenizer tool from Google that splits text into subword tokens and works with any language, even ones without spaces.
- [Tokenizer](https://getaimath.com/dictionary/tokenizer/): A tokenizer is the tool that chops text into tokens and turns each token into a number the model can use.
- [Embedding](https://getaimath.com/dictionary/embedding/): An embedding is a list of numbers that represents the meaning of something, like a word, sentence or image.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/subword-tokenization/)
