WordPiece › Visualizations
Language AI HandbookAll chapters WordPiece › VisualizationsOne section · Sections in this chapter10 / 13 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Let us visualize two key aspects of WordPiece: how the merge scores differ from raw frequency counts, and how tokenization produces different subword splits across word families.


The word family visualization reveals a key property of WordPiece: morphologically related words share subword tokens. The "play" family all contain the token play, and the "construct" family all share ##struct. This shared subword structure is precisely what allows BERT to generalize across word forms. When the model encounters "deconstructed", it can draw on what it has learned about de, ##con, ##struct, and ##ed independently. Each subword piece carries information learned from all the words in which it appeared, allowing BERT to compose meaning from parts even for words it has never seen as wholes.