- Glossary
- Token
Glossary term
Token
The unit a model reads and writes: a word, part of a word, a space or a symbol, mapped to an integer id.
Open lesson 2.2
Next-token prediction · Chapter 2, and 4 more lessons below
In plain words
Context windows, rate limits and prices are all measured in tokens. In English, one token is roughly three quarters of a word, but the ratio varies by language and content.
Taught in
- 2.2Next-token predictionChapter 2, What an LLM is · main lesson
- 2.1From text to tokensChapter 2, What an LLM is
- 2.3The transformer and attention, in picturesChapter 2, What an LLM is
- 3.3Estimating tokens for text, code and imagesChapter 3, Context windows, tokens and cost
- 30.4Hardware: memory, GPUs and throughputChapter 30, Local inference
Also in these lessons
AttentionAutoregressive generationBenchmarkByte-pair encoding (BPE)ConcurrencyInput tokensKV cacheLarge language model (LLM)MemoryMessages APINext-token predictionOutput tokens