GenAIWiki
Inference

Token

A token is the subword or symbol unit a model reads and writes; context limits, pricing, and latency are counted in tokens.

Expanded definition

Tokenizers split text into integers the model was trained on. English often uses fewer tokens than code or some other languages for the same character count. APIs bill input and output tokens separately, and context windows include system prompts, tools, retrieved chunks, and conversation history. Truncation and silent clipping are common production bugs. Always measure your tokenizer, not a word-count heuristic.

Related terms

Explore adjacent ideas in the knowledge graph.

Token FAQ

What is Token?

A token is the subword or symbol unit a model reads and writes; context limits, pricing, and latency are counted in tokens.

How is Token used in AI systems?

Tokenizers split text into integers the model was trained on. English often uses fewer tokens than code or some other languages for the same character count. APIs bill input and output tokens separately, and context windows include system prompts, tools, retrieved chunks, and conversation history. Truncation and silent clipping are common production bugs.

Related

Comparisons, tools, and models that connect to this idea.