Skip to content

Commit ddcd7a3

Browse files
snowyuarthw
authored andcommitted
server : fix duplicated n_predict key in the generation_settings (ggml-org#8994)
1 parent dc795af commit ddcd7a3

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
@@ -1321,7 +1321,7 @@ struct server_context {
13211321

13221322
return json {
13231323
{"n_ctx", slot.n_ctx},
1324-
{"n_predict", slot.n_predict},
1324+
{"n_predict", slot.n_predict}, // Server configured n_predict
13251325
{"model", params.model_alias},
13261326
{"seed", slot.sparams.seed},
13271327
{"temperature", slot.sparams.temp},
@@ -1343,7 +1343,7 @@ struct server_context {
13431343
{"mirostat_eta", slot.sparams.mirostat_eta},
13441344
{"penalize_nl", slot.sparams.penalize_nl},
13451345
{"stop", slot.params.antiprompt},
1346-
{"n_predict", slot.params.n_predict}, // TODO: fix duplicate key n_predict
1346+
{"max_tokens", slot.params.n_predict}, // User configured n_predict
13471347
{"n_keep", slot.params.n_keep},
13481348
{"n_discard", slot.params.n_discard},
13491349
{"ignore_eos", ignore_eos},

0 commit comments

Comments
 (0)