paper-with-me

홈 › Papers

Toward a Theory of Tokenization in LLMs

2024-04-12 · Nived Rajaraman, Jiantao Jiao, Kannan Ramchandran

While there has been a large body of research attempting to circumvent tokenization for language modeling (Clark et al., 2022; Xue et al., 2022), the current consensus is that it is a necessary initial step for designing state-of-the-art performant language models. In this paper, we investigate tokenization from a theoretical point of view by studying the behavior of transformers on simple data generating processes. When trained on data drawn from certain simple $k^{\text{th}}$-order Markov processes for $k > 1$, transformers exhibit a surprising phenomenon - in the absence of tokenization, they empirically fail to learn the right distribution and predict characters according to a unigram model (Makkuva et al., 2024). With the addition of tokenization, however, we empirically observe that transformers break through this barrier and are able to model the probabilities of sequences drawn from the source near-optimally, achieving small cross-entropy loss. With this observation as starting point, we study the end-to-end cross-entropy loss achieved by transformers with and without tokenization. With the appropriate tokenization, we show that even the simplest unigram models (over tokens) learnt by transformers are able to model the probability of sequences drawn from $k^{\text{th}}$-order Markov sources near optimally. Our analysis provides a justification for the use of tokenization in practice through studying the behavior of transformers on Markovian data.

📄 PDF Abstract BibTeX arXiv:2404.08335

Code (0)

등록된 구현이 없습니다.

Tasks

Language ModelingLanguage Modelling

Similar Papers 제목 키워드 기반

Improving Self Consistency in LLMs through Probabilistic Tokenization

2024-07-04 · Ashutosh Sathe, Divyanshu Aggarwal, Sunayana Sitaram

Prior research has demonstrated noticeable performance gains through the use of probabilistic tokenizations, an approach that involves employing multiple tokenizations of the same input string during the training phase o…

Language ModelingLanguage Modelling

Tokenization Matters! Degrading Large Language Models through Challenging Their Tokenization

2024-05-27 · Dixuan Wang, Yanda Li, Junyuan Jiang, Zepeng Ding 외

Large Language Models (LLMs) have shown remarkable capabilities in language understanding and generation. Nonetheless, it was also witnessed that LLMs tend to produce inaccurate responses to specific queries. This defici…

Broken Words, Broken Performance: Effect of Tokenization on Performance of LLMs

2025-12-26 · Sachin Pawar, Manoj Apte, Kshitij Jadhav, Girish Keshav Palshikar 외 arxiv

Tokenization is the first step in training any Large Language Model (LLM), where the text is split into a sequence of tokens as per the model's fixed vocabulary. This tokenization in LLMs is different from the traditiona…

Byte BPE Tokenization as an Inverse string Homomorphism

2024-12-04 · Saibo Geng, Sankalp Gambhir, Chris Wendler, Robert West

Tokenization is an important preprocessing step in the training and inference of large language models (LLMs). While there has been extensive research on the expressive power of the neural achitectures used in LLMs, the …

Tokenization counts: the impact of tokenization on arithmetic in frontier LLMs

2024-02-22 · Aaditya K. Singh, DJ Strouse

Tokenization, the division of input text into input tokens, is an often overlooked aspect of the large language model (LLM) pipeline and could be the source of useful or harmful inductive biases. Historically, LLMs have …

Inductive BiasLanguage ModellingLarge Language Model