Tokenizer

Text is split into tokens, the units that an LLM processes. Each token maps to an integer ID in the model's vocabulary. The split approximates GPT-2 byte-pair encoding (BPE). The displayed IDs are examples, not entries from the GPT-2 vocabulary.

Input Text

Token Counts

Selected Token

Click a token to inspect it.

Legend

Word start
Continuation
Punctuation
Whitespace

Tokenized Text

Click a preset to change the settings.