diff options
author | Georgi Gerganov <ggerganov@gmail.com> | 2023-03-29 22:13:12 +0300 |
---|---|---|
committer | Georgi Gerganov <ggerganov@gmail.com> | 2023-03-29 22:13:12 +0300 |
commit | 0ba76c1e73ae21038b80bfb5a746157376c88173 (patch) | |
tree | a3cb71a8cd536bf7be25680042dd91a08e175e48 /llama.cpp | |
parent | cea1c859483a5cfc7e2b31a06f8561d7a7604870 (diff) |
llama : fix compile warnings when reading the vocab
Diffstat (limited to 'llama.cpp')
-rw-r--r-- | llama.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1444,7 +1444,7 @@ static bool llama_model_quantize_internal(const std::string & fname_inp, const s return false; } - std::string word; + std::vector<char> word(32); vocab.id_to_token.resize(n_vocab); for (int i = 0; i < n_vocab; i++) { uint32_t len; @@ -1459,10 +1459,10 @@ static bool llama_model_quantize_internal(const std::string & fname_inp, const s finp.read ((char *) &score, sizeof(score)); fout.write((char *) &score, sizeof(score)); - vocab.token_to_id[word] = i; + vocab.token_to_id[word.data()] = i; auto &tok_score = vocab.id_to_token[i]; - tok_score.tok = word; + tok_score.tok = word.data(); tok_score.score = score; } } |