From dc716d6198f706e579ee7e93304e01b49b225e1e Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Tue, 16 Jul 2024 09:46:00 +0300 Subject: [PATCH] llama : disable context-shift for DeepSeek v2 --- src/llama.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/llama.cpp b/src/llama.cpp index 07bb42713..6398393c3 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -15137,6 +15137,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);