llama.cpp/examples/llama.android/lib
Samaresh Kumar Singh 7e9bea7f1c [AI] android: fix infinite generation in shift_context()
When shift_context() discards tokens to free KV cache space, it decrements
current_position but not stop_generation_position. This causes the
termination check (current_position >= stop_generation_position) to never
trigger, resulting in infinite text generation.

Fix by also decrementing stop_generation_position by n_discard tokens.

Fixes #18409
2025-12-28 12:14:46 -06:00
..
src [AI] android: fix infinite generation in shift_context() 2025-12-28 12:14:46 -06:00
.gitignore llama.android : Rewrite Android binding (w/o cpu_features dep) (#17413) 2025-12-17 10:14:47 +02:00
build.gradle.kts llama.android : Rewrite Android binding (w/o cpu_features dep) (#17413) 2025-12-17 10:14:47 +02:00
consumer-rules.pro llama.android : Rewrite Android binding (w/o cpu_features dep) (#17413) 2025-12-17 10:14:47 +02:00
proguard-rules.pro llama.android : Rewrite Android binding (w/o cpu_features dep) (#17413) 2025-12-17 10:14:47 +02:00