]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
llama : disable context-shift for DeepSeek v2 (#8501)
authorGeorgi Gerganov <redacted>
Wed, 17 Jul 2024 07:32:59 +0000 (10:32 +0300)
committerGitHub <redacted>
Wed, 17 Jul 2024 07:32:59 +0000 (10:32 +0300)
src/llama.cpp

index 4a9903cc33e47489f8a0d793e2f6098ca2e35a47..89b5763dcd7f87445a7313a844f6a5498303e674 100644 (file)
@@ -15133,6 +15133,10 @@ static void llama_kv_cache_update_internal(struct llama_context & lctx) {
 
     // apply K-shift if needed
     if (lctx.model.hparams.rope_type != LLAMA_ROPE_TYPE_NONE && lctx.kv_self.has_shift) {
+        if (lctx.model.arch == LLM_ARCH_DEEPSEEK2) { // not supported due to MLA
+            GGML_ASSERT(false && "Deepseek2 does not support K-shift");
+        }
+
         {
             ggml_backend_sched_reset(lctx.sched);