diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 201f1246cab923..42bce9adc5a39a 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -219,6 +219,7 @@ struct server_slot { if (params.n_predict == -1 && global_params.n_predict == -1) { return true; // limitless } + n_remaining = -1; if (params.n_predict != -1) { @@ -1813,7 +1814,6 @@ struct server_context { continue; } - // Shift context const int n_keep = slot.params.n_keep + add_bos_token; const int n_left = slot.n_past - n_keep;