Tokenization is an essential text preprocessing step in almost all large language models (LLMs), and byte-pair encoding (BPE) is a popular tokenization method used by models such as GPT, GPT-2, and RoBERTa. Since LLMs have many applications that require the fast processing of large amounts of data (e.g., real-time document summarization and analysis), offline tokenization algorithms may be unsuitable or at least impose a prohibitive memory cost. In this paper, we study BPE tokenization with a focus on the streaming model. We view BPE tokenization as a sequence-to-sequence transduction and obtain a bound on the delay of a BPE ruleset that enables streaming tokenization. We propose a novel streaming algorithm that uses a small amount of memory (independent of the input text) and has linear time complexity in the length of the input text. Our experimental evaluation shows that our algorithm performs well in comparison to existing BPE tokenizers.

Thu 18 Jun

Displayed time zone: Mountain Time (US & Canada) change

11:00 - 12:20
Symbolic Methods for Verification and MatchingPLDI Research Papers at Flatirons 2
Chair(s): Jeffrey S. Foster Tufts University
11:00
20m
Talk
Solvable Tuple Patterns and Their Applications to Program Verification
PLDI Research Papers
Naoki Kobayashi University of Tokyo, Ryosuke Sato Tokyo University of Agriculture and Technology, Ayumi Shinohara Tohoku University, Ryo Yoshinaka Tohoku University
DOI
11:20
20m
Talk
An Efficient Algorithm for Streaming BPE Tokenization
PLDI Research Papers
Konstantinos Mamouras Rice University, Angela W. Li Rice University, Yudi Yang Rice University
DOI
11:40
20m
Talk
Scalable Floating-Point Satisfiability via Staged Optimization
PLDI Research Papers
Yuanzhuo Zhang Virginia Tech, Zhoulai Fu SUNY Korea; Virginia Tech; Stony Brook University, Binoy Ravindran Virginia Tech
DOI
12:00
20m
Talk
EREQ: Regular Expressions with Quantifiers and Incremental Quantifier Elimination
PLDI Research Papers
Ekaterina Zhuchko Tallinn University of Technology, Ian Erik Varatalu Tallinn University of Technology, Margus Veanes Microsoft Research, Nikolaj Bjørner Microsoft Research
DOI