# Token

Concept · [Building with AI](https://ecosystem.samcarlton.com/ai)

Also called: tokens, token limit, token cost, token usage

In AI, a small [chunk](https://ecosystem.samcarlton.com/chunking) of text, roughly a word or a piece of a word, that an [LLM](https://ecosystem.samcarlton.com/llm) reads and writes. AI services measure usage, limits and price in tokens.

**For example:** A long document you paste into an AI tool is split into many tokens. A longer document means more tokens and a higher cost.

## Connects to (18)

- [LLM](https://ecosystem.samcarlton.com/llm): Large language model.
- [Context window](https://ecosystem.samcarlton.com/context-window): How much text an LLM can take into account at one time.
- [Inference](https://ecosystem.samcarlton.com/inference): An AI model producing an answer to a request.
- [Tokenizer](https://ecosystem.samcarlton.com/tokenizer): The step that splits text into tokens, the small pieces a model actually reads, and turns each one into a number.
- [Next-token prediction](https://ecosystem.samcarlton.com/next-token-prediction): The one job a language model performs.
- [Usage-based pricing](https://ecosystem.samcarlton.com/usage-based-pricing): A way to charge where the bill follows how much the customer uses, instead of a flat fee.
- [Rate limit](https://ecosystem.samcarlton.com/rate-limit): A cap on how many requests or tokens an account can send to an API in a set period.
- [Reasoning model](https://ecosystem.samcarlton.com/reasoning-model): A model, or a mode of a model, that works through a problem in intermediate steps before it answers.
- [Model provider](https://ecosystem.samcarlton.com/model-provider): The company or service that runs an AI model and answers requests to it, usually over the internet through an API.
- [Input tokens](https://ecosystem.samcarlton.com/input-tokens): The tokens an AI product sends to the model on each request: the instructions, the conversation so far, files and tool results.
- [Output tokens](https://ecosystem.samcarlton.com/output-tokens): The tokens the model writes back.
- [Cache tokens](https://ecosystem.samcarlton.com/cache-tokens): Input tokens the provider did not need to process again because they matched the start of a recent request in its cache.
- [Effort](https://ecosystem.samcarlton.com/effort): A setting that tells a reasoning model how much thinking to do before it answers.
- [Attention](https://ecosystem.samcarlton.com/attention): The part of a language model that decides, for each token, how much every other token in the input should shape its meaning.
- [Attention relationship](https://ecosystem.samcarlton.com/attention-relationship): The link between two tokens in the input, measured by how much one shapes the model's reading of the other.
- [Primary source](https://ecosystem.samcarlton.com/primary-source): The original material itself, such as the code, a full transcript or the raw data.
- [Sampling](https://ecosystem.samcarlton.com/sampling): How a model chooses each next token from its list of likely options.
- [MicroGPT](https://ecosystem.samcarlton.com/microgpt): A very small GPT language model written by Andrej Karpathy in a few hundred lines of plain Python, meant to show how training and running…

Map view: https://ecosystem.samcarlton.com/token
