Skip to content

Commit 8826cf5

Browse files
committed
Improve readability
1 parent ba1aed3 commit 8826cf5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/server/server.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,8 +1331,8 @@ struct server_slot {
13311331
}
13321332
n_remaining = INT32_MAX;
13331333

1334-
// The request or server have finite limits on the number of tokens to generate.
1335-
if ((params.n_predict != -1 && params.n_predict != -2) || (global_params.n_predict != -1 && global_params.n_predict != -2)) {
1334+
// The request or server have specified limits on the number of tokens to generate.
1335+
if ((params.n_predict >= 0) || (global_params.n_predict >= 0)) {
13361336
n_remaining = std::min(n_remaining, params.n_predict - n_decoded);
13371337
}
13381338

0 commit comments

Comments
 (0)