Table of Contents
Fetching ...

MultiTok: Variable-Length Tokenization for Efficient LLMs Adapted from LZW Compression

Noel Elias, Homa Esfahanizadeh, Kaan Kale, Sriram Vishwanath, Muriel Medard

TL;DR

The paper addresses the high data and compute costs of training large language models by introducing MultiTok, a variable-length, LZW-inspired tokenizer that builds a dynamic dictionary of multi-word tokens to compress input data. It formalizes the tokenization framework, defines compression and training-time metrics, and demonstrates that MultiTok can match the performance of standard tokenizers like BERT and GPT-2 while achieving substantial efficiency gains. Through extensive experiments on IMDB, SST2, and AG-News, it shows that MultiTok can operate standalone or cascade with existing tokenizers, delivering up to ~2.5x faster training and ~30% data reduction without sacrificing accuracy, particularly when combined with post-processing. The work highlights the potential of information-theoretic tokenization to enhance the practicality of training and deploying efficient LLMs, with future directions including applications to text generation and other data modalities such as video.

Abstract

Large language models have drastically changed the prospects of AI by introducing technologies for more complex natural language processing. However, current methodologies to train such LLMs require extensive resources including but not limited to large amounts of data, expensive machinery, and lengthy training. To solve this problem, this paper proposes a new tokenization method inspired by universal Lempel-Ziv-Welch data compression that compresses repetitive phrases into multi-word tokens. With MultiTok as a new tokenizing tool, we show that language models are able to be trained notably more efficiently while offering a similar accuracy on more succinct and compressed training data. In fact, our results demonstrate that MultiTok achieves a comparable performance to the BERT and GPT-2 standards as both a stand-alone tokenizer and an add-on to existing tokenizers while also providing close to 2.5x faster training with more than 30% less training data.

MultiTok: Variable-Length Tokenization for Efficient LLMs Adapted from LZW Compression

TL;DR

The paper addresses the high data and compute costs of training large language models by introducing MultiTok, a variable-length, LZW-inspired tokenizer that builds a dynamic dictionary of multi-word tokens to compress input data. It formalizes the tokenization framework, defines compression and training-time metrics, and demonstrates that MultiTok can match the performance of standard tokenizers like BERT and GPT-2 while achieving substantial efficiency gains. Through extensive experiments on IMDB, SST2, and AG-News, it shows that MultiTok can operate standalone or cascade with existing tokenizers, delivering up to ~2.5x faster training and ~30% data reduction without sacrificing accuracy, particularly when combined with post-processing. The work highlights the potential of information-theoretic tokenization to enhance the practicality of training and deploying efficient LLMs, with future directions including applications to text generation and other data modalities such as video.

Abstract

Large language models have drastically changed the prospects of AI by introducing technologies for more complex natural language processing. However, current methodologies to train such LLMs require extensive resources including but not limited to large amounts of data, expensive machinery, and lengthy training. To solve this problem, this paper proposes a new tokenization method inspired by universal Lempel-Ziv-Welch data compression that compresses repetitive phrases into multi-word tokens. With MultiTok as a new tokenizing tool, we show that language models are able to be trained notably more efficiently while offering a similar accuracy on more succinct and compressed training data. In fact, our results demonstrate that MultiTok achieves a comparable performance to the BERT and GPT-2 standards as both a stand-alone tokenizer and an add-on to existing tokenizers while also providing close to 2.5x faster training with more than 30% less training data.

Paper Structure

This paper contains 9 sections, 1 theorem, 5 equations, 3 figures, 1 table, 1 algorithm.

Key Result

Lemma 1

Let $r$ and $r'$ denote the compression ratio before and after the frequency-based post-processing. For a threshold $K$, where the tokens that appear equal or less than $K$ times are replaced with their smaller, more-frequent constituents, we have Here, $N$ is the number of tokens in the original MultiTok encoded data, $\lambda_k$ is the number of tokens that appear $k$ times in the training data

Figures (3)

  • Figure 1: A toy example showing how MultiTok dictionary is constructed and used for tokenization.
  • Figure 2: Training (left) & Testing Graphs (right) for the IMDB dataset.
  • Figure 3: MultiTok demonstrates an average training time ($C(\epsilon) | \epsilon=0.01$) that is almost 2-3 times faster than the BERT & GPT-2 standards.

Theorems & Definitions (5)

  • Definition 1
  • Definition 2
  • Lemma 1
  • proof
  • Remark