Fix PR for recent change

This commit is contained in:
goerch 2023-09-29 20:17:28 +02:00 committed by GitHub
parent c09330edba
commit 9cfb7145a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7667,7 +7667,7 @@ static std::string llama_decode_text(const std::string& text) {
// does not write null-terminator to buf
int llama_token_to_piece(const struct llama_model * model, llama_token token, char * buf, int length) {
if (0 <= token && token < llama_model_n_vocab(model)) {
if (0 <= token && token < llama_n_vocab(model)) {
switch (llama_vocab_get_type(model->vocab)) {
case LLAMA_VOCAB_TYPE_SPM: {
if (llama_is_normal_token(model->vocab, token)) {