Skip to content
AI & Machine Learning

Tokenization

Definition

Tokenization is the process of breaking down text or speech into individual words or units called tokens. This helps computers understand and analyze language more efficiently.

Diagram

Text

The unbelievably long meeting ran over by 45 minutes.

Tokens (11)

  • The
  • ·unbeliev
  • ably
  • ·long
  • ·meeting
  • ·ran
  • ·over
  • ·by
  • ·45
  • ·minutes
  • .

· marks a leading space, which is part of the token. Illustrative split; each model’s tokenizer differs.

Common words are usually one token; rare words break into pieces. That is why models are billed and limited by tokens rather than words, why roughly three English words make four tokens, and why code, numbers and many other languages use more tokens for the same meaning.

Worked example