Skip to content

Commit 3cf5186

Browse files
committed
server : upon full re-processing, remove the sequence from the cache
1 parent e230e51 commit 3cf5186

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/server/server.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3219,6 +3219,7 @@ struct server_context {
32193219
SLT_WRN(slot, "n_past = %d, cache_tokens.size() = %d, seq_id = %d, pos_min = %d\n", slot.n_past, (int) slot.cache_tokens.size(), slot.id, pos_min);
32203220
SLT_WRN(slot, "forcing full prompt re-processing due to lack of cache data (likely due to SWA, see %s)\n",
32213221
"https://github.com/ggml-org/llama.cpp/pull/13194#issuecomment-2868343055");
3222+
llama_kv_self_seq_rm(ctx, slot.id, 0, -1);
32223223
slot.n_past = 0;
32233224
}
32243225
}

0 commit comments

Comments
 (0)