various fixes

This commit is contained in:
Concedo 2025-01-18 23:52:39 +08:00
parent e90866fd46
commit fa7e661133
14 changed files with 51 additions and 32 deletions

View file

@ -9223,8 +9223,8 @@ static void llama_kv_cache_update_impl(struct llama_context & lctx) {
if (lctx.kv_self.has_shift) {
if (!llama_kv_cache_can_shift(&lctx)) {
GGML_ABORT("The current context does not support K-shift");
}
printf("\nWARNING: The current context does not support K-shift!\n");
} else {
// apply K-shift if needed
if (lctx.model.hparams.rope_type != LLAMA_ROPE_TYPE_NONE) {
@ -9250,6 +9250,7 @@ static void llama_kv_cache_update_impl(struct llama_context & lctx) {
kv_self.cells[i].delta = 0;
}
}
}
}
// defragment the KV cache if needed