Skip to content

Commit 512f7a1

Browse files
committed
Implementing fix from ggml-org#17000
1 parent 8d38d60 commit 512f7a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/server/server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3547,7 +3547,7 @@ struct server_context {
35473547
// apply context-shift if needed
35483548
// TODO: simplify and improve
35493549
for (server_slot & slot : slots) {
3550-
if (slot.is_processing() && slot.prompt.n_tokens() + 1 >= slot.n_ctx) {
3550+
if (slot.state == SLOT_STATE_GENERATING && slot.prompt.n_tokens() + 1 >= slot.n_ctx) {
35513551
if (!params_base.ctx_shift) {
35523552
// this check is redundant (for good)
35533553
// we should never get here, because generation should already stopped in process_token()

0 commit comments

Comments
 (0)