tests: unexpected vocab type as test fail instead of error

Useful when automating tests:
 - If you don't know in advance the vocab type.
 - Differenciate other loading errors.
This commit is contained in:
jaime-m-p 2024-06-23 20:49:02 +02:00
parent b452e826cb
commit 9af762c0ac
2 changed files with 8 additions and 2 deletions

View file

@ -63,7 +63,10 @@ int main(int argc, char **argv) {
}
}
GGML_ASSERT(llama_vocab_type(model) == LLAMA_VOCAB_TYPE_BPE);
//GGML_ASSERT(llama_vocab_type(model) == LLAMA_VOCAB_TYPE_BPE);
if (llama_vocab_type(model) != LLAMA_VOCAB_TYPE_BPE) {
return 99;
}
#ifdef _WIN32
// We need this for unicode console support

View file

@ -51,7 +51,10 @@ int main(int argc, char ** argv) {
}
}
GGML_ASSERT(llama_vocab_type(model) == LLAMA_VOCAB_TYPE_SPM);
//GGML_ASSERT(llama_vocab_type(model) == LLAMA_VOCAB_TYPE_SPM);
if (llama_vocab_type(model) != LLAMA_VOCAB_TYPE_SPM) {
return 99;
}
#ifdef _WIN32
// We need this for unicode console support