mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-23 21:17:54 +01:00
lookahead : support -n -1
infinite generation
This commit is contained in:
parent
9656026b53
commit
3e73d31d9c
@ -311,7 +311,7 @@ int main(int argc, char ** argv) {
|
||||
++n_predict;
|
||||
++n_past;
|
||||
|
||||
if (n_predict > params.n_predict || has_eos) {
|
||||
if ((params.n_predict >= 0 && n_predict > params.n_predict) || has_eos) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user