Skip to content

Commit d65a836

Browse files
authored
llama : disable context-shift for DeepSeek v2 (#8501)
1 parent 5e116e8 commit d65a836

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
@@ -15133,6 +15133,10 @@ static void llama_kv_cache_update_internal(struct llama_context & lctx) {
1513315133

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

0 commit comments

Comments
 (0)