How Long Is a Piece of String? A Brief Empirical Analysis of Tokenizers
Jonathan Roberts, Kai Han, Samuel Albanie
TL;DR
This paper addresses the instability of token counts as a universal length unit for frontier LLMs by performing an empirical analysis of tokenization across eight domains and ten tokenizers. The authors quantify character-to-token compression with $c = \dfrac{n_{chars}}{n_{tokens}}$, and examine how tokenization affects context limits and pricing, revealing substantial cross-domain and cross-tokenizer variation. They challenge common heuristics, such as the 0.75 words/token rule, and show that model-native context limits are not directly comparable across domains or models. The work provides practical guidance for interpreting token-based metrics, enabling more accurate benchmarking, cost estimation, and fair evaluation of LLM capabilities across diverse text types.
Abstract
Frontier LLMs are increasingly utilised across academia, society and industry. A commonly used unit for comparing models, their inputs and outputs, and estimating inference pricing is the token. In general, tokens are used as a stable currency, assumed to be broadly consistent across tokenizers and contexts, enabling direct comparisons. However, tokenization varies significantly across models and domains of text, making naive interpretation of token counts problematic. We quantify this variation by providing a comprehensive empirical analysis of tokenization, exploring the compression of sequences to tokens across different distributions of textual data. Our analysis challenges commonly held heuristics about token lengths, finding them to be overly simplistic. We hope the insights of our study add clarity and intuition toward tokenization in contemporary LLMs.
