// in instruct mode, we inject a prefix and a suffix to each input by the user
if (params.instruct) {
- fprintf(stderr, "== Instruction mode enabled ==\n");
params.interactive = true;
params.antiprompt = "### Instruction:\n\n";
}
} else if (arg == "-f" || arg == "--file") {
std::ifstream file(argv[++i]);
std::copy(std::istreambuf_iterator<char>(file), std::istreambuf_iterator<char>(), back_inserter(params.prompt));
+ if (params.prompt.back() == '\n') {
+ params.prompt.pop_back();
+ }
} else if (arg == "-n" || arg == "--n_predict") {
params.n_predict = std::stoi(argv[++i]);
} else if (arg == "--top_k") {