If n_predict == -1, generate forever
This commit is contained in:
parent
e2d490dafd
commit
79b2b266db
3 changed files with 3 additions and 4 deletions
|
@ -199,7 +199,6 @@ int main(int argc, char ** argv) {
|
|||
}
|
||||
|
||||
params.n_keep = std::min(params.n_keep, (int) embd_inp.size());
|
||||
//params.n_predict = std::min(params.n_predict, n_ctx - (int) embd_inp.size());
|
||||
|
||||
// prefix & suffix for instruct mode
|
||||
const auto inp_pfx = ::llama_tokenize(ctx, "\n\n### Instruction:\n\n", true);
|
||||
|
@ -293,7 +292,7 @@ int main(int argc, char ** argv) {
|
|||
|
||||
std::vector<llama_token> embd;
|
||||
|
||||
while (n_remain > 0 || params.interactive) {
|
||||
while (n_remain != 0 || params.interactive) {
|
||||
// predict
|
||||
if (embd.size() > 0) {
|
||||
// infinite text generation via context swapping
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue