# Subword

> Subword: A token that can be a whole word or a fragment of one. Common words get one token; rare words are built from several.

Canonical: https://llmdojo.dev/glossary/subword

Also called subwords.

A token that can be a whole word or a fragment of one. Common words get one token; rare words are built from several.

Learn it in the lesson: [Why subwords](https://llmdojo.dev/learn/model-foundations/tokenization/why-subwords) (Model Foundations · Tokenization: From Text to Token IDs).

## Interview questions about Subword

- [What is a token, and why do most models use subword tokens rather than whole words or single characters?](https://llmdojo.dev/interview/q/what-is-a-token-and-why-do-most-models-use-subword-tokens)
- [How would you design a subword tokenizer for a new LLM? And separately, what is KL-regularised supervised fine-tuning, and why use it?](https://llmdojo.dev/interview/q/how-would-you-design-a-subword-tokenizer-for-a-new-llm-and)
- [What is subword tokenization, what does SentencePiece add, and what are the main transformer variants?](https://llmdojo.dev/interview/q/what-is-subword-tokenization-what-does-sentencepiece-add-and-what-are-the)
- [Compare the main NLP tokenization approaches. Then, how would you design a recommender that uses an LLM?](https://llmdojo.dev/interview/q/compare-the-main-nlp-tokenization-approaches-then-how-would-you-design-a)
- [Before coding a BERT keyphrase span-extraction task, what would you clarify about the interface, tokenizer offsets, valid spans and the outputs?](https://llmdojo.dev/interview/q/before-coding-a-bert-keyphrase-span-extraction-task-what-would-you-clarify)
- [Compare tokenization choices and dense versus sparse retrieval for search and RAG, then design and evaluate a hybrid retriever.](https://llmdojo.dev/interview/q/compare-tokenization-choices-and-dense-versus-sparse-retrieval-for-search-and-rag)

## Related
- [Token](https://llmdojo.dev/glossary/token)
- [Tokenizer](https://llmdojo.dev/glossary/tokenizer)
- [Token ID](https://llmdojo.dev/glossary/token-id)
- [Vocabulary](https://llmdojo.dev/glossary/vocabulary)
- [Byte pair encoding (BPE)](https://llmdojo.dev/glossary/bpe)
- [Special token](https://llmdojo.dev/glossary/special-token)
- [Glossary of every term](https://llmdojo.dev/glossary)
