What is a token?

A token is the basic unit in which a language model processes text; set by the tokeniser, it can be a word, part of a word, a suffix, whitespace or a punctuation mark.

It differs from tokenisation, which is the process of splitting text into tokens; a token is one of the units that process produces.

Topic
Core concepts
Also known as
Subword token, text token

How a token works

  1. A tokeniser splits the input into pieces defined in the model's vocabulary; each piece is represented by an integer ID.
  2. Each ID becomes an embedding vector at the model's input.
  3. At each step the model looks at the tokens in context and computes the probability of the next token; output tokens are produced one after another and turned back into text.
  4. The context window, maximum output length and rate limits are all expressed in tokens.

In more detail

Special control tokens and chat templates

Alongside text tokens, modern vocabularies include special control tokens (such as role delimiters, end-of-turn markers and tool-call tags) that structure conversation flow without representing literal words. Leaving raw control tokens unescaped in user input can break role boundaries and cause prompt injection.

Reasoning tokens and their hidden cost

Reasoning models generate internal thinking tokens before producing a visible answer; although hidden or collapsed in the UI, these tokens occupy context window capacity, consume decode bandwidth and count toward output token limits and latency.

Multimodal tokens and the context budget

In multimodal models, images, audio segments and video frames are also converted into discrete or continuous visual or audio tokens that share the same context budget as text tokens. A single high-resolution page scan can consume hundreds or thousands of image tokens.

Commonly confused terms

TermHow it differs
WordA token is the discrete unit (subword, word, punctuation or byte) processed by the model; a word is a linguistic unit separated by spaces or grammar rules and frequently splits into multiple tokens, especially in agglutinative languages like Turkish.
EmbeddingA token ID is an integer index in the vocabulary table; an embedding is the dense floating-point vector looked up for that token ID and updated with context inside the transformer layers.

Why a token matters for on-premises AI

On-premise capacity is planned in tokens: the KV cache grows linearly with tokens processed and long documents use GPU memory fast. The same Turkish text splits into a different number of tokens depending on the tokeniser (token fertility), which affects how much fits in context and response time, so RAG chunk size is set accordingly. Speed is measured in tokens per second; logging token counts by user and application makes usage auditing and cost allocation easier.

ON-PREMISES EXAMPLE

A telecoms operator measures the token length of long Turkish records in its in-house support assistant and splits documents into chunks that fit the model's context window.

Common questions

Is one token always one word?

No. A token can be a whole word, a root, a suffix, whitespace, a punctuation mark or a single byte; in Turkish one word often splits into several tokens.

Why do token counts affect speed and cost?

The model computes for every token; as input and output tokens grow, processing time and resource use grow too.

Sources

In the glossary: Glossary, R to Z

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.