diff --git a/quantize.cpp b/quantize.cpp index 14c7b277a4024a..10bed7db392dc8 100644 --- a/quantize.cpp +++ b/quantize.cpp @@ -122,8 +122,13 @@ bool llama_model_quantize(const std::string & fname_inp, const std::string & fna finp.read ((char *) word.data(), len); fout.write((char *) word.data(), len); + float score; + finp.read ((char *) &score, sizeof(score)); + fout.write((char *) &score, sizeof(score)); + vocab.token_to_id[word] = i; vocab.id_to_token[i] = word; + vocab.score[i] = score; } }