Skip to content

Commit 091adba

Browse files
okuvshynovmglambda
authored andcommitted
llama.cpp: fix warning message (ggml-org#11839)
There was a typo-like error, which would print the same number twice if request is received with n_predict > server-side config. Before the fix: ``` slot launch_slot_: id 0 | task 0 | n_predict = 4096 exceeds server configuration, setting to 4096 ``` After the fix: ``` slot launch_slot_: id 0 | task 0 | n_predict = 8192 exceeds server configuration, setting to 4096 ```
1 parent 8756813 commit 091adba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/server/server.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2073,8 +2073,8 @@ struct server_context {
20732073

20742074
if (slot.n_predict > 0 && slot.params.n_predict > slot.n_predict) {
20752075
// Might be better to reject the request with a 400 ?
2076+
SLT_WRN(slot, "n_predict = %d exceeds server configuration, setting to %d", slot.params.n_predict, slot.n_predict);
20762077
slot.params.n_predict = slot.n_predict;
2077-
SLT_WRN(slot, "n_predict = %d exceeds server configuration, setting to %d", slot.n_predict, slot.n_predict);
20782078
}
20792079

20802080
if (slot.params.ignore_eos && has_eos_token) {

0 commit comments

Comments
 (0)