AI tokenization: how do tokens, BPE and SentencePiece work?
A language model does not receive a list of words. A tokenizer first converts text into a sequence of IDs; the model maps those IDs to vector representations. Segmentation affects context length, request cost, language coverage and computation. Why can the same text have different token counts?