BeginnerAbout 15 min
Tokenization Strategies (Word vs Subword vs BPE)
Read the full article on Substack
7 min read.
Type any sentence and switch between Word, Subword (BERT-style), Character, and BPE (GPT-style) tokenization to compare how each method splits the same text, then see how each token maps to a vocabulary ID.
- hello
- ,
- world
- !
- i'm
- learning
- nlp
- .
8 tokens from 5 words, 1.60 per word.
Check your understanding
Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.
Which tokenizer has this problem?
Sort
Sort each trait by the tokenization strategy it belongs to.
Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.
Word-level
Drop items hereCharacter-level
Drop items hereSubword / BPE
Drop items here6 pieces left to place
Quiz
20 questionsQuestion 1 of 20
Score: 0
Why must text be tokenized before a neural network can process it?
Done with this lesson?
Sign in free to keep your progress, streak and quiz scores.