superbpe.github.io - SuperBPE: Space Travel for Language Models

Description: SuperBPE: Space Travel for Language Models

superbpe superword tokenization (1)

Example domain paragraphs

Tokenizers are the interface through which language models interact with the world. Beginning from a blank slate, they learn the shape and form of language as sequences of tokens, becoming ever more capable. But in the end, the tokenizer will still govern the mapping between text and computation. Today, tokenization universally occurs at the level of subwords, meaning that tokens are parts of words (including complete words), but cannot bridge whitespace. Historically, subword tokenization was meant to comb

But for modern language models, does it really make sense to limit tokens to parts of words? Whitespace is not a consistent delimiter of meaning — multi-word expressions ( “by the way” ) function semantically as single units, and different languages vary in the number of words needed to express a concept ( “spacesuit helmet” is “Raumanzughelm” in German). At the extreme, languages such as Chinese do not use whitespace at all . Tokens in these languages span multiple words and even entire sentences , yet thi

We extend tokenization beyond subwords by introducing SuperBPE , an algorithm that produces tokenizers including both subword and “superword” tokens. As background, the subword restriction in BPE is enforced in a step called pretokenization, which splits the training text on whitespace to prevent common word sequences from becoming single tokens. SuperBPE modifies BPE by adding a simple pretokenization curriculum: the tokenizer first learns subwords by using pretokenization, and then lifts this restriction

Links to superbpe.github.io (2)