summaryrefslogtreecommitdiff
path: root/examples/server
diff options
context:
space:
mode:
authorPierrick Hymbert <pierrick.hymbert@gmail.com>2024-04-27 17:50:48 +0200
committerGitHub <noreply@github.com>2024-04-27 17:50:48 +0200
commitb7368332e24c5b2c8038bf8267f43632783fcc35 (patch)
treea6c489c05769e329e88bd146f0b5f8fcb9ee1bff /examples/server
parent928e0b7013c862cf10701957b3d654aa70f11bd8 (diff)
ci: server: tests python env on github container ubuntu latest / fix n_predict (#6935)
* ci: server: fix python env * ci: server: fix server tests after #6638 * ci: server: fix windows is not building PR branch
Diffstat (limited to 'examples/server')
-rw-r--r--examples/server/server.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/server/server.cpp b/examples/server/server.cpp
index 6f8ba3fc..2760aea8 100644
--- a/examples/server/server.cpp
+++ b/examples/server/server.cpp
@@ -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", {