Same 192 Characters Yield 111 to 172 Tokens Across Three Tokenizers
A developer tested one 192-character Chinese code-review request across three tokenizers and got 111 tokens in DeepSeek V4, 133 in o200k_base, and 172 in cl100k_base, a 55% spread. The common rule of four characters per token predicted only 48, so it underestimated the count badly. Byte-level BPE explains the gap: pre-tokenization splits text into chunks that merges cannot cross, and each tokenizer's vocabulary size and training data differ. English text barely varies across the tokenizers, while Chinese and Japanese characters diverge sharply. Code adds its own cost through punctuation, indentation and whitespace. Since Claude and Gemini tokenizers are unpublished, exact counts for them require provider endpoints, and local tokenizers measure only one string, not a full request.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.



Discussion (0)
Log in to join the discussion and vote.
Log in