Skip to content

Commit de29a00

Browse files
committed
fix quantize
1 parent 448f398 commit de29a00

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

quantize.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,13 @@ bool llama_model_quantize(const std::string & fname_inp, const std::string & fna
122122
finp.read ((char *) word.data(), len);
123123
fout.write((char *) word.data(), len);
124124

125+
float score;
126+
finp.read ((char *) &score, sizeof(score));
127+
fout.write((char *) &score, sizeof(score));
128+
125129
vocab.token_to_id[word] = i;
126130
vocab.id_to_token[i] = word;
131+
vocab.score[i] = score;
127132
}
128133
}
129134

0 commit comments

Comments
 (0)