During multi-turn conversations, if context limit (minus the model's response length…
- User
During multi-turn conversations, if context limit (minus the model's response length limit) is reached, kobold.cpp shaves off tokens from the start of the conversation so new messages can fit in. Without Context Shift, the entire or almost entire prompt needs to be reprocessed because causal attention means kv cache of every token in the conversation has changed due to the removal of a few tokens at the beginning of chat history. With Context Shift enabled, the logs show only a small number of tokens processed (seemingly matching or around the amount of tokens of the user's new message). How is this achieved?
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.