mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-08-22 07:24:06 -04:00
lookahead : support -n -1
infinite generation
This commit is contained in:
@@ -311,7 +311,7 @@ int main(int argc, char ** argv) {
|
|||||||
++n_predict;
|
++n_predict;
|
||||||
++n_past;
|
++n_past;
|
||||||
|
|
||||||
if (n_predict > params.n_predict || has_eos) {
|
if ((params.n_predict >= 0 && n_predict > params.n_predict) || has_eos) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -433,7 +433,7 @@ int main(int argc, char ** argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (n_predict > params.n_predict || has_eos) {
|
if ((params.n_predict >= 0 && n_predict > params.n_predict) || has_eos) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user