This commit is contained in:
Zhenwei Jin 2025-02-06 22:17:22 +00:00 committed by GitHub
commit 4306c3615f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1318,6 +1318,8 @@ struct server_slot {
if (params.n_predict != -1) { if (params.n_predict != -1) {
n_remaining = params.n_predict - n_decoded; n_remaining = params.n_predict - n_decoded;
} else if (global_params.n_predict == -2) {
n_remaining = n_ctx - n_past;
} else if (global_params.n_predict != -1) { } else if (global_params.n_predict != -1) {
n_remaining = global_params.n_predict - n_decoded; n_remaining = global_params.n_predict - n_decoded;
} }