Counting and Min-Cost Encoding for Tokenization in Large Language Models
Not on the map. Why?
Abstract (arXiv)
Mainstream large language models rely on a tokenizer to encode text into a token sequence. Different tokenizers may yield token sequences of substantially different lengths for the same text. With a fixed model architecture, shorter token sequences correspond to lower inference time. We propose a tokenizer training approach named Counting and Filtering (CNF) and a text encoding algorithm called Min-Cost Encoding (MCE). MCE defines a cost function over a text segment, and determines the best segmentation by globally minimizing the overall segmentation cost. CNF builds a raw vocabulary by directly counting valid substrings, and then constructs the final vocabulary through a filtering step based on actual token usage when segmenting the training corpus with MCE. The CNF-MCE conbination offers several advantages over BPE, including higher token efficiency, greater scalability, and lower dependency. Across six text categories and two vocabulary-size groups, CNF-MCE consistently achieves better compression than the evaluated BPE tokenizers. With a 250K vocabulary, CNF-MCE increases compression rate by 26% and 30% on English web text over the o200k_base and qwen250k tokenizers. Experiments scaling the vocabulary to 1M entries on English web text demonstrate sustained improvements over BPE, with a token efficiency improvement of over 60% and vocabulary utilization rising from 52.9% to 96.9%. The MCE algorithm does not depend on a merge list (as in BPE) or token probability (as in UnigramLM), making it applicable to a wide range of vocabularies, including those built from BPE, UnigramLM, CNF, and others. Language models trained from scratch at the 1.8B and 8B scales achieve comparable average performance to models using the BPE tokenizers across 11 benchmarks. These results demonstrate that CNF-MCE can improve token efficiency significantly while maintaining competitive downstream performance.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 33 of its 41 references that are in the map. First posted on arXiv 1 Oct 2026.
Builds on
33 of 41 references.
References · 33
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2025Qwen3 Technical Reportcited by 8,195
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
- 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,895
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,818
- 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,114
- 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,793
- 2022No Language Left Behind: Scaling Human-Centered Machine Translationcited by 1,290
21 more
- 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 960
- 2026DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligencecited by 877
- 2018Subword Regularization: Improving Neural Network Translation Models with Multiple Subword Candidatescited by 632
- 2020Byte Pair Encoding is Suboptimal for Language Model Pretrainingcited by 189
- 2025FineWeb2: One Pipeline to Scale Them All -- Adapting Pre-Training Data Processing to Every Languagecited by 134
- 2023Skywork: A More Open Bilingual Foundation Modelcited by 110
- 2024Tokenization Is More Than Compressioncited by 87
- 2025SuperBPE: Space Travel for Language Modelscited by 58
- 2026The MiniMax-M2 Series: Mini Activations Unleashing Max Real-World Intelligencecited by 50
- 2024Fishing for Magikarp: Automatically Detecting Under-trained Tokens in Large Language Modelscited by 45
- 2024Greed is All You Need: An Evaluation of Tokenizer Inference Methodscited by 34
- 2025Nemotron-CC-Math: A 133 Billion-Token-Scale High Quality Math Pretraining Datasetcited by 34
- 2025Enhancing Multilingual LLM Pretraining with Model-Based Data Selectioncited by 33
- 2025Boundless Byte Pair Encoding: Breaking the Pre-tokenization Barriercited by 31
- 2024BPE Gets Picky: Efficient Vocabulary Refinement During Tokenizer Trainingcited by 30
- 2024Multi-word Tokenization for Sequence Compressioncited by 16
- 2024Scaffold-BPE: Enhancing Byte Pair Encoding for Large Language Models with Simple and Effective Scaffold Token Removalcited by 16
- 2026MinGram: A Minimalist Unigram Tokenizer with High Compression and Competitive Morphological Alignmentcited by 5
- 2025CCI4.0: A Bilingual Pretraining Dataset for Enhancing Reasoning in Large Language Modelscited by 4
- 2025Mangosteen: An Open Thai Corpus for Language Model Pretrainingcited by 2
- 2026TokEval: A Tokenizer Evaluation Suitecited by 2
Built on by
Not cited yet.