Token

A token is a unit of text, code, audio, or other input representation that a model processes.

Intuition

Models do not usually read raw words exactly as humans do. They read chunks produced by a tokenizer or modality encoder.

Technical definition

A token is a discrete element from a vocabulary or encoded stream that is mapped to an embedding before model processing.

Example

The word "unbelievable" might be split into multiple subword tokens.

Common misunderstandings

  • A token is not always a full word.
  • Token counts affect cost, latency, and context length.

Need this inside a product?

The studio builds the systems these terms describe. Tell us what you are working on.