What a Token and a Vocabulary Are
What a Hugging Face post says a token is, what the vocabulary maps and why a good tokenizer compresses text into fewer tokens.
For: Learners new to language models.
What a token is
A token is the smallest string unit the model sees.[1]
What the vocabulary maps
The vocabulary maps each unique token to the token ID.[1]
What a good tokenizer does
A good tokenizer compresses text into the smallest amount of tokens.[1]
Fewer tokens means more usable context without increasing model size.[1]
Sources
- Tokenization in Transformers v5 (huggingface.co · checked )
More articles
- LearningWhat Assisted Generation Is and What Its Two Models DoWhat a Hugging Face post says assisted generation is also known as, what its core idea is and what the assistant and target models do each cycle.
- LearningWhy Language Was Hard for Computers and What BERT IsWhat a Hugging Face explainer says BERT is, why language has been difficult for computers and how NLP tasks were traditionally solved.
- LearningWhat an Expert Is in a Mixture-of-Experts ModelWhat a Hugging Face post says a Mixture of Experts model replaces, what an expert is not and what the router does for each token.