The useful mental model
Token boundaries affect cost, context length, and which patterns are easy to represent. A long document is not simply a bigger prompt; it competes for finite attention.
Put it to work
Measure token counts on real user inputs. Put the most relevant evidence near the task, and trim repeated instructions or stale tool output.
Watch for
A large advertised context window does not prove equally strong recall at every position.
Go to the source.
These notes are an independent interpretation. Read the original research or documentation for methods and updates.
Hugging Face LLM Course: Tokenizers ↗