server: handle n_predict==2 error
This commit is contained in:
parent
87421a23e8
commit
63978cb6dc
1 changed files with 2 additions and 0 deletions
|
@ -243,6 +243,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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue