Tokenisation (machine learning)
Appearance
Tokenisation is the process of segmenting raw data into tokens.[1]
Definition
Formally, let $\mathcal{S}$ be a sequence of data. Any function
$$ \tau: \mathcal{S} \to \mathcal{V}^{*} $$
is a tokenisation function, sometimes called a tokeniser.
where $|\mathcal{V}| \ll \infty$ is known as the token vocabulary.
Vocabulary size
The vocabulary size $|\mathcal{V}|$ is a key design choice in tokenisation functions, controlling the trade-off between expressiveness and computational cost.
Typical vocabulary size is $10^4 \to 10^5$.