Tokenizer playground
Reading the results
| Display | Meaning |
|---|---|
| ␣ | Space |
| ↵ | Line feed |
| ␍ | Carriage return |
| ⇥ | Tab |
| <0xE3> | A byte in hexadecimal. When a token's bytes cannot be decoded as UTF-8 on their own, all its bytes appear in this form. |
| ▁ | A space marker. Some tokenizers add a leading space; a token containing only that added space can appear as “▁”. |
Token and character counts
Tokenization rules
Supported tokenizers
Preferred Networks (PLaMo)
- PLaMo 3 has 107,520 vocabulary entries. Before maximizing the total token score, it places boundaries around runs of two or more spaces, runs of four or more identical characters other than line feeds, and special-token spellings.
- PLaMo 2 has 100,000 entries. Like PLaMo 3, it maximizes the total token score. Both follow the public implementation's score rounding and tie-breaking rules.
- PLaMo 1 uses SentencePiece BPE with 50,112 entries. It has dedicated tokens for runs of spaces and tabs, and adds a leading space before tokenization.
OpenAI (GPT)
- “GPT-4o–6 / gpt-oss” uses
o200k_harmony, with 201,088 vocabulary entries. It shares its ordinary vocabulary and pre-tokenization rules witho200k_baseand uses special tokens from Harmony, the conversation format used by gpt-oss. - The “GPT-3.5–4” option uses
cl100k_base, with 100,261 entries.
o200k_harmony contains 199,998 ordinary tokens and 1,090 special tokens. cl100k_base contains 100,256 ordinary tokens and 5 special tokens. Gaps in the ID range mean that the largest ID plus one can exceed the vocabulary size.
Anthropic (Claude)
- “Claude 4.7–5” uses ctok's v4.8 configuration and adds a 6-token frame. Its candidate pieces match ctok v4.7, but its treatment of the leading space and message frame differs.
- “Claude 3–4.6” uses ctok's v3 configuration and adds a 7-token frame.
Google (Gemma and Gemini)
xAI (Grok)
Cohere (Command)
- Command A+ has 255,032 entries and performs no Unicode normalization. Pre-tokenization groups digits from the right in chunks of up to three and accounts for letter case and combining marks.
- Command R / R+ has 255,029 entries. It applies NFC, separates individual digits, and then splits words, symbols, and whitespace. The R definition used here is identical to the August 2024 R+ definition, so both share one option.
Mistral AI
Alibaba (Qwen)
DeepSeek
Z.ai (GLM)
LLM-jp
<|message|>. When converting tokens back to text for display, it removes the added leading space both at the start of the text and immediately after these markers.