Skip to content

token

A token is the smallest unit of data processed and generated by natural language processing (NLP) systems and language models (LLMs), typically produced by a tokenizer that segments text into words, subwords, characters, or bytes.

Tokens are mapped to integer IDs from a fixed vocabulary so that models can process sequences efficiently. Tokens are distinct from words: for English text, a token averages roughly three to four characters, though the exact ratio depends on the model’s tokenizer, so a long or unusual word can span several tokens.

Practical limits, costs, and context windows for LLMs are measured in tokens. Multimodal models tokenize images, audio, and video, so those inputs are counted and billed in tokens too.

Natural Language Processing With spaCy in Python

Tutorial

Natural Language Processing With spaCy in Python

In this step-by-step tutorial, you'll learn how to use spaCy. This free and open-source library for natural language processing (NLP) in Python has a lot of built-in capabilities and is becoming increasingly popular for processing and analyzing data in NLP.

intermediate data-science

For additional information on related topics, take a look at the following resources:

Have a question about this? Mentor AI can show you examples, compare related terms, and point you to tutorials.


By Leodanis Pozo Ramos • Updated Nov. 4, 2026