Character Tokens
TL;DR: If you're working with an AI model with a 2048 context token limit, your 1000 token character definition is cutting the AI's 'memory' in half.
To put this in perspective, a decent response from a good AI can easily be around 200-300 tokens. In this case, the AI would only be able to 'remember' about 3 exchanges worth of chat history.
Why did my character's token counter turn red?
When we see your character has over 1000 tokens in its definitions, we highlight it for you because this can lower the AI's capabilities to provide an enjoyable conversation.
What happens if my Character has too many tokens?
Don't worry - it won't break anything. At worst, if the Character's permanent tokens are too large, it simply means there will be less room left in the context for other things (see below).
The only negative side effect this can have is the AI will have less 'memory', as it will have less chat history available to process.
This is because every AI model has a limit to the amount of context it can process at one time.
'Context'?
This is the information that gets sent to the AI each time you ask it to generate a response:
- Character definitions
- Chat history
- Author's Notes
- Special Format strings
- [bracket commands]
SillyTavern automatically calculates the best way to allocate the available context tokens before sending the information to the AI model.
What are a Character's 'Permanent Tokens'?
These will always be sent to the AI with every generation request:
- Character Name (keep the name short! Sent at the start of EVERY Character message)
- Character Description Box
- Character Personality Box
- Scenario Box
What parts of a Character's Definitions are NOT permanent?
- The first message box - only sent once at the start of the chat.
- Example messages box - only kept until chat history fills up the context (optionally these can be forced to be kept in context)
Popular AI Model Context Token Limits
- Older models below 6B parameters - 1024
- Pygmalion 6B - 2048
- Poe.com (Claude-instant or ChatGPT) - 2048
- OpenAI ChatGPT - 4000-ish?
- OpenAI GPT-4 - 8000?