Fix ugly compiler warning
This commit is contained in:
parent
c7c0fcbfe0
commit
a90bf494c9
1 changed files with 3 additions and 3 deletions
|
@ -87,7 +87,7 @@ int main(int argc, char **argv) {
|
||||||
std::vector<llama_token> tokens = llama_tokenize(ctx, str, false);
|
std::vector<llama_token> tokens = llama_tokenize(ctx, str, false);
|
||||||
std::string check = llama_detokenize_spm(ctx, tokens);
|
std::string check = llama_detokenize_spm(ctx, tokens);
|
||||||
if (check != str) {
|
if (check != str) {
|
||||||
fprintf(stderr, "%s : error: token %d detokenizes to >%s<(%llu) but tokenization of this detokenizes to >%s<(%llu)\n",
|
fprintf(stderr, "%s : error: token %d detokenizes to >%s<(%zu) but tokenization of this detokenizes to >%s<(%zu)\n",
|
||||||
__func__, i, str.c_str(), str.length(), check.c_str(), check.length());
|
__func__, i, str.c_str(), str.length(), check.c_str(), check.length());
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ int main(int argc, char **argv) {
|
||||||
std::vector<llama_token> tokens = llama_tokenize(ctx, str, false);
|
std::vector<llama_token> tokens = llama_tokenize(ctx, str, false);
|
||||||
std::string check = llama_detokenize_spm(ctx, tokens);
|
std::string check = llama_detokenize_spm(ctx, tokens);
|
||||||
if (cp != 9601 && str != check) {
|
if (cp != 9601 && str != check) {
|
||||||
fprintf(stderr, "%s : error: codepoint %d detokenizes to >%s<(%llu) instead of >%s<(%llu)\n",
|
fprintf(stderr, "%s : error: codepoint %d detokenizes to >%s<(%zu) instead of >%s<(%zu)\n",
|
||||||
__func__, cp, check.c_str(), check.length(), str.c_str(), str.length());
|
__func__, cp, check.c_str(), check.length(), str.c_str(), str.length());
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ int main(int argc, char **argv) {
|
||||||
std::vector<llama_token> tokens = llama_tokenize(ctx, str, false);
|
std::vector<llama_token> tokens = llama_tokenize(ctx, str, false);
|
||||||
std::string check = llama_detokenize_spm(ctx, tokens);
|
std::string check = llama_detokenize_spm(ctx, tokens);
|
||||||
if (str != check) {
|
if (str != check) {
|
||||||
fprintf(stderr, "%s : error: codepoint %d detokenizes to >%s<(%llu) instead of >%s<(%llu)\n",
|
fprintf(stderr, "%s : error: codepoint %d detokenizes to >%s<(%zu) instead of >%s<(%zu)\n",
|
||||||
__func__, cp, check.c_str(), check.length(), str.c_str(), str.length());
|
__func__, cp, check.c_str(), check.length(), str.c_str(), str.length());
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue