diff --git a/src/llama-vocab.cpp b/src/llama-vocab.cpp index 0c9e57215..9be52d737 100644 --- a/src/llama-vocab.cpp +++ b/src/llama-vocab.cpp @@ -1171,7 +1171,7 @@ struct llm_tokenizer_rwkv { // Iterate through possible tokens backwards, starting with the largest for (int32_t i = (int32_t)tokens.size() - 1; i >= 0; i--) { // Skip tokens that aren't normal type, we can't match on those - if (vocab.id_to_token[i].attr != LLAMA_TOKEN_TYPE_NORMAL) { + if (!(vocab.id_to_token[i].attr & LLAMA_TOKEN_ATTR_NORMAL)) { continue; }