Skip to content
Book a conversation

Token

Learn what a token is in a language model and why word counts, character counts, and context limits are different measures.

Luiz GardelinUpdated Read in Markdown
All terms

A conversation about your organization.

Before recommending any tool, we talk with your teams and map how the work really happens.

Arrange a conversation
On this pageIntroduction

Also used as: language token, text token.

A token is a unit that a language model uses to process text, learn during training, and make predictions. A unit may be a word, a character, or part of a word. A word written by a person therefore does not necessarily equal one token. The division depends on the tokenization system being used. Source: Google, token.

A model unit, not a unit of meaning

People usually read in words or consider complete sentences. For a model, a sequence of tokens is a way to represent an input and produce an output. Part of a word can be a valid unit even when it cannot stand alone as a word. This does not make each token an idea, a fact, or a concept.

Google illustrates several possible segmentation strategies, including characters and parts of words. These examples explain approaches; they do not establish how any particular model will divide a given text. To find the exact count for a concrete use, the organization must use the tokenization associated with that model. Sources: Google, token and tokenizer.

Hypothetical workplace example

A team wants to send a manual and a question to a model. The document has a known word count, but context capacity is expressed in tokens. The team needs to count the content it will send and check how the model and interface allocate that capacity between input and generation.

The context window limits a model's context-processing capacity. Google introduces the concept through prompt size. Source: Google, context window. In a documented example, OpenAI explains that reasoning tokens also occupy this window and that space must remain for generation. This accounting rule should not be assumed for every provider. Source: OpenAI, reasoning models. A file's page count therefore does not, on its own, establish whether the planned use fits within the limits.

Token count is also a poor measure of a document's usefulness. A short passage can contain the decisive rule, while a long passage may be irrelevant to the question. Counting tokens helps manage processing. Choosing which information to supply remains a decision about content and purpose.

Sources

  1. Machine Learning Glossary: Token Google for Developers

    No universal conversion between words and tokens is assumed. Reserving room for generation and reasoning is a documented OpenAI example, not a shared accounting rule for all interfaces.

  2. Machine Learning Glossary: Tokenizer Google for Developers
  3. Machine Learning Glossary: Context window Google for Developers
  4. OpenAI: Reasoning models OpenAI

    Scope: reasoning models documented by OpenAI. Reasoning tokens occupy the window and room must remain for generation; this accounting is not a universal rule.

Written by

Luiz Gardelin

Founder and lead consultant at The Company Brain

Luiz Gardelin is the founder and lead consultant at The Company Brain, an AI organizational transformation consultancy based in Brazil. He also founded Webinhood and Tropk.ai.

See all content by this author

A conversation about your organization.

Before recommending any tool, we talk with your teams and map how the work really happens.

Arrange a conversation

Related terms

Continue reading

All resources