Prompts Forms Resume Reports ★ Saved ★ Saved★ + Submit a tool
Core concepts

Tokens and Tokenization

About 1450 characters Updated Nov 30, 2026 30 views AI wiki

Token is the smallest unit of text that a large model processes. Understanding tokens is the basis for understanding large-model billing, context length, and capability boundaries.

What a token is

A model cannot read text directly; the text must first be split into a string of numeric IDs. This splitting process is called tokenization, and each resulting piece is a token.

A token is not equal to a character, nor to a word, but lies between the two:

  • In English, common words are 1 token ("apple"), while rare words are split into several pieces ("unbelievable" into "un"+"believ"+"able")
  • In Chinese, usually 1 Chinese character is about 1 to 2 tokens, depending on the vocabulary design
  • Punctuation, spaces, and line breaks all count as tokens

Rule-of-thumb conversion

Rough estimate: 1 token is about 0.75 English words, or about 0.5 to 1 Chinese character. 1000 Chinese characters correspond to roughly 700 to 1500 tokens, depending on the tokenizer of the specific model.

Why it matters

  • Billing unit: all large-model APIs charge by token, with input and output priced separately
  • Context length: the commonly cited "128K context" means a conversation history that can hold 128000 tokens
  • Performance constraint: the more tokens, the slower and more expensive the inference, because the attention computation grows with the square of the length

Mainstream tokenization methods

Today BPE (Byte Pair Encoding) and its variants are generally used. The idea is to start from individual characters and repeatedly merge the most frequent adjacent character pairs into new units until the vocabulary reaches a preset size. In this way high-frequency words become a single token, while rare words are split into several pieces.