When Every Token Counts: Optimal Segmentation for Low-Resource Language Models

Bharath Raj, Garvit Suri, Vikrant Dewangan, Raghav Sonavane
12/9/2024
13 citations
cs.CLcs.AIcs.LG

Official code: rath772k/optimal_segmentation (1 star, Jupyter Notebook, last commit 2025-02-23).

Abstract

Traditional greedy tokenization methods have been a critical step in Natural Language Processing (NLP), influencing how text is converted into tokens and directly impacting model performance. While subword tokenizers like Byte-Pair Encoding (BPE) are widely used, questions remain about their optimality across model scales and languages.

Show full abstract

In this work, we demonstrate through extensive experiments that an optimal BPE configuration significantly reduces token count compared to greedy segmentation, yielding improvements in token-saving percentages and performance benefits, particularly for smaller models. We evaluate tokenization performance across various intrinsic and extrinsic tasks, including generation and classification. Our findings suggest that compression-optimized tokenization strategies could provide substantial advantages for multilingual and low-resource language applications, highlighting a promising direction for further research and inclusive NLP.

View on arXivView PDF

Code Implementations(1)

10Jupyter Notebook, PythonFeb 23, 20251 years ago

Similar Papers

Cite this paper

@article{raj2024when,
  title  = {When Every Token Counts: Optimal Segmentation for Low-Resource Language Models},
  author = {Bharath Raj and Garvit Suri and Vikrant Dewangan and Raghav Sonavane},
  year   = {2024},
  eprint = {2412.06926},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.06926v5}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.06926.svg)](https://codeofpaper.com/paper/2412.06926)

Discussion