llama.cpp/examples/llama.android
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
..
app android: fix missing screenshots for Android.md (#18156) 2025-12-19 09:32:04 +02:00
gradle llama.android : Rewrite Android binding (w/o cpu_features dep) (#17413) 2025-12-17 10:14:47 +02:00
lib [AI] android: fix infinite generation in shift_context() 2025-12-28 12:14:46 -06:00
.gitignore android : introduce starter project example (#4926) 2024-01-16 15:47:34 +02:00
build.gradle.kts llama.android : Rewrite Android binding (w/o cpu_features dep) (#17413) 2025-12-17 10:14:47 +02:00
gradle.properties llama.android : Rewrite Android binding (w/o cpu_features dep) (#17413) 2025-12-17 10:14:47 +02:00
gradlew android : introduce starter project example (#4926) 2024-01-16 15:47:34 +02:00
settings.gradle.kts llama.android : Rewrite Android binding (w/o cpu_features dep) (#17413) 2025-12-17 10:14:47 +02:00