tokenize : fix trailing whitespace

This commit is contained in:
Georgi Gerganov 2023-11-17 18:01:38 +02:00
parent 2fa02b4b3d
commit 5ad387e994
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735

View File

@ -12,8 +12,8 @@ int main(int argc, char ** argv) {
return 1;
}
auto model_path = argv[1];
auto prompt = argv[2];
const char * model_path = argv[1];
const char * prompt = argv[2];
const bool printing_ids = argc > 3 && std::string(argv[3]) == "--ids";
@ -36,7 +36,7 @@ int main(int argc, char ** argv) {
if (printing_ids) {
printf("%d\n", tokens[i]);
} else {
printf("%6d -> '%s'\n", tokens[i], llama_token_to_piece(ctx, tokens[i]).c_str());
printf("%6d -> '%s'\n", tokens[i], llama_token_to_piece(ctx, tokens[i]).c_str());
}
}