Skip to content

Commit

Permalink
ci: server: fix server tests after ggerganov#6638
Browse files Browse the repository at this point in the history
  • Loading branch information
phymbert committed Apr 26, 2024
1 parent d06d354 commit 658451b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ struct server_context {
}

auto n_ctx_train = llama_n_ctx_train(model);
if (slot.params.n_predict < 1 && slot.ga_n == 1
if (slot.params.n_predict < 1 && slot.n_predict < 1 && slot.ga_n == 1
&& slot.n_prompt_tokens + slot.n_decoded >= n_ctx_train) {
LOG_WARNING("n_predict is not set and self-context extend is disabled."
" Limiting generated tokens to n_ctx_train to avoid EOS-less generation infinite loop", {
Expand Down

0 comments on commit 658451b

Please sign in to comment.