What Is an AI Token, and Why Aren’t Limits Measured in Characters?
A token is a unit a model uses to process text, not a fixed number of characters or a whole English word. Different tokenizers can split the same text differently. For work, distinguish input length, output length, and the context limit instead of converting a character count with a universal ratio.
1. Text is divided into model-specific pieces
Hugging Face explains that subword algorithms use pieces between words and characters, with results depending on the algorithm and vocabulary. Measure mixed Chinese and English, punctuation, spaces, and codes with the intended tokenizer.
For a bilingual procedure containing URLs and tables, count the complete input rather than multiplying the Chinese character count by a generic factor. Our suggested measurement process also includes any role markers and chat formatting added by the application.
2. Separate three kinds of length
| Term | Meaning | Question to ask |
|---|---|---|
| Input tokens | Content submitted for this request | Does it include history and retrieved passages? |
| Output tokens | Content generated in this response | What output cap and stopping rules apply? |
| Context length | Token scope available during processing | What do the model and serving configuration allow? |
Hugging Face documents max_new_tokens as a cap on newly generated content. Ollama defines context length in terms of accessible tokens. An output cap is a different setting from conversation capacity.
Ask which instructions, history, tool results, and retrieved passages enter the assembled request. A short new question can accompany a long request. Inspect that request before increasing limits.
3. Test limits against work and hardware
Ollama states that a larger context requires more memory. This is tool-specific guidance, not a universal sizing formula. Check the input, output, and total limits of the chosen cloud or local configuration.
We suggest testing short questions, long documents, and multiple turns while recording input size, completion, response time, and hardware behavior. For oversized documents, assess selective retrieval, segmentation, or RAG, and check that key qualifications survive. Keep source and version information, and use a counting tool permitted to handle the material.
AI input boundaries and verification at Think BIG
Think BIG helps companies deploy AI Agents in their own environments. Running on company hardware does not keep every connection local: cloud models, messaging platforms, and other external services can still receive requests.
- Map data flows first: Before deployment, identify data sources, processing locations, output recipients, logs, and backups. Assess deployment location and external connections separately.
- Verify work with evidence: Completion criteria require corresponding change records and verification results, with maintenance and handover responsibilities defined.
See Trust and Local AI and data sovereignty.
The actual scope of Think BIG’s services follows what both parties confirm.
FAQ
- Q1: Is one Chinese character one token?
- There is no universal conversion. Use the tokenizer for the actual model.
- Q2: Is the output cap the context limit?
- They are different settings. Check generated output and total available scope separately.
- Q3: Should context always be set as high as possible?
- Test the workload. Ollama documents increased memory requirements for larger contexts.
- Q4: Can confidential files go into an online counter?
- Follow company data rules and consider a corresponding tokenizer in an approved environment.
- Hugging Face, Tokenization algorithms: huggingface.co
- Hugging Face, Text generation: huggingface.co
- Ollama, Context length: docs.ollama.com
- Think BIG, Trust and AI Governance: thinkbigtw.com
- Think BIG, Local AI and Data Sovereignty: thinkbigtw.com
This article summarizes public official documents, laws, and security standards to help companies evaluate AI adoption. It is not legal advice. For Taiwan law, the latest text on the Laws & Regulations Database prevails; external documents, prices, and specifications follow their original sources. The actual scope of Think BIG’s services depends on what both parties confirm.