update formatting
This commit is contained in:
parent
c4c7ead0bd
commit
ab73745993
3 changed files with 5 additions and 5 deletions
|
@ -32,7 +32,7 @@ extern "C" __declspec(dllimport) int __stdcall WideCharToMultiByte(unsigned int
|
||||||
#define CP_UTF8 65001
|
#define CP_UTF8 65001
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void split_args(std::string args_string, std::vector<std::string> & output_args)
|
void split_args(std::string args_string, std::vector<std::string> & output_args)
|
||||||
{
|
{
|
||||||
std::string current_arg = "";
|
std::string current_arg = "";
|
||||||
bool in_quotes = false;
|
bool in_quotes = false;
|
||||||
|
|
|
@ -40,7 +40,7 @@ struct gpt_params {
|
||||||
|
|
||||||
std::vector<std::string> antiprompt; // string upon seeing which more user input is prompted
|
std::vector<std::string> antiprompt; // string upon seeing which more user input is prompted
|
||||||
std::vector<std::string> stopprompt; // string upon seeing which more user input is prompted (without adding instruct prefixes and suffixes)
|
std::vector<std::string> stopprompt; // string upon seeing which more user input is prompted (without adding instruct prefixes and suffixes)
|
||||||
|
|
||||||
bool rm_trailing_space_workaround = false; // workaround for removing trailing space from reverse/stop prompts
|
bool rm_trailing_space_workaround = false; // workaround for removing trailing space from reverse/stop prompts
|
||||||
|
|
||||||
bool memory_f16 = true; // use f16 instead of f32 for memory kv
|
bool memory_f16 = true; // use f16 instead of f32 for memory kv
|
||||||
|
|
|
@ -420,7 +420,7 @@ int main(int argc, char ** argv) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (n_past > 0 && is_interacting)
|
if (n_past > 0 && is_interacting)
|
||||||
{
|
{
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
if (!params.clean_interface && !params.instruct_prefix.empty() && !antiprompt.any) {
|
if (!params.clean_interface && !params.instruct_prefix.empty() && !antiprompt.any) {
|
||||||
|
@ -430,10 +430,10 @@ int main(int argc, char ** argv) {
|
||||||
printf("%s", llama_token_to_str(ctx, inp_pfx[i]));
|
printf("%s", llama_token_to_str(ctx, inp_pfx[i]));
|
||||||
}
|
}
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
if (params.rm_trailing_space_workaround) {
|
if (params.rm_trailing_space_workaround) {
|
||||||
// add only if not stopprompt (as stopprompt could be used to pause
|
// add only if not stopprompt (as stopprompt could be used to pause
|
||||||
// assistant and then continue without input - adding back trailing
|
// assistant and then continue without input - adding back trailing
|
||||||
// space may mess it up.)
|
// space may mess it up.)
|
||||||
if (!antiprompt.is_stop_prompt && antiprompt.any && antiprompt.trailing_space) {
|
if (!antiprompt.is_stop_prompt && antiprompt.any && antiprompt.trailing_space) {
|
||||||
// add back removed trailing space to buffer(workaround)
|
// add back removed trailing space to buffer(workaround)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue