Switch language한국어
Back to the list

What Is Tokenization Drift and How to Fix It?

TL;DR AI

Key summary

2 min read
  1. The article explains tokenization drift: tiny formatting changes in prompts can alter token IDs and model inputs.

  2. GPT-2 tokenizer examples show that space-prefixed words can split into different token sequences than the same words without leading spaces.

  3. This drift can change sequence length and model behavior, making outputs less stable and prompt reliability harder to manage.

  4. The piece also describes measuring drift and using prompt optimization loops to keep inputs consistent across models like GPT-4, LLaMA, and Mistral.

Read the original