We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 50fae10 commit 368d0c8Copy full SHA for 368d0c8
main.cpp
@@ -1062,7 +1062,6 @@ int main(int argc, char ** argv) {
1062
}
1063
1064
// end of text token
1065
-
1066
if (embd.back() == EOS_TOKEN_ID) {
1067
if (params.interactive) {
1068
is_interacting = true;
@@ -1071,6 +1070,12 @@ int main(int argc, char ** argv) {
1071
1070
break;
1072
1073
+
1074
+ // In interactive mode, respect the maximum number of tokens and drop back to user input when reached.
1075
+ if (params.interactive && remaining_tokens <= 0) {
1076
+ remaining_tokens = params.n_predict;
1077
+ is_interacting = true;
1078
+ }
1079
1080
1081
#if defined (_WIN32)
0 commit comments