Fixed vocabulary guarding assertions
This commit is contained in:
parent
59a30b768a
commit
a6070b7c5a
1 changed files with 2 additions and 2 deletions
|
@ -1831,7 +1831,7 @@ static void llm_load_vocab(
|
||||||
|
|
||||||
for (int i = 0; i < n_merges; i++) {
|
for (int i = 0; i < n_merges; i++) {
|
||||||
const std::string word = gguf_get_arr_str(ctx, merges_keyidx, i);
|
const std::string word = gguf_get_arr_str(ctx, merges_keyidx, i);
|
||||||
GGML_ASSERT(codepoints_from_utf8(word).size() >= 0);
|
GGML_ASSERT(codepoints_from_utf8(word).size() > 0);
|
||||||
|
|
||||||
std::string first;
|
std::string first;
|
||||||
std::string second;
|
std::string second;
|
||||||
|
@ -1866,7 +1866,7 @@ static void llm_load_vocab(
|
||||||
|
|
||||||
for (uint32_t i = 0; i < n_vocab; i++) {
|
for (uint32_t i = 0; i < n_vocab; i++) {
|
||||||
std::string word = gguf_get_arr_str(ctx, token_idx, i);
|
std::string word = gguf_get_arr_str(ctx, token_idx, i);
|
||||||
GGML_ASSERT(codepoints_from_utf8(word).size() >= 0);
|
GGML_ASSERT(codepoints_from_utf8(word).size() > 0);
|
||||||
|
|
||||||
vocab.token_to_id[word] = i;
|
vocab.token_to_id[word] = i;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue