removing any leading whitespace from infill suffix and removing leeading space token from suffix when params.escape

This commit is contained in:
vvhg1 2023-10-06 21:53:24 +02:00
parent 377be2f39d
commit b4046aabbf

View File

@ -235,7 +235,7 @@ int main(int argc, char ** argv) {
std::vector<llama_token> embd_inp;
std::vector<llama_token> inp_pfx = ::llama_tokenize(ctx, params.input_prefix, false);
params.input_suffix.erase(0, params.input_suffix.find_first_not_of(" "));
// params.input_suffix.erase(0, params.input_suffix.find_first_not_of(" "));
std::vector<llama_token> inp_sfx = ::llama_tokenize(ctx, params.input_suffix, false);
const int space_token = 29871;
if (params.escape && inp_sfx.size() > 1 && inp_sfx[0] == space_token) {