Skip to content

Commit 57b6abf

Browse files
authored
android : fix KV cache log message condition (#12212)
1 parent 94bb63e commit 57b6abf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/llama.android/llama/src/main/cpp/llama-android.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ Java_android_llama_cpp_LLamaAndroid_completion_1init(
361361
const auto tokens_list = common_tokenize(context, text, true, parse_special);
362362

363363
auto n_ctx = llama_n_ctx(context);
364-
auto n_kv_req = tokens_list.size() + (n_len - tokens_list.size());
364+
auto n_kv_req = tokens_list.size() + n_len;
365365

366366
LOGi("n_len = %d, n_ctx = %d, n_kv_req = %d", n_len, n_ctx, n_kv_req);
367367

0 commit comments

Comments
 (0)