From 305ba6f0e6daa3796aad9dd18053a1945dd4cc58 Mon Sep 17 00:00:00 2001 From: tjohnman Date: Wed, 22 Mar 2023 18:16:35 +0100 Subject: Don't force immediate interactive without `-i` (#354) * Don't force immediate interactive without -i Sometimes we might want to use a reverse prompt but we want to let the model generate tokens right after the initial prompt. So we don't force user input mode if the -i flag wasn't specified and instead let it run until we encounter the reverse prompt. This gives use some more flexibility, since it doesn't force the user to enter a newline if they want to let the model generate text right after the initial prompt and only be asked for input if the reverse prompt is encountered. The `--interactive-first` flag is reintroduced to force the old behavior. `-r` behaves like `-i` plus introduces a reverse prompt (it can be specified more than once). * Update help output. --------- Co-authored-by: Johnman --- utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils.h') diff --git a/utils.h b/utils.h index 3f970eab..b0de556c 100644 --- a/utils.h +++ b/utils.h @@ -38,7 +38,7 @@ struct gpt_params { bool random_prompt = false; // do not randomize prompt if none provided bool use_color = false; // use color to distinguish generations and inputs bool interactive = false; // interactive mode - bool interactive_start = false; // reverse prompt immediately + bool interactive_start = false; // wait for user input immediately bool instruct = false; // instruction mode (used for Alpaca models) bool ignore_eos = false; // do not stop generating after eos bool perplexity = false; // compute perplexity over the prompt -- cgit v1.2.3