What A Time To Be Alive
Choose language: English

Glossary

Tokens

Tokens are the pieces of text a language model reads and writes: often a short word or part of a word. The speed, cost and memory of AI are measured in tokens.

A language model does not read and write in whole words or letters, but in tokens, also called word pieces. A token is a piece of text: a short word, part of a long word, a punctuation mark or a space followed by a word. You can compare it to words being chopped into syllables before the model gets to work on them.

How does it work?

Before a model processes a text, the text is split into tokens. Each token gets a number, and the model calculates with those numbers. An answer usually emerges token by token: the model picks the next piece, adds it and then looks at what fits next.

That is why tokens are used as a measure everywhere. A model's speed is given in tokens per second. The amount of text a model can take in at once is the number of tokens that fit in its working memory. And the price of an AI service is often calculated per million tokens going in and per million coming out. Long texts and long chains of reasoning therefore cost more tokens, and with them more computing time and money.

Why it matters

Tokens make it easy to see what AI work costs. According to its maker, the American company Inception's AI model Mercury 3 writes more than a thousand word pieces per second, because it finishes a text in a few rounds all at once instead of token by token (link). That makes AI faster and cheaper.

For heavy work the numbers climb quickly. Anthropic has Claude supply a mathematical proof with software, which is then checked step by step, and a single such proof can cost hundreds of millions of tokens (link). When computing becomes more efficient, that number drops. For anyone reading news about AI, it is useful to know that a token is not a word, but a building block of a word.

Articles about Tokens