Skip to content

Conversation

@hanyin-arm
Copy link
Contributor

Calculate required KV cache size by summing up tokens size and response token length.

previously:
auto n_kv_req = tokens_list.size() + (n_len - tokens_list.size());

now:
auto n_kv_req = tokens_list.size() + n_len;

@ggerganov ggerganov merged commit 57b6abf into ggml-org:master Mar 6, 2025
47 checks passed
@ggerganov
Copy link
Member

Looks like the n_kv_req is use just to print an error message, so this change should not affect the output of the example.

mglambda pushed a commit to mglambda/llama.cpp that referenced this pull request Mar 8, 2025
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

android Issues specific to Android examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants