Tokenization Multiplicity Leads to Arbitrary Price Variation in LLM-as-a-service
Not on the map. Why?
Abstract (arXiv)
Providers of LLM-as-a-service have predominantly adopted a simple pricing model: users pay a fixed price per token. Consequently, one may think that the price two different users would pay for the same output string under the same input prompt is the same. In our work, we show that, surprisingly, this is not (always) true. We find empirical evidence that, particularly for non-english outputs, both proprietary and open-weights LLMs often generate the same (output) string with multiple different tokenizations, even under the same input prompt, and this in turn leads to arbitrary price variation. To address the problem of tokenization multiplicity, we introduce canonical generation, a type of constrained generation that restricts LLMs to only generate canonical tokenizations -- the unique tokenization in which each string is tokenized during the training process of an LLM. Further, we introduce an efficient sampling algorithm for canonical generation based on the Gumbel-Max trick. Experiments on a variety of natural language tasks demonstrate that our sampling algorithm for canonical generation is comparable to standard sampling in terms of performance and runtime, and it solves the problem of tokenization multiplicity.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 50 of its 66 references that are in the map. First posted on arXiv 6 Jun 2025.
Builds on
50 of 66 references.
References · 50
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,918
- 2019The Curious Case of Neural Text Degenerationcited by 2,916
- 2018Subword Regularization: Improving Neural Network Translation Models with Multiple Subword Candidatescited by 639
- 2021Efficient Large-Scale Language Model Training on GPU Clusters Using Megatron-LMcited by 632
- 2022Language Models are Multilingual Chain-of-Thought Reasonerscited by 530
- 2020How Good is Your Tokenizer? On the Monolingual Performance of Multilingual Language Modelscited by 318
- 2023xCOMET: Transparent Machine Translation Evaluation through Fine-grained Error Detectioncited by 265
- 2022Black-Box Tuning for Language-Model-as-a-Servicecited by 256
- 2023Multilingual Jailbreak Challenges in Large Language Modelscited by 240
- 2023Language Model Tokenizers Introduce Unfairness Between Languagescited by 214
- 2019BPE-Dropout: Simple and Effective Subword Regularizationcited by 195
38 more
- 2023Do All Languages Cost the Same? Tokenization in the Era of Commercial Language Modelscited by 192
- 2023From Words to Watts: Benchmarking the Energy Costs of Large Language Model Inferencecited by 170
- 2014A* Samplingcited by 151
- 2024Tokenization counts: the impact of tokenization on arithmetic in frontier LLMscited by 115
- 2024MegaScale: Scaling Large Language Model Training to More Than 10,000 GPUscited by 112
- 2024Guiding LLMs The Right Way: Fast, Non-Invasive Constrained Generationcited by 101
- 2024The Language Barrier: Dissecting Safety Challenges of LLMs in Multilingual Contextscited by 94
- 2020Fast WordPiece Tokenizationcited by 87
- 2021A Review of the Gumbel-max Trick and its Extensions for Discrete Stochasticity in Machine Learningcited by 82
- 2025Energy Considerations of Large Language Model Inference and Efficiency Optimizationscited by 55
- 2025Are You Getting What You Pay For? Auditing Model Substitution in LLM APIscited by 38
- 2023A Formal Perspective on Byte-Pair Encodingcited by 36
- 2024From Language Models over Tokens to Language Models over Characterscited by 31
- 2021You should evaluate your language model on marginal likelihood over tokenisationscited by 30
- 2024Toward a Theory of Tokenization in LLMscited by 30
- 2021How BPE Affects Memorization in Transformerscited by 29
- 2018How Much Does Tokenization Affect Neural Machine Translation?cited by 26
- 2023Task-Adaptive Tokenization: Enhancing Long-Form Text Generation Efficacy in Mental Health and Beyondcited by 23
- 2024The Foundations of Tokenization: Statistical and Computational Concernscited by 22
- 2024Where is the signal in tokenization space?cited by 21
- 2022How Robust is Neural Machine Translation to Language Imbalance in Multilingual Tokenizer Training?cited by 20
- 2023How do different tokenizers perform on downstream tasks in scriptio continua languages?: A case study in Japanesecited by 20
- 2023Should you marginalize over possible tokenizations?cited by 18
- 2024Understanding and Mitigating Tokenization Bias in Language Modelscited by 18
- 2023Fine-Tuning Games: Bargaining and Adaptation for General-Purpose Modelscited by 17
- 2024Theoretical Analysis of Byte-Pair Encodingcited by 16
- 2025CoIn: Counting the Invisible Reasoning Tokens in Commercial Opaque LLM APIscited by 14
- 2024On the Proper Treatment of Tokenization in Psycholinguisticscited by 13
- 2025Is Your LLM Overcharging You? Tokenization, Transparency, and Incentivescited by 13
- 2023Effects of sub-word segmentation on performance of transformer language modelscited by 12
- 2025Adversarial Tokenizationcited by 11
- 2023Language Models as a Service: Overview of a New Paradigm and its Challengescited by 10
- 2024Incentivizing Quality Text Generation via Statistical Contractscited by 10
- 2025Invisible Tokens, Visible Bills: The Urgent Need to Audit Hidden Operations in Opaque LLM Servicescited by 10
- 2024Token Alignment via Character Matching for Subword Completioncited by 9
- 2024Evaluating and Mitigating Linguistic Discrimination in Large Language Modelscited by 8
- 2024Pricing and Competition for Generative AIcited by 8
- 2025Evaluation of Large Language Models via Coupled Token Generationcited by 8
Built on by
Not cited yet.