]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
kv-cache : fix can_shift() check to take into account M-RoPE (#19928)
authorGeorgi Gerganov <redacted>
Thu, 26 Feb 2026 16:08:54 +0000 (18:08 +0200)
committerGitHub <redacted>
Thu, 26 Feb 2026 16:08:54 +0000 (18:08 +0200)
src/llama-kv-cache.cpp

index cb702b2a59f20562ce42d3d0cdbe18774c750b9a..6b668ee9abdd683967a505a9f613a2440b551949 100644 (file)
@@ -978,6 +978,9 @@ bool llama_kv_cache::get_can_shift() const {
     if (model.arch == LLM_ARCH_STEP35) {
         return false;
     }
+    if (hparams.n_pos_per_embd() > 1) {
+        return false;
+    }
     return true;
 }