mlsanityData to 7 Oct 2026

Getting the most out of your tokenizer for pre-training and domain adaptation

arXiv 2402.01035 ↗First posted 1 Feb 2024cs.CLcited by 65

Not on the map. Why?

Abstract (arXiv)

Tokenization is an understudied and often neglected component of modern LLMs. Most published works use a single tokenizer for all experiments, often borrowed from another model, without performing ablations or analysis to optimize tokenization. Moreover, the tokenizer is generally kept unchanged when fine-tuning a base model. In this paper, we show that the size, pre-tokenization regular expression, and training data of a tokenizer can significantly impact the model's generation speed, effective context size, memory usage, and downstream performance. We train specialized Byte-Pair Encoding code tokenizers, and conduct extensive ablations on the impact of tokenizer design on the performance of LLMs for code generation tasks such as HumanEval and MBPP, and provide recommendations for tokenizer hyper-parameters selection and switching the tokenizer in a pre-trained LLM. We perform our experiments on models trained from scratch and from pre-trained models, verifying their applicability to a wide range of use-cases. We find that when fine-tuning on more than 50 billion tokens, we can specialize the tokenizer of a pre-trained LLM to obtain large gains in generation speed and effective context size.

Key facts. Cited by 65 papers in the map (data through 7 Oct 2026). Builds on 28 of its 45 references that are in the map. First posted on arXiv 1 Feb 2024.

Builds on

28 of 45 references.

References · 28

  1. 2023GPT-4 Technical Reportcited by 18,132
  2. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  4. 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
  5. 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,201
  6. 2018SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processingcited by 1,973
  7. 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
  8. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  9. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  10. 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 711
  11. 2018Subword Regularization: Improving Neural Network Translation Models with Multiple Subword Candidatescited by 632
  12. 2019CCNet: Extracting High Quality Monolingual Datasets from Web Crawl Datacited by 544
16 more
  1. 2021ByT5: Towards a token-free future with pre-trained byte-to-byte modelscited by 504
  2. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
  3. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  4. 2022The Stack: 3 TB of permissively licensed source codecited by 354
  5. 2020How Good is Your Tokenizer? On the Monolingual Performance of Multilingual Language Modelscited by 313
  6. 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 294
  7. 2020Unsupervised Translation of Programming Languagescited by 262
  8. 2023Think before you speak: Training Language Models With Pause Tokenscited by 254
  9. 2019BPE-Dropout: Simple and Effective Subword Regularizationcited by 189
  10. 2019SPoC: Search-based Pseudocode to Codecited by 176
  11. 2021Investigating the Limitations of Transformers with Simple Arithmetic Taskscited by 136
  12. 2023XLM-V: Overcoming the Vocabulary Bottleneck in Multilingual Masked Language Modelscited by 88
  13. 2021Representing Numbers in NLP: a Survey and a Visioncited by 83
  14. 2023Tokenization Impacts Multilingual Language Modeling: Assessing Vocabulary Allocation and Overlap Across Languagescited by 61
  15. 2021Fine-Tuning Transformers: Vocabulary Transfercited by 14
  16. 2023CodeBPE: Investigating Subtokenization Options for Large Language Model Pretraining on Source Codecited by 9

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 15; 2025: 34; 2026: 16.

65 papers.

Sort:

By area:

  1. 2025Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approachcited by 372
  2. 2024Why do language models perform worse for morphologically complex languages?cited by 62
  3. 2025SuperBPE: Space Travel for Language Modelscited by 58
  4. 2025Boundless Byte Pair Encoding: Breaking the Pre-tokenization Barriercited by 31
  5. 2024Enhancing Foundation Models for Time Series Forecasting via Wavelet-based Tokenizationcited by 26
  6. 2025Evaluating Morphological Alignment of Tokenizers in 70 Languagescited by 22
  7. 2024Egalitarian Language Representation in Language Models: It All Begins with Tokenizerscited by 20
  8. 2025Scaling Embedding Layers in Language Modelscited by 19
  9. 2024Understanding and Mitigating Tokenization Bias in Language Modelscited by 18
  10. 2025ActionPiece: Contextually Tokenizing Action Sequences for Generative Recommendationcited by 18
  11. 2024Cross-lingual Transfer of Reward Models in Multilingual Alignmentcited by 17
  12. 2024Training LLMs over Neurally Compressed Textcited by 16
38 more
  1. 2024Exact Byte-Level Probabilities from Tokenized Language Models for FIM-Tasks and Model Ensemblescited by 15
  2. 2024Retrofitting Large Language Models with Dynamic Tokenizationcited by 15
  3. 2025How Much is Enough? The Diminishing Returns of Tokenization Training Datacited by 15
  4. 2025AdaptiVocab: Enhancing LLM Efficiency in Focused Domains through Lightweight Vocabulary Adaptationcited by 15
  5. 2025From Bytes to Ideas: Language Modeling with Autoregressive U-Netscited by 15
  6. 2025BPE Stays on SCRIPT: Structured Encoding for Robust Multilingual Pretokenizationcited by 11
  7. 2024Evaluating Tokenizer Performance of Large Language Models Across Official Indian Languagescited by 10
  8. 2026The Roots of Performance Disparity in Multilingual Language Models: Intrinsic Modeling Difficulty or Design Choices?cited by 10
  9. 2024ECG-Byte: A Tokenizer for End-to-End Generative Electrocardiogram Language Modelingcited by 9
  10. 2025Fast and Expressive Multi-Byte Prediction with Probabilistic Circuitscited by 9
  11. 2025Bolmo: Byteifying the Next Generation of Language Modelscited by 8
  12. 2025Sampling from Your Language Model One Byte at a Timecited by 7
  13. 2025Exploiting Vocabulary Frequency Imbalance in Language Model Pre-trainingcited by 7
  14. 2025Explaining and Mitigating Crosslingual Tokenizer Inequitiescited by 7
  15. 2025The KoLMogorov Test: Compression by Code Generationcited by 5
  16. 2024Transducer-Llama: Integrating LLMs into Streamable Transducer-based Speech Recognitioncited by 4
  17. 2025The Art of Breaking Words: Rethinking Multilingual Tokenizer Designcited by 4
  18. 2024Performance Evaluation of Tokenizers in Large Language Models for the Assamese Languagecited by 3
  19. 2025Prune or Retrain: Optimizing the Vocabulary of Multilingual Models for Estoniancited by 3
  20. 2025PixelWorld: How Far Are We from Perceiving Everything as Pixels?cited by 3
  21. 2025zip2zip: Inference-Time Adaptive Tokenization via Online Compressioncited by 3
  22. 2025Membership Inference Attacks on Tokenizers of Large Language Modelscited by 3
  23. 2025How Different Tokenization Algorithms Impact LLMs and Transformer Models for Binary Code Analysiscited by 3
  24. 2026Proxy Compression for Language Modelingcited by 3
  25. 2026LiteToken: Removing Intermediate Merge Residues From BPE Tokenizerscited by 3
  26. 2024Visual-Word Tokenizer: Beyond Fixed Sets of Tokens in Vision Transformerscited by 2
  27. 2025Less Is More: Reducing Token Counts Without Compromising Performancecited by 2
  28. 2025Patent Language Model Pretraining with ModernBERTcited by 2
  29. 2025Beyond Fertility: Analyzing STRR as a Metric for Multilingual Tokenization Evaluationcited by 2
  30. 2025MUTANT: A Recipe for Multilingual Tokenizer Designcited by 2
  31. 2025Teaching Old Tokenizers New Words: Efficient Tokenizer Adaptation for Pre-trained Modelscited by 2
  32. 2026Fast Byte Latent Transformercited by 2
  33. 2026Tokenization with Split Treescited by 2
  34. 2026TokEval: A Tokenizer Evaluation Suitecited by 2
  35. 2024Command-line Obfuscation Detection using Small Language Modelscited by 1
  36. 2024Retrieval-augmented code completion for local projects using large language modelscited by 1
  37. 2025Vocabulary Customization for Efficient Domain-Specific LLM Deploymentcited by 1
  38. 2025GQ-VAE: A gated quantized VAE for learning variable length tokenscited by 1

50 most cited of 65 All 65 (JSON)