Skip to content

Commit 050ba94

Browse files
ggerganovarthw
authored andcommitted
llama : disable context-shift for DeepSeek v2 (ggml-org#8501)
1 parent f48ea9f commit 050ba94

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/llama.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15134,6 +15134,10 @@ static void llama_kv_cache_update_internal(struct llama_context & lctx) {
1513415134

1513515135
// apply K-shift if needed
1513615136
if (lctx.model.hparams.rope_type != LLAMA_ROPE_TYPE_NONE && lctx.kv_self.has_shift) {
15137+
if (lctx.model.arch == LLM_ARCH_DEEPSEEK2) { // not supported due to MLA
15138+
GGML_ASSERT(false && "Deepseek2 does not support K-shift");
15139+
}
15140+
1513715141
{
1513815142
ggml_backend_sched_reset(lctx.sched);
1513915143

0 commit comments

Comments
 (0)