Skip to content

Commit

Permalink
fix quantize
Browse files Browse the repository at this point in the history
  • Loading branch information
eiz committed Mar 18, 2023
1 parent 448f398 commit de29a00
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions quantize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit de29a00

Please sign in to comment.