← Latest papers
💬 NLP

Compute Optimal Tokenization

This paper demonstrates that in compute-optimal language model configurations, parameter counts scale proportionally to data size measured in bytes rather than tokens, revealing that the optimal token compression rate differs from standard BPE and decreases as compute increases.

Original authors: Tomasz Limisiewicz, Artidoro Pagnoni, Srini Iyer, Mike Lewis, Sachin Mehta, Alisa Liu, Margaret Li, Gargi Ghosh, Luke Zettlemoyer

Published 2026-05-05
📖 5 min read🧠 Deep dive

Original authors: Tomasz Limisiewicz, Artidoro Pagnoni, Srini Iyer, Mike Lewis, Sachin Mehta, Alisa Liu, Margaret Li, Gargi Ghosh, Luke Zettlemoyer

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are building the ultimate library of knowledge. You have a fixed amount of money (your compute budget) to build this library. You have two main choices:

  1. Buy a massive building with millions of empty shelves (Model Size).
  2. Buy a huge pile of books to fill those shelves (Training Data).

For years, experts told librarians: "To get the best library, buy 20 books for every single shelf you build." But this advice had a hidden flaw: it assumed every book was the same size. In reality, some books are thick encyclopedias, while others are thin pamphlets.

This paper, titled "Compute Optimal Tokenization," argues that we've been measuring our books in the wrong unit. Instead of counting "books" (tokens), we should be counting "pages" (bytes).

Here is the breakdown of their findings using simple analogies:

1. The "Book Size" Problem (Compression Rate)

In the world of AI, text is chopped up into chunks called tokens.

  • Low Compression: Imagine chopping a sentence into individual letters. You get a huge pile of tiny scraps (many tokens).
  • High Compression: Imagine grouping whole words or even phrases into single chunks. You get a smaller pile of big chunks (fewer tokens).

The paper asks: Does it matter how big our chunks are?
The answer is yes. The size of the chunk (called the compression rate) changes how efficiently we can build our library.

2. Finding the Sweet Spot: The "Bytes vs. Tokens" Rule

The researchers trained nearly 1,000 different AI models, tweaking the size of the chunks and the size of the model. They discovered a new rule for the perfect balance:

  • The Old Rule: "Buy 20 tokens per parameter." (This only works if your tokens are a specific size, like standard BPE tokens).
  • The New Rule: "Buy 60 bytes of text per parameter."

The Analogy:
Think of your AI model as a chef and the data as ingredients.

  • If you give the chef tiny, pre-chopped ingredients (high compression), they can cook a lot of meals quickly.
  • If you give them whole vegetables (low compression), they have to chop them first, which takes time.
  • The paper found that no matter how you chop the vegetables, the chef performs best when they have a specific weight of ingredients (60 bytes) for every unit of their skill (parameter). It doesn't matter if that weight is 20 big chunks or 100 tiny crumbs; the total weight is what matters.

3. The "Goldilocks" Compression Rate

You might think, "If I make the chunks bigger, I save more time, so I should make them as big as possible!"
The paper says: Not so fast.

They found that there is a Goldilocks zone for chunk size.

  • Too small: The model gets overwhelmed by too many tiny pieces of data.
  • Too big: The model loses too much detail because the chunks are too coarse.
  • Just right: There is a specific compression rate that yields the smartest model for a given budget.

The Twist: As you get more money (more computing power), the "Just Right" size actually gets smaller.

  • Analogy: If you have a small kitchen, you might want pre-chopped veggies to save time. But if you have a massive, professional kitchen with unlimited staff, you might prefer whole vegetables because you can process them so efficiently that the extra detail is worth the effort.

4. One Size Does Not Fit All (Language Matters)

The researchers tested this on different languages (English, Hindi, Arabic, Russian, etc.). They found that the "Just Right" chunk size depends on the language.

  • The Analogy: Imagine packing suitcases for different trips.
    • For a trip to a country where people speak a language with very compact words (like English), you might pack slightly larger items.
    • For a trip to a country where words are longer or use different scripts (like Hindi or Arabic), the "optimal" way to pack changes.
  • The paper found that popular AI tools (like Llama 3 or Qwen) often use a "one-size-fits-all" packing method. This works okay for English but is often too compressed for some languages and not compressed enough for others. They are essentially packing the wrong size items for the specific trip.

Summary of Key Takeaways

  1. Stop counting tokens, start counting bytes. When planning how much data to feed an AI, measure the raw size of the text (bytes), not the number of chunks (tokens). The ratio should be roughly 60 bytes of text for every 1 million parameters in the model.
  2. There is a perfect chunk size. Making tokens too big or too small hurts performance. There is a specific "sweet spot" for compression.
  3. The sweet spot changes. As you get more powerful computers, you should actually use slightly smaller chunks (lower compression) to get the best results.
  4. Language matters. The perfect chunk size is different for Hindi than it is for English. Current AI models often use a generic setting that isn't optimal for every language.

In short: To build the smartest AI possible, don't just follow the old rule of "20 tokens per parameter." Instead, match the weight of the text to the size of the brain, and adjust the size of the text chunks based on how much computing power you have and which language you are teaching it.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →