-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
llama: clear kv cache for each run_model call
This commit adds a call to `llama_kv_cache_clear` for each call to `run_model`. This is done because the same sequence id is currently being used for each call to `run_model` which can cause tokens from a previous call to be in the catch. This can cause the model to use tokens from a previous decode call in the attention mechanism which can cause the model to generate incorrect information. Signed-off-by: Daniel Bevenius <daniel.bevenius@gmail.com>
- Loading branch information
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters