You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/server/server.cpp
+12
Original file line number
Diff line number
Diff line change
@@ -887,6 +887,18 @@ struct server_context {
887
887
});
888
888
slot.params.n_predict = slot.n_predict;
889
889
}
890
+
if (slot.params.n_predict < 1 && slot.ga_n == 1) {
891
+
auto n_ctx_train = llama_n_ctx_train(model);
892
+
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", {
0 commit comments